summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_url.class')
-rw-r--r--it_url.class8
1 files changed, 4 insertions, 4 deletions
diff --git a/it_url.class b/it_url.class
index d3aa6df..8a78075 100644
--- a/it_url.class
+++ b/it_url.class
@@ -447,7 +447,7 @@ function get_cache($p = array())
{
$newfile = it_url::_atomicwrite($path, $result);
if ($p['returnheaders'])
- it::file_put_contents("$path.headers", '<?php return ' . var_export($url->headers, true) . ";\n");
+ file_put_contents("$path.headers", '<?php return ' . var_export($url->headers, true) . ";\n");
}
else if ($p['keepfailed'])
$result = $fileexists;
@@ -541,7 +541,7 @@ function get_cache($p = array())
*/
function get_cache_contents($p)
{
- return ($fn = self::get_cache($p)) ? it::file_get_contents($fn) : it::error((array)$p['it_error'] + ['title' => $p['safety'] == 0 ? false : "failed getting " . it_url::absolute($p['url']), 'body' => $p]);
+ return ($fn = self::get_cache($p)) ? file_get_contents($fn) : it::error((array)$p['it_error'] + ['title' => $p['safety'] == 0 ? false : "failed getting " . it_url::absolute($p['url']), 'body' => $p]);
}
/**
@@ -573,7 +573,7 @@ static function _expired($path, $maxage)
static function _lock($path)
{
$force = EDC('nocache') || (($mtime = @filemtime("$path.lock")) && (time() - $mtime > 30)); # expire forgotten locks
- return @it::fopen("$path.lock", $force ? "w" : "x");
+ return @fopen("$path.lock", $force ? "w" : "x");
}
/**
@@ -625,7 +625,7 @@ static function _atomicwrite($path, $data)
else if ($data !== false)
{
$tmpname = tempnam(dirname($path), "writetmp");
- fputs($cachetmp = it::fopen($tmpname, "w"), $data);
+ fputs($cachetmp = fopen($tmpname, "w"), $data);
fclose($cachetmp);
chmod($tmpname, 0664);
$result = rename($tmpname, $path);