diff options
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/it_url.class b/it_url.class index 753164a..305bde9 100644 --- a/it_url.class +++ b/it_url.class @@ -530,12 +530,7 @@ function get_cache($p = array()) if ($filemtime = $newfile ? true : it_url::_expired($path, $p['maxage'])) # Outdated(non-zero int) or non-existant(true)? { - if ($result === true && $filemtime !== true) # Source not modified, destination exists => touch - { - EDC('getcache', "processtouch", $p['url'], $path); - touch($path); - } - else if ($lock = it_url::_lock($path)) + if ($lock = it_url::_lock($path)) { # Touch existing file to prevent locking other getters while refreshing if ($filemtime !== true) @@ -717,7 +712,7 @@ function redirect($url = null, $type = "temporary") $url = preg_replace("/[\r\n].*/", '', it_url::absolute($url)); # Security: cut after CR/LF if (EDC('noredir')) - echo "<a href='" . htmlspecialchars($url) . "'>" . htmlspecialchars($url) . "</a> (HTTP/1.1 $code, $type redirect)<br />Trace: " . it_debug::backtrace(); + echo a(array('href' => $url), Q($url)) . Q(" (HTTP/1.1 $code, $type redirect)") . br() . Q("Trace: " . it_debug::backtrace()); else header('Location: ' . it_untaint($url, TC_SELF), true, $code); exit; |