Commit 7c6b6de0 by Scott

Coding style (strict)

parent 6b0c8daf
...@@ -51,7 +51,6 @@ class UserProfile extends \Q2A\Controllers\BaseController ...@@ -51,7 +51,6 @@ class UserProfile extends \Q2A\Controllers\BaseController
$usershtml = qa_get_users_html(array($userid), false, qa_path_to_root(), true); $usershtml = qa_get_users_html(array($userid), false, qa_path_to_root(), true);
$userhtml = @$usershtml[$userid]; $userhtml = @$usershtml[$userid];
} else } else
$userhtml = qa_html($handle); $userhtml = qa_html($handle);
...@@ -266,10 +265,9 @@ class UserProfile extends \Q2A\Controllers\BaseController ...@@ -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_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'); $errors['page'] = qa_lang_html('misc/form_security_again');
} else {
else {
if ($approvebutton && qa_clicked('doapprove')) { if ($approvebutton && qa_clicked('doapprove')) {
require_once QA_INCLUDE_DIR . 'app/users-edit.php'; require_once QA_INCLUDE_DIR . 'app/users-edit.php';
qa_set_user_level($userid, $useraccount['handle'], QA_USER_LEVEL_APPROVED, $useraccount['level']); qa_set_user_level($userid, $useraccount['handle'], QA_USER_LEVEL_APPROVED, $useraccount['level']);
...@@ -537,7 +535,6 @@ class UserProfile extends \Q2A\Controllers\BaseController ...@@ -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();"'; $qa_content['form_profile']['fields']['level']['tags'] .= ' id="level_select" onchange="qa_update_category_levels();"';
} }
} }
} else { } else {
foreach ($userlevels as $userlevel) { foreach ($userlevels as $userlevel) {
if ($userlevel['entitytype'] == QA_ENTITY_CATEGORY && $userlevel['level'] > $useraccount['level']) { if ($userlevel['entitytype'] == QA_ENTITY_CATEGORY && $userlevel['level'] > $useraccount['level']) {
...@@ -705,7 +702,6 @@ class UserProfile extends \Q2A\Controllers\BaseController ...@@ -705,7 +702,6 @@ class UserProfile extends \Q2A\Controllers\BaseController
'dosave' => '1', 'dosave' => '1',
'code' => qa_get_form_security_code('user-edit-' . $handle), 'code' => qa_get_form_security_code('user-edit-' . $handle),
); );
} elseif ($usereditbutton) { } elseif ($usereditbutton) {
$qa_content['form_profile']['buttons'] = array(); $qa_content['form_profile']['buttons'] = array();
...@@ -741,7 +737,6 @@ class UserProfile extends \Q2A\Controllers\BaseController ...@@ -741,7 +737,6 @@ class UserProfile extends \Q2A\Controllers\BaseController
'label' => qa_lang_html('users/delete_user_button'), 'label' => qa_lang_html('users/delete_user_button'),
); );
} }
} else { } else {
$qa_content['form_profile']['buttons']['block'] = array( $qa_content['form_profile']['buttons']['block'] = array(
'tags' => 'name="doblock"', 'tags' => 'name="doblock"',
...@@ -753,7 +748,6 @@ class UserProfile extends \Q2A\Controllers\BaseController ...@@ -753,7 +748,6 @@ class UserProfile extends \Q2A\Controllers\BaseController
'code' => qa_get_form_security_code('user-' . $handle), 'code' => qa_get_form_security_code('user-' . $handle),
); );
} }
} elseif (isset($loginuserid) && ($loginuserid == $userid)) { } elseif (isset($loginuserid) && ($loginuserid == $userid)) {
$qa_content['form_profile']['buttons'] = array( $qa_content['form_profile']['buttons'] = array(
'account' => array( 'account' => array(
...@@ -834,7 +828,6 @@ class UserProfile extends \Q2A\Controllers\BaseController ...@@ -834,7 +828,6 @@ class UserProfile extends \Q2A\Controllers\BaseController
$qa_content['form_activity']['hidden'] = array( $qa_content['form_activity']['hidden'] = array(
'code' => qa_get_form_security_code('user-activity-' . $handle), 'code' => qa_get_form_security_code('user-activity-' . $handle),
); );
} else { } else {
unset($qa_content['form_activity']['fields']['bonus']); unset($qa_content['form_activity']['fields']['bonus']);
} }
......
...@@ -63,7 +63,6 @@ class Email ...@@ -63,7 +63,6 @@ class Email
if ($needemail) { if ($needemail) {
$email = qa_get_user_email($userid); $email = qa_get_user_email($userid);
} }
} elseif ($needemail || $needhandle) { } elseif ($needemail || $needhandle) {
$useraccount = qa_db_select_with_pending( $useraccount = qa_db_select_with_pending(
array( array(
......
...@@ -31,7 +31,6 @@ class RecalcPointsRecalc extends AbstractStep ...@@ -31,7 +31,6 @@ class RecalcPointsRecalc extends AbstractStep
$lastuserid = $userids[$recalccount - 1]; $lastuserid = $userids[$recalccount - 1];
qa_db_users_recalc_points($this->state->next, $lastuserid); qa_db_users_recalc_points($this->state->next, $lastuserid);
$this->state->done += $recalccount; $this->state->done += $recalccount;
} else { } else {
$lastuserid = $this->state->next; // for truncation $lastuserid = $this->state->next; // for truncation
} }
......
...@@ -51,7 +51,6 @@ class CacheFactory ...@@ -51,7 +51,6 @@ class CacheFactory
self::$cacheDriver = new FileCacheDriver($config); self::$cacheDriver = new FileCacheDriver($config);
break; break;
} }
} }
return self::$cacheDriver; return self::$cacheDriver;
......
...@@ -8,15 +8,13 @@ ...@@ -8,15 +8,13 @@
<exclude-pattern>qa-plugin/facebook-login/facebook.php</exclude-pattern> <exclude-pattern>qa-plugin/facebook-login/facebook.php</exclude-pattern>
<exclude-pattern>qa-plugin/facebook-login/base_facebook.php</exclude-pattern> <exclude-pattern>qa-plugin/facebook-login/base_facebook.php</exclude-pattern>
<rule ref="PSR1"> <rule ref="PSR1"/>
</rule>
<rule ref="PSR2"> <rule ref="PSR2">
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/> <exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
<exclude name="Generic.Files.LineLength.TooLong"/> <exclude name="Generic.Files.LineLength.TooLong"/>
<exclude name="Generic.ControlStructures.InlineControlStructure"/> <exclude name="Generic.ControlStructures.InlineControlStructure"/>
<exclude name="Squiz.ControlStructures.ControlSignature"/> <!-- doesn't work without above rule --> <exclude name="Squiz.ControlStructures.ControlSignature"/> <!-- doesn't work without above rule -->
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose"/>
</rule> </rule>
<arg name="tab-width" value="4"/> <arg name="tab-width" value="4"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment