Commit 2cae662a by pupi1985

Fix many phpcs complaints

parent 40f15d44
......@@ -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
}
......
......@@ -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;
......
......@@ -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']);
......
......@@ -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)
......
......@@ -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(' ' => '&nbsp;'))?>:
</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
}
}
......@@ -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
}
......
......@@ -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();
......
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