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
7c6b6de0
Commit
7c6b6de0
authored
Jan 14, 2019
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coding style (strict)
parent
6b0c8daf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
15 deletions
+3
-15
UserProfile.php
qa-src/Controllers/User/UserProfile.php
+2
-9
Email.php
qa-src/Notifications/Email.php
+0
-1
RecalcPointsRecalc.php
qa-src/Recalc/RecalcPointsRecalc.php
+0
-1
CacheFactory.php
qa-src/Storage/CacheFactory.php
+0
-1
ruleset-strict.xml
qa-tests/phpcs/ruleset-strict.xml
+1
-3
No files found.
qa-src/Controllers/User/UserProfile.php
View file @
7c6b6de0
...
...
@@ -51,7 +51,6 @@ class UserProfile extends \Q2A\Controllers\BaseController
$usershtml
=
qa_get_users_html
(
array
(
$userid
),
false
,
qa_path_to_root
(),
true
);
$userhtml
=
@
$usershtml
[
$userid
];
}
else
$userhtml
=
qa_html
(
$handle
);
...
...
@@ -266,10 +265,9 @@ class UserProfile extends \Q2A\Controllers\BaseController
}
if
(
qa_clicked
(
'doapprove'
)
||
qa_clicked
(
'doblock'
)
||
qa_clicked
(
'dounblock'
)
||
qa_clicked
(
'dohideall'
)
||
qa_clicked
(
'dodelete'
))
{
if
(
!
qa_check_form_security_code
(
'user-'
.
$handle
,
qa_post_text
(
'code'
)))
if
(
!
qa_check_form_security_code
(
'user-'
.
$handle
,
qa_post_text
(
'code'
)))
{
$errors
[
'page'
]
=
qa_lang_html
(
'misc/form_security_again'
);
else
{
}
else
{
if
(
$approvebutton
&&
qa_clicked
(
'doapprove'
))
{
require_once
QA_INCLUDE_DIR
.
'app/users-edit.php'
;
qa_set_user_level
(
$userid
,
$useraccount
[
'handle'
],
QA_USER_LEVEL_APPROVED
,
$useraccount
[
'level'
]);
...
...
@@ -537,7 +535,6 @@ class UserProfile extends \Q2A\Controllers\BaseController
$qa_content
[
'form_profile'
][
'fields'
][
'level'
][
'tags'
]
.=
' id="level_select" onchange="qa_update_category_levels();"'
;
}
}
}
else
{
foreach
(
$userlevels
as
$userlevel
)
{
if
(
$userlevel
[
'entitytype'
]
==
QA_ENTITY_CATEGORY
&&
$userlevel
[
'level'
]
>
$useraccount
[
'level'
])
{
...
...
@@ -705,7 +702,6 @@ class UserProfile extends \Q2A\Controllers\BaseController
'dosave'
=>
'1'
,
'code'
=>
qa_get_form_security_code
(
'user-edit-'
.
$handle
),
);
}
elseif
(
$usereditbutton
)
{
$qa_content
[
'form_profile'
][
'buttons'
]
=
array
();
...
...
@@ -741,7 +737,6 @@ class UserProfile extends \Q2A\Controllers\BaseController
'label'
=>
qa_lang_html
(
'users/delete_user_button'
),
);
}
}
else
{
$qa_content
[
'form_profile'
][
'buttons'
][
'block'
]
=
array
(
'tags'
=>
'name="doblock"'
,
...
...
@@ -753,7 +748,6 @@ class UserProfile extends \Q2A\Controllers\BaseController
'code'
=>
qa_get_form_security_code
(
'user-'
.
$handle
),
);
}
}
elseif
(
isset
(
$loginuserid
)
&&
(
$loginuserid
==
$userid
))
{
$qa_content
[
'form_profile'
][
'buttons'
]
=
array
(
'account'
=>
array
(
...
...
@@ -834,7 +828,6 @@ class UserProfile extends \Q2A\Controllers\BaseController
$qa_content
[
'form_activity'
][
'hidden'
]
=
array
(
'code'
=>
qa_get_form_security_code
(
'user-activity-'
.
$handle
),
);
}
else
{
unset
(
$qa_content
[
'form_activity'
][
'fields'
][
'bonus'
]);
}
...
...
qa-src/Notifications/Email.php
View file @
7c6b6de0
...
...
@@ -63,7 +63,6 @@ class Email
if
(
$needemail
)
{
$email
=
qa_get_user_email
(
$userid
);
}
}
elseif
(
$needemail
||
$needhandle
)
{
$useraccount
=
qa_db_select_with_pending
(
array
(
...
...
qa-src/Recalc/RecalcPointsRecalc.php
View file @
7c6b6de0
...
...
@@ -31,7 +31,6 @@ class RecalcPointsRecalc extends AbstractStep
$lastuserid
=
$userids
[
$recalccount
-
1
];
qa_db_users_recalc_points
(
$this
->
state
->
next
,
$lastuserid
);
$this
->
state
->
done
+=
$recalccount
;
}
else
{
$lastuserid
=
$this
->
state
->
next
;
// for truncation
}
...
...
qa-src/Storage/CacheFactory.php
View file @
7c6b6de0
...
...
@@ -51,7 +51,6 @@ class CacheFactory
self
::
$cacheDriver
=
new
FileCacheDriver
(
$config
);
break
;
}
}
return
self
::
$cacheDriver
;
...
...
qa-tests/phpcs/ruleset-strict.xml
View file @
7c6b6de0
...
...
@@ -8,15 +8,13 @@
<exclude-pattern>
qa-plugin/facebook-login/facebook.php
</exclude-pattern>
<exclude-pattern>
qa-plugin/facebook-login/base_facebook.php
</exclude-pattern>
<rule
ref=
"PSR1"
>
</rule>
<rule
ref=
"PSR1"
/>
<rule
ref=
"PSR2"
>
<exclude
name=
"Generic.WhiteSpace.DisallowTabIndent"
/>
<exclude
name=
"Generic.Files.LineLength.TooLong"
/>
<exclude
name=
"Generic.ControlStructures.InlineControlStructure"
/>
<exclude
name=
"Squiz.ControlStructures.ControlSignature"
/>
<!-- doesn't work without above rule -->
<exclude
name=
"Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose"
/>
</rule>
<arg
name=
"tab-width"
value=
"4"
/>
...
...
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