summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
Diffstat (limited to 'it.class')
-rw-r--r--it.class16
1 files changed, 8 insertions, 8 deletions
diff --git a/it.class b/it.class
index 8b443dc..82789a4 100644
--- a/it.class
+++ b/it.class
@@ -105,7 +105,7 @@ static function log_line($name, $line)
@symlink($fullfn, $basefn);
}
- file_put_contents($fullfn, $line . "\n", FILE_APPEND);
+ it::file_put_contents($fullfn, $line . "\n", FILE_APPEND);
}
}
@@ -167,7 +167,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(@it::file_get_contents($GLOBALS['ULTRAHOME'] . "/.diffnotice")), array("\n"=>', '));
if (!$p['to'])
unset($p['to']); # allow defaults to kick in
$p += array(
@@ -192,8 +192,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)@it::file_get_contents($okfn) + 1;
+ it::file_put_contents($okfn, "$failcount\n");
if ($failcount != $p['failcount'] && $failcount != $p['failcount'] * 2)
return;
}
@@ -243,7 +243,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']);
+ it::file_put_contents($datafn = "/tmp/alertdata/error-" . substr(md5($p['body']), 0, 2), $p['body']);
$p['body'] = "Body: " . getenv('HOSTNAME') . ":$datafn";
}
@@ -738,7 +738,7 @@ static function imageconvert($p)
{
if (!(($imagetype = @exif_imagetype($p['in'])) && ($type = image_type_to_extension($imagetype, false))))
{
- if (@get_class(it_xml::create(fopen($p['in'], "r"), array('prefix' => "_imageconvert_", 'safety' => 0))) == "_imageconvert_svg")
+ if (@get_class(it_xml::create(it::fopen($p['in'], "r"), array('prefix' => "_imageconvert_", 'safety' => 0))) == "_imageconvert_svg")
$type = "svg"; # Accept SVG files if they are valid XML and root tag is svg
else
list(, $type) = explode(' ', strtolower(it::exec('identify 2>/dev/null {in}', $p))); # for things like eps
@@ -921,7 +921,7 @@ static function _stdin_next()
if ($result = $GLOBALS['it_stdin']['args'])
{
$GLOBALS['it_stdin']['filename'] = array_shift($GLOBALS['it_stdin']['args']);
- $GLOBALS['it_stdin']['fd'] = ($GLOBALS['it_stdin']['filename'] == "-") ? STDIN : @fopen($GLOBALS['it_stdin']['filename'], "r");
+ $GLOBALS['it_stdin']['fd'] = ($GLOBALS['it_stdin']['filename'] == "-") ? STDIN : @it::fopen($GLOBALS['it_stdin']['filename'], "r");
$GLOBALS['it_stdin']['line'] = 0;
}
@@ -1102,7 +1102,7 @@ static function file_put($filename, $data, $p = array())
@mkdir(dirname($filename));
$tmpfile = dirname($filename) . "/.it_put." . basename($filename) . "." . getmypid();
- if (($result = file_put_contents($filename == "-" ? "php://stdout" : $tmpfile, $data)) !== false && $filename != "-")
+ if (($result = it::file_put_contents($filename == "-" ? "php://stdout" : $tmpfile, $data)) !== false && $filename != "-")
$result = rename($tmpfile, $filename);
return $result;