PSR2 Cleanup: /html edition

Travis tests for code conformance. Ignore warnings for now.
Fixed all errors, left most warnings.
This commit is contained in:
Tony Murray
2016-08-18 20:28:22 -05:00
parent f0c82498b5
commit 8c639aa5a4
468 changed files with 6605 additions and 7629 deletions

View File

@@ -61,14 +61,14 @@ $notifications = new ObjCache('notifications');
<?php if (!isset($vars['archive'])) { ?>
<div class="container">
<?php
foreach ($notifications['sticky'] as $notif) {
if (is_numeric($notif['source'])) {
$notif['source'] = dbFetchCell('select username from users where user_id =?',array($notif['source']));
} ?>
foreach ($notifications['sticky'] as $notif) {
if (is_numeric($notif['source'])) {
$notif['source'] = dbFetchCell('select username from users where user_id =?', array($notif['source']));
} ?>
<div class="well">
<div class="row">
<div class="col-md-12">
<h4 class="text-warning" id="<?php echo $notif['notifications_id']; ?>"><strong><i class="fa fa-bell-o"></i>&nbsp;&nbsp;&nbsp;<?php echo $notif['title']; ?></strong>&nbsp;<span class="pull-right"><?php echo ($notif['user_id'] != $_SESSION['user_id'] ? '<code>Sticky by '.dbFetchCell('select username from users where user_id = ?',array($notif['user_id'])).'</code>' : '<button class="btn btn-primary fa fa-bell-slash-o unstick-notif" data-toggle="tooltip" data-placement="bottom" title="Remove Sticky" style="margin-top:-10px;"></button>'); ?></span></h4>
<h4 class="text-warning" id="<?php echo $notif['notifications_id']; ?>"><strong><i class="fa fa-bell-o"></i>&nbsp;&nbsp;&nbsp;<?php echo $notif['title']; ?></strong>&nbsp;<span class="pull-right"><?php echo ($notif['user_id'] != $_SESSION['user_id'] ? '<code>Sticky by '.dbFetchCell('select username from users where user_id = ?', array($notif['user_id'])).'</code>' : '<button class="btn btn-primary fa fa-bell-slash-o unstick-notif" data-toggle="tooltip" data-placement="bottom" title="Remove Sticky" style="margin-top:-10px;"></button>'); ?></span></h4>
</div>
</div>
<div class="row">
@@ -80,15 +80,15 @@ $notifications = new ObjCache('notifications');
</div>
</div>
</div>
<?php } ?>
<?php } ?>
<?php if ($notifications['sticky_count'] != 0) { ?>
<hr/>
<?php } ?>
<?php
foreach ($notifications['unread'] as $notif) {
if (is_numeric($notif['source'])) {
$notif['source'] = dbFetchCell('select username from users where user_id =?',array($notif['source']));
} ?>
foreach ($notifications['unread'] as $notif) {
if (is_numeric($notif['source'])) {
$notif['source'] = dbFetchCell('select username from users where user_id =?', array($notif['source']));
} ?>
<div class="well">
<div class="row">
<div class="col-md-12">
@@ -103,20 +103,20 @@ $notifications = new ObjCache('notifications');
<div class="row">
<div class="col-md-12">
<blockquote>
<p><?php echo preg_replace('/\\\n/','<br />', $notif['body']); ?></p>
<p><?php echo preg_replace('/\\\n/', '<br />', $notif['body']); ?></p>
<footer><?php echo $notif['datetime']; ?> | Source: <code><?php echo $notif['source']; ?></code></footer>
</blockquote>
</div>
</div>
</div>
<?php } ?>
<?php } ?>
<div class="row">
<div class="col-md-12">
<h3><a class="btn btn-default" href="notifications/archive/">Show Archive</a></h3>
</div>
</div>
</div>
<?php } else if (isset($vars['archive'])) { ?>
<?php } elseif (isset($vars['archive'])) { ?>
<div class="container">
<div class="row">
<div class="col-md-12">
@@ -127,13 +127,14 @@ $notifications = new ObjCache('notifications');
<div class="well">
<div class="row">
<div class="col-md-12">
<h4 id="<?php echo $notif['notifications_id']; ?>"><?php echo $notif['title']; echo ($_SESSION['userlevel'] == 10 ? '<span class="pull-right"><button class="btn btn-primary fa fa-bell-o stick-notif" data-toggle="tooltip" data-placement="bottom" title="Mark as Sticky" style="margin-top:-10px;"></button></span>' : ''); ?>
<h4 id="<?php echo $notif['notifications_id']; ?>"><?php echo $notif['title'];
echo ($_SESSION['userlevel'] == 10 ? '<span class="pull-right"><button class="btn btn-primary fa fa-bell-o stick-notif" data-toggle="tooltip" data-placement="bottom" title="Mark as Sticky" style="margin-top:-10px;"></button></span>' : ''); ?>
</div>
</div>
<div class="row">
<div class="col-md-12">
<blockquote>
<p><?php echo preg_replace('/\\\n/','<br />', $notif['body']); ?></p>
<p><?php echo preg_replace('/\\\n/', '<br />', $notif['body']); ?></p>
<footer><?php echo $notif['datetime']; ?> | Source: <code><?php echo $notif['source']; ?></code></footer>
</blockquote>
</div>