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
577323fa
Commit
577323fa
authored
7 years ago
by
Scott
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pr/522' into 1.8
parents
2b444785
ee21db69
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
format.php
qa-include/app/format.php
+1
-1
upload.php
qa-include/app/upload.php
+1
-1
qa-base.php
qa-include/qa-base.php
+4
-2
qa-wysiwyg-editor.php
qa-plugin/wysiwyg-editor/qa-wysiwyg-editor.php
+2
-2
No files found.
qa-include/app/format.php
View file @
577323fa
...
@@ -1206,7 +1206,7 @@ function qa_html_page_links($request, $start, $pagesize, $count, $prevnext, $par
...
@@ -1206,7 +1206,7 @@ function qa_html_page_links($request, $start, $pagesize, $count, $prevnext, $par
if
(
qa_to_override
(
__FUNCTION__
))
{
$args
=
func_get_args
();
return
qa_call_override
(
__FUNCTION__
,
$args
);
}
if
(
qa_to_override
(
__FUNCTION__
))
{
$args
=
func_get_args
();
return
qa_call_override
(
__FUNCTION__
,
$args
);
}
$thispage
=
1
+
floor
(
$start
/
$pagesize
);
$thispage
=
1
+
floor
(
$start
/
$pagesize
);
$lastpage
=
ceil
(
min
(
$count
,
1
+
QA_MAX_LIMIT_START
)
/
$pagesize
);
$lastpage
=
ceil
(
min
(
(
int
)
$count
,
1
+
QA_MAX_LIMIT_START
)
/
$pagesize
);
if
(
$thispage
>
1
||
$lastpage
>
$thispage
)
{
if
(
$thispage
>
1
||
$lastpage
>
$thispage
)
{
$links
=
array
(
'label'
=>
qa_lang_html
(
'main/page_label'
),
'items'
=>
array
());
$links
=
array
(
'label'
=>
qa_lang_html
(
'main/page_label'
),
'items'
=>
array
());
...
...
This diff is collapsed.
Click to expand it.
qa-include/app/upload.php
View file @
577323fa
...
@@ -98,7 +98,7 @@ function qa_upload_file($localfilename, $sourcefilename, $maxfilesize = null, $o
...
@@ -98,7 +98,7 @@ function qa_upload_file($localfilename, $sourcefilename, $maxfilesize = null, $o
$maxfilesize
=
qa_get_max_upload_size
();
$maxfilesize
=
qa_get_max_upload_size
();
if
(
$filesize
<=
0
||
$filesize
>
$maxfilesize
)
{
// if file was too big for PHP, $filesize will be zero
if
(
$filesize
<=
0
||
$filesize
>
$maxfilesize
)
{
// if file was too big for PHP, $filesize will be zero
$result
[
'error'
]
=
qa_lang_sub
(
'main/max_upload_size_x'
,
qa_format_number
(
$maxfilesize
/
1048576
,
1
)
.
'MB'
);
$result
[
'error'
]
=
qa_lang_sub
(
'main/max_upload_size_x'
,
qa_format_number
(
$maxfilesize
/
pow
(
1024
,
2
)
,
1
)
.
'MB'
);
return
$result
;
return
$result
;
}
}
...
...
This diff is collapsed.
Click to expand it.
qa-include/qa-base.php
View file @
577323fa
...
@@ -1284,11 +1284,13 @@ function qa_post_limit_exceeded()
...
@@ -1284,11 +1284,13 @@ function qa_post_limit_exceeded()
*/
*/
function
convert_to_bytes
(
$unit
,
$value
)
function
convert_to_bytes
(
$unit
,
$value
)
{
{
$value
=
(
int
)
$value
;
switch
(
strtolower
(
$unit
))
{
switch
(
strtolower
(
$unit
))
{
case
'g'
:
case
'g'
:
return
$value
*
1073741824
;
return
$value
*
pow
(
1024
,
3
)
;
case
'm'
:
case
'm'
:
return
$value
*
1048576
;
return
$value
*
pow
(
1024
,
2
)
;
case
'k'
:
case
'k'
:
return
$value
*
1024
;
return
$value
*
1024
;
default
:
default
:
...
...
This diff is collapsed.
Click to expand it.
qa-plugin/wysiwyg-editor/qa-wysiwyg-editor.php
View file @
577323fa
...
@@ -113,9 +113,9 @@ class qa_wysiwyg_editor
...
@@ -113,9 +113,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 '
.
qa_html
(
qa_format_number
(
$this
->
bytes_to_mega
(
qa_get_max_upload_size
())
))
.
')'
,
'suffix'
=>
'MB (max '
.
qa_html
(
number_format
(
$this
->
bytes_to_mega
(
qa_get_max_upload_size
()),
1
))
.
')'
,
'type'
=>
'number'
,
'type'
=>
'number'
,
'value'
=>
qa_html
(
number_format
(
$this
->
bytes_to_mega
(
qa_opt
(
'wysiwyg_editor_upload_max_size'
)))),
'value'
=>
qa_html
(
number_format
(
$this
->
bytes_to_mega
(
qa_opt
(
'wysiwyg_editor_upload_max_size'
))
,
1
)),
'tags'
=>
'name="wysiwyg_editor_upload_max_size_field"'
,
'tags'
=>
'name="wysiwyg_editor_upload_max_size_field"'
,
),
),
...
...
This diff is collapsed.
Click to expand it.
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