Update code in includes to be PSR-2 compliant (#4220)

refactor: Update code in /includes to be psr2 compliant #4220
This commit is contained in:
Tony Murray
2016-08-28 12:32:58 -05:00
committed by Neil Lathwood
parent 3c0fcdd46b
commit 9284bc60ff
373 changed files with 3509 additions and 3498 deletions

View File

@@ -10,8 +10,7 @@ if ($_SESSION['userlevel'] >= 5) {
$data['ignored'] = array('query' => "SELECT COUNT(*) FROM devices WHERE `ignore` = '1' AND `disabled` = '0'");
$data['disabled'] = array('query' => "SELECT COUNT(*) FROM devices WHERE `disabled` = '1'");
}
else {
} else {
$data['count'] = array(
'query' => 'SELECT COUNT(*) FROM devices AS D, devices_perms AS P WHERE P.`user_id` = ? AND P.`device_id` = D.`device_id`',
'params' => array($_SESSION['user_id']),

View File

@@ -44,4 +44,3 @@ $data['read'] = array(
'query' => 'select notifications.* from notifications inner join notifications_attribs on notifications.notifications_id = notifications_attribs.notifications_id where notifications_attribs.user_id = ? && ( notifications_attribs.key = "read" && notifications_attribs.value = 1) && not exists( select 1 from notifications_attribs where notifications.notifications_id = notifications_attribs.notifications_id and notifications_attribs.key = "sticky" && notifications_attribs.value = "1") order by notifications_attribs.attrib_id desc',
'params' => array( $_SESSION['user_id'] )
);

View File

@@ -12,8 +12,7 @@ if ($_SESSION['userlevel'] >= 5) {
$data['errored'] = array('query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE I.`deleted` = '0' AND D.`device_id` = I.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND (I.`ifInErrors_delta` > '0' OR I.`ifOutErrors_delta` > '0')");
$data['ignored'] = array('query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE I.`deleted` = '0' AND D.`device_id` = I.`device_id` AND (I.`ignore` = '1' OR D.`ignore` = '1')");
}
else {
} else {
$data['count'] = array(
'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D, devices_perms AS P WHERE I.`deleted` = '0' AND P.`user_id` = ? AND P.`device_id` = D.`device_id` AND I.`device_id` = D.`device_id`",
'params' => array($_SESSION['user_id']),

View File

@@ -6,8 +6,7 @@ if ($_SESSION['userlevel'] >= 5) {
$data['down'] = array( 'query' => "SELECT COUNT(*) FROM services WHERE `service_ignore` = '0' AND `service_disabled` = '0' AND `service_status` = '2'");
$data['ignored'] = array( 'query' => "SELECT COUNT(*) FROM services WHERE `service_ignore` = '1' AND `service_disabled` = '0'");
$data['disabled'] = array( 'query' => "SELECT COUNT(*) FROM services WHERE `service_disabled` = '1'");
}
else {
} else {
$data['count'] = array(
'query' => 'SELECT COUNT(*) FROM services AS S, devices AS D, devices_perms AS P WHERE P.`user_id` = ? AND P.`device_id` = D.`device_id` AND S.`device_id` = D.`device_id`',
'params' => array($_SESSION['user_id']),