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
2cae662a
Commit
2cae662a
authored
Sep 20, 2018
by
pupi1985
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix many phpcs complaints
parent
40f15d44
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10 additions
and
14 deletions
+10
-14
qa-config-example.php
qa-config-example.php
+0
-0
Usage.php
qa-include/Q2A/Util/Usage.php
+4
-4
admin-userfields.php
qa-include/pages/admin/admin-userfields.php
+0
-1
question-post.php
qa-include/pages/question-post.php
+0
-1
user-profile.php
qa-include/pages/user-profile.php
+0
-1
qa-widget-ask-box.php
qa-include/plugins/qa-widget-ask-box.php
+4
-4
qa-facebook-login.php
qa-plugin/facebook-login/qa-facebook-login.php
+2
-2
qa-mouseover-layer.php
qa-plugin/mouseover-layer/qa-mouseover-layer.php
+0
-1
No files found.
qa-config-example.php
View file @
2cae662a
qa-include/Q2A/Util/Usage.php
View file @
2cae662a
...
...
@@ -109,7 +109,7 @@ class Q2A_Util_Usage
$totaldelta
=
$this
->
delta
(
$this
->
startUsage
,
$this
->
getCurrent
());
$stages
=
$this
->
stages
;
$stages
[
'total'
]
=
$totaldelta
;
?>
?>
<style>
.debug-table
{
border-collapse
:
collapse
;
width
:
auto
;
margin
:
20px
auto
;
}
.debug-table
th
,
.debug-table
td
{
border
:
1px
solid
#aaa
;
background-color
:
#ddd
;
padding
:
5px
10px
;
}
...
...
@@ -155,7 +155,7 @@ class Q2A_Util_Usage
</tr>
</thead>
<tbody>
<?php
foreach
(
$stages
as
$stage
=>
$stagedelta
)
:
?>
<?php
foreach
(
$stages
as
$stage
=>
$stagedelta
)
:
?>
<tr>
<td
class=
"row-heading"
>
<?php
echo
ucfirst
(
$stage
);
?>
</td>
<td>
<?php
echo
sprintf
(
'%.1f'
,
$stagedelta
[
'clock'
]
*
1000
);
?>
</td>
...
...
@@ -171,7 +171,7 @@ class Q2A_Util_Usage
<td>
<?php
echo
sprintf
(
'%dk'
,
$stagedelta
[
'ram'
]
/
1024
);
?>
</td>
<td>
<?php
echo
sprintf
(
'%d%%'
,
$stagedelta
[
'ram'
]
?
(
$stagedelta
[
'ram'
]
*
100
/
$totaldelta
[
'ram'
])
:
0
);
?>
</td>
</tr>
<?php
endforeach
;
?>
<?php
endforeach
;
?>
</tbody>
</table>
...
...
@@ -190,7 +190,7 @@ class Q2A_Util_Usage
</tr>
</tbody>
</table>
<?php
<?php
}
...
...
qa-include/pages/admin/admin-userfields.php
View file @
2cae662a
...
...
@@ -100,7 +100,6 @@ elseif (qa_clicked('dosavefield')) {
}
}
elseif
(
empty
(
$errors
))
{
// creating a new user field
for
(
$attempt
=
0
;
$attempt
<
1000
;
$attempt
++
)
{
$suffix
=
$attempt
?
(
'-'
.
(
1
+
$attempt
))
:
''
;
$newtag
=
qa_substr
(
implode
(
'-'
,
qa_string_to_words
(
$inname
)),
0
,
QA_DB_MAX_PROFILE_TITLE_LENGTH
-
strlen
(
$suffix
))
.
$suffix
;
...
...
qa-include/pages/question-post.php
View file @
2cae662a
...
...
@@ -809,7 +809,6 @@ function qa_page_q_edit_a_submit($answer, $question, $answers, $commentsfollows,
((
$in
[
'commenton'
]
!=
$answerid
)
&&
@
$answers
[
$in
[
'commenton'
]][
'commentable'
])
)
)
{
// convert to a comment
if
(
qa_user_limits_remaining
(
QA_LIMIT_COMMENTS
))
{
// already checked 'permit_post_c'
qa_answer_to_comment
(
$answer
,
$in
[
'commenton'
],
$in
[
'content'
],
$in
[
'format'
],
$in
[
'text'
],
$setnotify
,
$userid
,
$handle
,
$cookieid
,
$question
,
$answers
,
$commentsfollows
,
@
$in
[
'name'
],
$in
[
'queued'
],
$in
[
'silent'
]);
...
...
qa-include/pages/user-profile.php
View file @
2cae662a
...
...
@@ -89,7 +89,6 @@ if (!QA_FINAL_EXTERNAL_USERS) { // if we're using integrated user management, we
(
$loginlevel
>=
QA_USER_LEVEL_SUPER
||
$loginlevel
>
$maxuserlevel
)
&&
!
qa_user_permit_error
()
)
{
// can't change self - or someone on your level (or higher, obviously) unless you're a super admin
if
(
$loginlevel
>=
QA_USER_LEVEL_SUPER
)
$maxlevelassign
=
QA_USER_LEVEL_SUPER
;
elseif
(
$loginlevel
>=
QA_USER_LEVEL_ADMIN
)
...
...
qa-include/plugins/qa-widget-ask-box.php
View file @
2cae662a
...
...
@@ -42,7 +42,7 @@ class qa_ask_box
else
$params
=
null
;
?>
?>
<div
class=
"qa-ask-box"
>
<form
method=
"post"
action=
"
<?php
echo
qa_path_html
(
'ask'
,
$params
);
?>
"
>
<table
class=
"qa-form-tall-table"
style=
"width:100%"
>
...
...
@@ -50,10 +50,10 @@ class qa_ask_box
<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
;
?>
<?php
endif
;
?>
<td
class=
"qa-form-tall-data"
style=
"padding:8px;"
>
<input
name=
"title"
type=
"text"
class=
"qa-form-tall-text"
style=
"width:95%;"
>
</td>
...
...
@@ -62,6 +62,6 @@ class qa_ask_box
<input
type=
"hidden"
name=
"doask1"
value=
"1"
>
</form>
</div>
<?php
<?php
}
}
qa-plugin/facebook-login/qa-facebook-login.php
View file @
2cae662a
...
...
@@ -57,7 +57,7 @@ class qa_facebook_login
else
$size
=
'medium'
;
?>
?>
<span
id=
"fb-root"
style=
"display:inline;"
></span>
<script>
window
.
fbAsyncInit
=
function
()
{
...
...
@@ -82,7 +82,7 @@ class qa_facebook_login
</script>
<span
class=
"fb-login-button"
style=
"display:inline; vertical-align:middle;"
size=
"
<?php
echo
$size
?>
"
<?php
echo
$logout
?
'autologoutlink="true"'
:
'scope="email,user_about_me,user_location,user_website"'
?>
>
</span>
<?php
<?php
}
...
...
qa-plugin/mouseover-layer/qa-mouseover-layer.php
View file @
2cae662a
...
...
@@ -25,7 +25,6 @@ class qa_html_theme_layer extends qa_html_theme_base
public
function
q_list
(
$q_list
)
{
if
(
!
empty
(
$q_list
[
'qs'
])
&&
qa_opt
(
'mouseover_content_on'
))
{
// first check it is not an empty list and the feature is turned on
// Collect the question ids of all items in the question list (so we can do this in one DB query)
$postids
=
array
();
...
...
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