diff --git a/alerts.php b/alerts.php index bfe4e60edb..af7c835061 100755 --- a/alerts.php +++ b/alerts.php @@ -102,6 +102,7 @@ function RunAlerts() { */ function ExtTransports($obj) { global $config; + $tmp = false; //To keep scrutinizer from naging because it doesnt understand eval foreach( $config['alert']['transports'] as $transport=>$opts ) { if( file_exists($config['install_dir']."/includes/alerts/transport.".$transport.".php") ) { echo $transport." => "; @@ -160,12 +161,11 @@ function FormatAlertTpl($tpl,$obj) { * @return array */ function DescribeAlert($alert) { - $tmp = array(); $obj = array(); + $i = 0; $device = dbFetchRow("SELECT hostname FROM devices WHERE device_id = ?",array($alert['device_id'])); $obj['hostname'] = $device['hostname']; $extra = $alert['details']; - $s = (sizeof($extra['rule']) > 1); if( $alert['state'] == 1 ) { $obj['title'] = 'Alert for device '.$device['hostname'].' Alert-ID #'.$alert['id']; foreach( $extra['rule'] as $incident ) { @@ -182,7 +182,6 @@ function DescribeAlert($alert) { return false; } $extra = json_decode(gzuncompress($id['details']),true); - $s = (sizeof($extra['rule']) > 1); $obj['title'] = 'Device '.$device['hostname'].' recovered from Alert-ID #'.$id['id']; $obj['elapsed'] = TimeFormat(strtotime($alert['time_logged'])-strtotime($id['time_logged'])); $obj['id'] = $id['id']; @@ -213,6 +212,7 @@ function TimeFormat($secs){ 'm' => $secs / 60 % 60, 's' => $secs % 60 ); + $ret = array(); foreach($bit as $k => $v){ if($v > 0) { $ret[] = $v . $k; diff --git a/includes/alerts.inc.php b/includes/alerts.inc.php index 565bb4cebf..ae985a36f3 100755 --- a/includes/alerts.inc.php +++ b/includes/alerts.inc.php @@ -111,7 +111,6 @@ function GetContacts($results) { $contacts = array(); $uids = array(); foreach( $results as $result ) { - $tmpa = array(); $tmp = NULL; if( is_numeric($result["port_id"]) ) { $tmpa = dbFetchRows("SELECT user_id FROM ports_perms WHERE access_level >= 0 AND port_id = ?",array($result["port_id"])); diff --git a/irc.php b/irc.php index 87c3d38363..913ba594c7 100755 --- a/irc.php +++ b/irc.php @@ -26,6 +26,8 @@ require_once("includes/discovery/functions.inc.php"); error_reporting(E_ERROR); class ircbot { + private $data = ""; + private $authd = array(); private $debug = false; private $server = ""; private $port = "";