Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
ece829bf
Commit
ece829bf
authored
Dec 22, 2014
by
pupi1985
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced number_format in plugins
parent
ea294a54
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
qa-widget-activity-count.php
qa-include/plugins/qa-widget-activity-count.php
+3
-1
qa-wysiwyg-editor.php
qa-plugin/wysiwyg-editor/qa-wysiwyg-editor.php
+5
-9
No files found.
qa-include/plugins/qa-widget-activity-count.php
View file @
ece829bf
...
...
@@ -49,12 +49,14 @@ class qa_activity_count
public
function
output_count
(
$themeobject
,
$value
,
$langsingular
,
$langplural
)
{
require_once
QA_INCLUDE_DIR
.
'app/format.php'
;
$themeobject
->
output
(
'<p class="qa-activity-count-item">'
);
if
(
$value
==
1
)
$themeobject
->
output
(
qa_lang_html_sub
(
$langsingular
,
'<span class="qa-activity-count-data">1</span>'
,
'1'
));
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>'
);
}
...
...
qa-plugin/wysiwyg-editor/qa-wysiwyg-editor.php
View file @
ece829bf
...
...
@@ -79,9 +79,9 @@ class qa_wysiwyg_editor
array
(
'id'
=>
'wysiwyg_editor_upload_max_size_display'
,
'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'
,
'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"'
,
),
),
...
...
@@ -215,16 +215,12 @@ class qa_wysiwyg_editor
);
}
else
{
// convert to text
$viewer
=
qa_load_module
(
'viewer'
,
''
);
return
array
(
'format'
=>
''
,
'content'
=>
$this
->
html_to_text
(
$html
),
);
}
}
else
{
}
else
{
// CKEditor was not loaded so treat it as plain text
return
array
(
'format'
=>
''
,
...
...
@@ -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
* 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
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment