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
cd3bee1d
Commit
cd3bee1d
authored
Jul 31, 2020
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coding style
parent
41939057
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
18 deletions
+24
-18
categories.php
qa-include/pages/categories.php
+1
-1
qa-widget-ask-box.php
qa-include/plugins/qa-widget-ask-box.php
+2
-2
qa-tag-cloud-lang-default.php
qa-plugin/tag-cloud-widget/qa-tag-cloud-lang-default.php
+1
-1
qa-wysiwyg-editor.php
qa-plugin/wysiwyg-editor/qa-wysiwyg-editor.php
+1
-1
Categories.php
qa-src/Controllers/Admin/Categories.php
+5
-5
UserProfile.php
qa-src/Controllers/User/UserProfile.php
+1
-1
Usage.php
qa-src/Util/Usage.php
+3
-3
ruleset-strict.xml
qa-tests/phpcs/ruleset-strict.xml
+6
-0
qa-theme.php
qa-theme/Snow/qa-theme.php
+4
-4
No files found.
qa-include/pages/categories.php
View file @
cd3bee1d
...
...
@@ -66,7 +66,7 @@ function qa_category_nav_to_browse(&$navigation, $categories, $categoryid, $favo
}
$navigation
[
$key
][
'note'
]
=
' - <a href="'
.
qa_path_html
(
'questions/'
.
implode
(
'/'
,
array_reverse
(
explode
(
'/'
,
$category
[
'backpath'
]))))
.
'">'
.
(
(
$category
[
'qcount'
]
==
1
)
' - <a href="'
.
qa_path_html
(
'questions/'
.
implode
(
'/'
,
array_reverse
(
explode
(
'/'
,
$category
[
'backpath'
]))))
.
'">'
.
(
(
$category
[
'qcount'
]
==
1
)
?
qa_lang_html_sub
(
'main/1_question'
,
'1'
,
'1'
)
:
qa_lang_html_sub
(
'main/x_questions'
,
number_format
(
$category
[
'qcount'
]))
)
.
'</a>'
;
...
...
qa-include/plugins/qa-widget-ask-box.php
View file @
cd3bee1d
...
...
@@ -47,10 +47,10 @@ class qa_ask_box
<form
method=
"post"
action=
"
<?php
echo
qa_path_html
(
'ask'
,
$params
);
?>
"
>
<table
class=
"qa-form-tall-table"
style=
"width:100%"
>
<tr
style=
"vertical-align:middle;"
>
<td
class=
"qa-form-tall-label"
style=
"width: 1px; padding:8px; white-space:nowrap;
<?php
echo
(
$region
==
'side'
)
?
'padding-bottom:0;'
:
'text-align:right;'
?>
"
>
<td
class=
"qa-form-tall-label"
style=
"width: 1px; padding:8px; white-space:nowrap;
<?php
echo
(
$region
==
'side'
)
?
'padding-bottom:0;'
:
'text-align:right;'
?>
"
>
<?php
echo
strtr
(
qa_lang_html
(
'question/ask_title'
),
array
(
' '
=>
' '
))
?>
:
</td>
<?php
if
(
$region
==
'side'
)
:
?>
<?php
if
(
$region
==
'side'
)
:
?>
</tr>
<tr>
<?php
endif
;
?>
...
...
qa-plugin/tag-cloud-widget/qa-tag-cloud-lang-default.php
View file @
cd3bee1d
...
...
@@ -23,7 +23,7 @@ return array(
'biggest_font_size'
=>
'Biggest font size:'
,
'font_size_popularity'
=>
'Font size represents tag popularity'
,
'max_tags'
=>
'Maximum tags to show:'
,
'pixels'
=>
'pixels'
,
'pixels'
=>
'pixels'
,
'smallest_font_size'
=>
'Smallest allowed font size:'
,
'tags'
=>
'tags'
,
);
qa-plugin/wysiwyg-editor/qa-wysiwyg-editor.php
View file @
cd3bee1d
...
...
@@ -48,7 +48,7 @@ class qa_wysiwyg_editor
if
(
qa_clicked
(
'wysiwyg_editor_save_button'
))
{
qa_opt
(
'wysiwyg_editor_upload_images'
,
(
int
)
qa_post_text
(
'wysiwyg_editor_upload_images_field'
));
qa_opt
(
'wysiwyg_editor_upload_all'
,
(
int
)
qa_post_text
(
'wysiwyg_editor_upload_all_field'
));
qa_opt
(
'wysiwyg_editor_upload_max_size'
,
min
(
qa_get_max_upload_size
(),
1048576
*
(
float
)
qa_post_text
(
'wysiwyg_editor_upload_max_size_field'
)));
qa_opt
(
'wysiwyg_editor_upload_max_size'
,
min
(
qa_get_max_upload_size
(),
1048576
*
(
float
)
qa_post_text
(
'wysiwyg_editor_upload_max_size_field'
)));
$saved
=
true
;
}
...
...
qa-src/Controllers/Admin/Categories.php
View file @
cd3bee1d
...
...
@@ -224,9 +224,9 @@ class Categories extends BaseController
qa_report_event
(
'cat_edit'
,
qa_get_logged_in_userid
(),
qa_get_logged_in_handle
(),
qa_cookie_get
(),
array
(
'categoryid'
=>
$editcategory
[
'categoryid'
],
'parentid'
=>
isset
(
$inparentid
)
?
$inparentid
:
null
,
'content'
=>
isset
(
$incontent
)
?
$incontent
:
null
,
'position'
=>
isset
(
$inposition
)
?
$inposition
:
null
,
'parentid'
=>
isset
(
$inparentid
)
?
$inparentid
:
null
,
'content'
=>
isset
(
$incontent
)
?
$incontent
:
null
,
'position'
=>
isset
(
$inposition
)
?
$inposition
:
null
,
'name'
=>
$inname
,
'slug'
=>
$inslug
,
));
...
...
@@ -243,8 +243,8 @@ class Categories extends BaseController
qa_report_event
(
'cat_new'
,
qa_get_logged_in_userid
(),
qa_get_logged_in_handle
(),
qa_cookie_get
(),
array
(
'categoryid'
=>
$categoryid
,
'parentid'
=>
$inparentid
,
'content'
=>
isset
(
$incontent
)
?
$incontent
:
null
,
'position'
=>
isset
(
$inposition
)
?
$inposition
:
null
,
'content'
=>
isset
(
$incontent
)
?
$incontent
:
null
,
'position'
=>
isset
(
$inposition
)
?
$inposition
:
null
,
'name'
=>
$inname
,
'slug'
=>
$inslug
,
));
...
...
qa-src/Controllers/User/UserProfile.php
View file @
cd3bee1d
...
...
@@ -506,7 +506,7 @@ class UserProfile extends BaseController
foreach
(
$userlevels
as
$userlevel
)
{
if
(
$userlevel
[
'entitytype'
]
==
QA_ENTITY_CATEGORY
)
{
$index
++
;
$id
=
'ls_'
.
+
$index
;
$id
=
'ls_'
.
(
+
$index
)
;
$qa_content
[
'form_profile'
][
'fields'
][
'uc_'
.
$index
.
'_level'
]
=
array
(
'label'
=>
qa_lang_html
(
'users/category_level_label'
),
...
...
qa-src/Util/Usage.php
View file @
cd3bee1d
...
...
@@ -35,7 +35,7 @@ class Usage
public
function
__construct
()
{
$this
->
stages
=
array
();
$this
->
databaseUsage
=
array
(
'queries'
=>
0
,
'clock'
=>
0
);
$this
->
databaseUsage
=
array
(
'queries'
=>
0
,
'clock'
=>
0
);
$this
->
databaseQueryLog
=
''
;
$this
->
prevUsage
=
$this
->
startUsage
=
$this
->
getCurrent
();
...
...
@@ -99,7 +99,7 @@ class Usage
$rowcolstring
.=
' - '
.
$gotcolumns
.
(
$gotcolumns
==
1
?
' column'
:
' columns'
);
}
$this
->
databaseQueryLog
.=
$query
.
"
\n\n
"
.
sprintf
(
'%.2f ms'
,
$usedtime
*
1000
)
.
$rowcolstring
.
"
\n\n
"
;
$this
->
databaseQueryLog
.=
$query
.
"
\n\n
"
.
sprintf
(
'%.2f ms'
,
$usedtime
*
1000
)
.
$rowcolstring
.
"
\n\n
"
;
}
$this
->
databaseUsage
[
'queries'
]
++
;
...
...
@@ -210,7 +210,7 @@ class Usage
$delta
=
array
();
foreach
(
$newusage
as
$key
=>
$value
)
{
$delta
[
$key
]
=
max
(
0
,
$value
-
@
$oldusage
[
$key
]);
$delta
[
$key
]
=
max
(
0
,
$value
-
@
$oldusage
[
$key
]);
}
return
$delta
;
...
...
qa-tests/phpcs/ruleset-strict.xml
View file @
cd3bee1d
...
...
@@ -32,6 +32,12 @@
</properties>
</rule>
<rule
ref=
"Squiz.WhiteSpace.OperatorSpacing"
>
<properties>
<property
name=
"ignoreNewlines"
value=
"true"
/>
</properties>
</rule>
<!-- Not part of normal usage, but kept for testing (default severity = 5) -->
<rule
ref=
"Squiz.Commenting.FunctionComment"
>
<severity>
0
</severity>
...
...
qa-theme/Snow/qa-theme.php
View file @
cd3bee1d
...
...
@@ -51,9 +51,9 @@ class qa_html_theme extends qa_html_theme_base
qa_html_theme_base
::
logged_in
();
if
(
qa_is_logged_in
())
{
// adds points count after logged in username
$userpoints
=
qa_get_logged_in_points
();
$userpoints
=
qa_get_logged_in_points
();
$pointshtml
=
(
$userpoints
==
1
)
$pointshtml
=
(
$userpoints
==
1
)
?
qa_lang_html_sub
(
'main/1_point'
,
'1'
,
'1'
)
:
qa_lang_html_sub
(
'main/x_points'
,
qa_html
(
qa_format_number
(
$userpoints
)));
...
...
@@ -102,7 +102,7 @@ class qa_html_theme extends qa_html_theme_base
// removes sidebar for user profile pages
public
function
sidepanel
()
{
if
(
$this
->
template
!=
'user'
)
if
(
$this
->
template
!=
'user'
)
qa_html_theme_base
::
sidepanel
();
}
...
...
@@ -140,7 +140,7 @@ class qa_html_theme extends qa_html_theme_base
// prevent display of view count in the usual place
public
function
view_count
(
$q_item
)
{
if
(
$this
->
template
==
'question'
)
if
(
$this
->
template
==
'question'
)
qa_html_theme_base
::
view_count
(
$q_item
);
}
...
...
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