diff options
| author | Urban Müller | 2018-06-22 08:54:54 +0200 | 
|---|---|---|
| committer | Urban Müller | 2018-06-22 08:54:54 +0200 | 
| commit | 99b7fc8dc08da090bb7f00c2882e1daeec4434ba (patch) | |
| tree | 30e2348c995d39d153c0d2056ee2fb69190f7862 /it_url.class | |
| parent | 3dabbbd5325c9fad9582cd44b1da68dece78eaa0 (diff) | |
| download | itools-99b7fc8dc08da090bb7f00c2882e1daeec4434ba.tar.gz itools-99b7fc8dc08da090bb7f00c2882e1daeec4434ba.tar.bz2 itools-99b7fc8dc08da090bb7f00c2882e1daeec4434ba.zip  | |
Revert "use safer it:: variants of file funcs"
This reverts commit 05e7ceefa1f0a29c665381b54ac882f260ae6c22.
Diffstat (limited to 'it_url.class')
| -rw-r--r-- | it_url.class | 8 | 
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);  |