Commit 2348f9c4 by Scott

Coding style

parent cd3bee1d
...@@ -430,14 +430,14 @@ class Categories extends BaseController ...@@ -430,14 +430,14 @@ class Categories extends BaseController
); );
} }
$qcountHtml = $editcategory['qcount'] == 1
? qa_lang_html_sub('main/1_question', '1', '1')
: qa_lang_html_sub('main/x_questions', qa_format_number($editcategory['qcount']));
$qa_content['form']['fields']['questions'] = array( $qa_content['form']['fields']['questions'] = array(
'label' => qa_lang_html('admin/total_qs'), 'label' => qa_lang_html('admin/total_qs'),
'type' => 'static', 'type' => 'static',
'value' => '<a href="' . qa_path_html('questions/' . qa_category_path_request($categories, $editcategory['categoryid'])) . '">' . 'value' => '<a href="' . qa_path_html('questions/' . qa_category_path_request($categories, $editcategory['categoryid'])) . '">' . $qcountHtml . '</a>',
($editcategory['qcount'] == 1
? qa_lang_html_sub('main/1_question', '1', '1')
: qa_lang_html_sub('main/x_questions', qa_format_number($editcategory['qcount']))
) . '</a>',
); );
if ($hassubcategory && !qa_opt('allow_no_sub_category')) { if ($hassubcategory && !qa_opt('allow_no_sub_category')) {
...@@ -601,14 +601,12 @@ class Categories extends BaseController ...@@ -601,14 +601,12 @@ class Categories extends BaseController
foreach ($categories as $category) { foreach ($categories as $category) {
if (!isset($category['parentid'])) { if (!isset($category['parentid'])) {
$qcountHtml = $category['qcount'] == 1
? qa_lang_html_sub('main/1_question', '1', '1')
: qa_lang_html_sub('main/x_questions', qa_format_number($category['qcount']));
$navcategoryhtml .= $navcategoryhtml .=
'<a href="' . qa_path_html('admin/categories', array('edit' => $category['categoryid'])) . '">' . '<a href="' . qa_path_html('admin/categories', array('edit' => $category['categoryid'])) . '">' .
qa_html($category['title']) . qa_html($category['title']) . '</a> - ' . $qcountHtml . '<br/>';
'</a> - ' .
($category['qcount'] == 1
? qa_lang_html_sub('main/1_question', '1', '1')
: qa_lang_html_sub('main/x_questions', qa_format_number($category['qcount']))
) . '<br/>';
} }
} }
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
namespace Q2A\Controllers\Admin; namespace Q2A\Controllers\Admin;
use Q2A\Database\DbConnection;
use Q2A\Controllers\BaseController; use Q2A\Controllers\BaseController;
use Q2A\Database\DbConnection;
use Q2A\Middleware\Auth\MinimumUserLevel; use Q2A\Middleware\Auth\MinimumUserLevel;
/** /**
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
namespace Q2A\Exceptions; namespace Q2A\Exceptions;
use Exception; use Exception;
use Q2A\Http\Exceptions\PageNotFoundException;
use Q2A\Http\Exceptions\MethodNotAllowedException; use Q2A\Http\Exceptions\MethodNotAllowedException;
use Q2A\Http\Exceptions\PageNotFoundException;
class ExceptionHandler class ExceptionHandler
{ {
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
namespace Q2A\Notifications; namespace Q2A\Notifications;
use PHPMailer;
use Q2A\Exceptions\FatalErrorException; use Q2A\Exceptions\FatalErrorException;
use Q2A\Notifications\Mailer; use Q2A\Notifications\Mailer;
use PHPMailer;
class Email class Email
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment