Commit ece829bf by pupi1985

Replaced number_format in plugins

parent ea294a54
...@@ -49,12 +49,14 @@ class qa_activity_count ...@@ -49,12 +49,14 @@ class qa_activity_count
public function output_count($themeobject, $value, $langsingular, $langplural) public function output_count($themeobject, $value, $langsingular, $langplural)
{ {
require_once QA_INCLUDE_DIR . 'app/format.php';
$themeobject->output('<p class="qa-activity-count-item">'); $themeobject->output('<p class="qa-activity-count-item">');
if ($value==1) if ($value==1)
$themeobject->output(qa_lang_html_sub($langsingular, '<span class="qa-activity-count-data">1</span>', '1')); $themeobject->output(qa_lang_html_sub($langsingular, '<span class="qa-activity-count-data">1</span>', '1'));
else else
$themeobject->output(qa_lang_html_sub($langplural, '<span class="qa-activity-count-data">'.number_format((int)$value).'</span>')); $themeobject->output(qa_lang_html_sub($langplural, '<span class="qa-activity-count-data">'.qa_format_number((int)$value).'</span>'));
$themeobject->output('</p>'); $themeobject->output('</p>');
} }
......
...@@ -79,9 +79,9 @@ class qa_wysiwyg_editor ...@@ -79,9 +79,9 @@ class qa_wysiwyg_editor
array( array(
'id' => 'wysiwyg_editor_upload_max_size_display', 'id' => 'wysiwyg_editor_upload_max_size_display',
'label' => 'Maximum size of uploads:', 'label' => 'Maximum size of uploads:',
'suffix' => 'MB (max '.$this->bytes_to_mega_html(qa_get_max_upload_size()).')', 'suffix' => 'MB (max '.qa_html(qa_format_number($this->bytes_to_mega(qa_get_max_upload_size()))).')',
'type' => 'number', 'type' => 'number',
'value' => $this->bytes_to_mega_html(qa_opt('wysiwyg_editor_upload_max_size')), 'value' => qa_html(number_format($this->bytes_to_mega(qa_opt('wysiwyg_editor_upload_max_size')))),
'tags' => 'name="wysiwyg_editor_upload_max_size_field"', 'tags' => 'name="wysiwyg_editor_upload_max_size_field"',
), ),
), ),
...@@ -215,16 +215,12 @@ class qa_wysiwyg_editor ...@@ -215,16 +215,12 @@ class qa_wysiwyg_editor
); );
} }
else { else {
// convert to text
$viewer = qa_load_module('viewer', '');
return array( return array(
'format' => '', 'format' => '',
'content' => $this->html_to_text($html), 'content' => $this->html_to_text($html),
); );
} }
} } else {
else {
// CKEditor was not loaded so treat it as plain text // CKEditor was not loaded so treat it as plain text
return array( return array(
'format' => '', 'format' => '',
...@@ -248,8 +244,8 @@ class qa_wysiwyg_editor ...@@ -248,8 +244,8 @@ class qa_wysiwyg_editor
* @deprecated This function will become private in Q2A 1.8. It is specific to this plugin and * @deprecated This function will become private in Q2A 1.8. It is specific to this plugin and
* should not be used by outside code. * should not be used by outside code.
*/ */
public function bytes_to_mega_html($bytes) public function bytes_to_mega($bytes)
{ {
return qa_html(number_format($bytes/1048576, 1)); return $bytes / 1048576;
} }
} }
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