diff options
-rw-r--r-- | it.class | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -170,7 +170,7 @@ static function error($p = array()) else $url = $_SERVER['SCRIPT_NAME'] . " " . join(" ", array_slice($GLOBALS['argv'], 1)) . " (pwd " . $_SERVER['PWD'] . ")"; - $gods = strtr(trim(@file_get_contents($GLOBALS['ULTRAHOME'] . "/.diffnotice")), array("\n"=>', ')); + $gods = strtr(trim(@file_get_contents($GLOBALS['ULTRAHOME'] . "/.diffnotice")), array("\n"=>', ')); # NOPHPLINT if (!$p['to']) unset($p['to']); # allow defaults to kick in $p += array( @@ -195,8 +195,8 @@ static function error($p = array()) if ($p['okstate']) { list($okfn, $okstatus) = explode("=", "/tmp/alertdata/okstate_" . $p['okstate']); - $failcount = $okstatus ? 0 : (int)@file_get_contents($okfn) + 1; - file_put_contents($okfn, "$failcount\n"); + $failcount = $okstatus ? 0 : (int)@file_get_contents($okfn) + 1; # NOPHPLINT + file_put_contents($okfn, "$failcount\n"); # NOPHPLINT if ($failcount != $p['failcount'] && $failcount != $p['failcount'] * 2) return; } @@ -249,7 +249,7 @@ static function error($p = array()) $p['body'] = is_string($p['body']) || !array_key_exists('body', $p) ? $p['body'] : var_export($p['body'], true); if (strlen($p['body']) > 500000) { - file_put_contents($datafn = "/tmp/alertdata/error-" . substr(md5($p['body']), 0, 2), $p['body']); + file_put_contents($datafn = "/tmp/alertdata/error-" . substr(md5($p['body']), 0, 2), $p['body']); # NOPHPLINT $p['body'] = "Body: " . getenv('HOSTNAME') . ":$datafn"; } @@ -1178,27 +1178,27 @@ static function safe_filename($filename) static function file_get_contents($filename, $use_include_path = false, $context = null, $offset = 0) { - return file_get_contents(it::safe_filename($filename), $use_include_path, $context, $offset); + return file_get_contents(it::safe_filename($filename), $use_include_path, $context, $offset); # NOPHPLINT } static function file_put_contents($filename, $data, $flags = 0, $resource = null) { - return file_put_contents(it::safe_filename($filename), $data, $flags, $resource); + return file_put_contents(it::safe_filename($filename), $data, $flags, $resource); # NOPHPLINT } static function fopen($filename, $mode, $use_include_path = false) { - return fopen(it::safe_filename($filename), $mode, $use_include_path); + return fopen(it::safe_filename($filename), $mode, $use_include_path); # NOPHPLINT } static function file($filename, $flags = 0, $context = null) { - return file(it::safe_filename($filename), $flags, $context); + return file(it::safe_filename($filename), $flags, $context); # NOPHPLINT } static function readfile($filename, $use_include_path = false, $context = null) { - return readfile(it::safe_filename($filename), $use_include_path, $context); + return readfile(it::safe_filename($filename), $use_include_path, $context); # NOPHPLINT } } |