Commit ca7965b9 by pupi1985

Replaced all number_format in app/admin-categories.php

parent b3a73195
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
require_once QA_INCLUDE_DIR.'app/admin.php'; require_once QA_INCLUDE_DIR.'app/admin.php';
require_once QA_INCLUDE_DIR.'db/selects.php'; require_once QA_INCLUDE_DIR.'db/selects.php';
require_once QA_INCLUDE_DIR.'db/admin.php'; require_once QA_INCLUDE_DIR.'db/admin.php';
require_once QA_INCLUDE_DIR.'app/format.php';
// Get relevant list of categories // Get relevant list of categories
...@@ -395,7 +396,7 @@ ...@@ -395,7 +396,7 @@
'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'])).'">'.
( ($editcategory['qcount']==1) ( ($editcategory['qcount']==1)
? qa_lang_html_sub('main/1_question', '1', '1') ? qa_lang_html_sub('main/1_question', '1', '1')
: qa_lang_html_sub('main/x_questions', number_format($editcategory['qcount'])) : qa_lang_html_sub('main/x_questions', qa_format_number($editcategory['qcount']))
).'</a>', ).'</a>',
); );
...@@ -405,7 +406,7 @@ ...@@ -405,7 +406,7 @@
if ($nosubcount) if ($nosubcount)
$qa_content['form']['fields']['questions']['error']= $qa_content['form']['fields']['questions']['error']=
strtr(qa_lang_html('admin/category_no_sub_error'), array( strtr(qa_lang_html('admin/category_no_sub_error'), array(
'^q' => number_format($nosubcount), '^q' => qa_format_number($nosubcount),
'^1' => '<a href="'.qa_path_html(qa_request(), array('edit' => $editcategory['categoryid'], 'missing' => 1)).'">', '^1' => '<a href="'.qa_path_html(qa_request(), array('edit' => $editcategory['categoryid'], 'missing' => 1)).'">',
'^2' => '</a>', '^2' => '</a>',
)); ));
...@@ -559,8 +560,15 @@ ...@@ -559,8 +560,15 @@
foreach ($categories as $category) foreach ($categories as $category)
if (!isset($category['parentid'])) if (!isset($category['parentid']))
$navcategoryhtml.='<a href="'.qa_path_html('admin/categories', array('edit' => $category['categoryid'])).'">'. $navcategoryhtml .=
qa_html($category['title']).'</a> - '.qa_lang_html_sub('main/x_questions', $category['qcount']).'<br/>'; '<a href="' . qa_path_html('admin/categories', array('edit' => $category['categoryid'])) . '">' .
qa_html($category['title']) .
'</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/>'
;
$qa_content['form']['fields']['nav']=array( $qa_content['form']['fields']['nav']=array(
'label' => qa_lang_html('admin/top_level_categories'), 'label' => qa_lang_html('admin/top_level_categories'),
...@@ -581,7 +589,7 @@ ...@@ -581,7 +589,7 @@
if ($nocatcount) if ($nocatcount)
$qa_content['form']['fields']['allow_no_category']['error']= $qa_content['form']['fields']['allow_no_category']['error']=
strtr(qa_lang_html('admin/category_none_error'), array( strtr(qa_lang_html('admin/category_none_error'), array(
'^q' => number_format($nocatcount), '^q' => qa_format_number($nocatcount),
'^1' => '<a href="'.qa_path_html(qa_request(), array('missing' => 1)).'">', '^1' => '<a href="'.qa_path_html(qa_request(), array('missing' => 1)).'">',
'^2' => '</a>', '^2' => '</a>',
)); ));
......
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