summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2017-08-10 16:01:20 +0200
committerUrban Müller2017-08-10 16:02:45 +0200
commitd88f1056eb57779852de8654f292edf50ac44aaf (patch)
tree69cf5cbea246928675edd87c57af09419ac006a7
parentcd20fc7045b70bec5e7e688d22f938f5258b6e97 (diff)
downloaditools-d88f1056eb57779852de8654f292edf50ac44aaf.tar.gz
itools-d88f1056eb57779852de8654f292edf50ac44aaf.tar.bz2
itools-d88f1056eb57779852de8654f292edf50ac44aaf.zip
adapt to default
-rw-r--r--itjs.class2
-rwxr-xr-xtests/it_url.t6
2 files changed, 4 insertions, 4 deletions
diff --git a/itjs.class b/itjs.class
index d2805e7..614926d 100644
--- a/itjs.class
+++ b/itjs.class
@@ -215,7 +215,7 @@ static function checksum($fnlist, $p = array())
function crcurl($url, $p = array())
{
if (it::match('^(http|//)', $url)) # remote url, must fetch to crc
- list($fn, $short_expire) = array(it_url::get_cache(array('url' => $url, 'maxage' => 3600, 'safety' => 1, 'id' => "itjs_crcurl") + $p), false);
+ list($fn, $short_expire) = array(it_url::get_cache(array('url' => $url, 'maxage' => 3600, 'id' => "itjs_crcurl") + $p), false);
else
list($fn, $short_expire) = array(($m = it::match("^//(\w+)(/.*)", $url)) ? "/www/$m[0].search.ch" . $m[1] : $GLOBALS['ULTRAHOME'] . $url, true);;
diff --git a/tests/it_url.t b/tests/it_url.t
index 739f808..30bf7bc 100755
--- a/tests/it_url.t
+++ b/tests/it_url.t
@@ -165,7 +165,7 @@ handle_server(
handle_server(
is(
- it_url::get(array('url' => 'http://localhost:8000/', 'maxlength' => 100)),
+ it_url::get(['url' => 'http://localhost:8000/', 'maxlength' => 100]),
"Testserver root output",
'it_url::get() static call with port and maxlength'
)
@@ -173,7 +173,7 @@ handle_server(
handle_server(
is(
- it_url::get(array('url' => 'http://localhost:8000/', 'maxlength' => 5, 'it_error' => false)),
+ it_url::get(['url' => 'http://localhost:8000/', 'maxlength' => 5, 'it_error' => false]),
false,
'it_url::get() static call with port and too small maxlength'
)
@@ -197,7 +197,7 @@ handle_server(
handle_server(
is(
- it_url::get('url' => 'http://localhost:8000/relative_redirect', 'it_error' => false),
+ it_url::get(['url' => 'http://localhost:8000/relative_redirect', 'it_error' => false]),
"Testserver output after relative redirect",
'TODO: it_url::get() follows relative redirect correctly'
)