summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2010-10-05 19:30:00 +0000
committerChristian Schneider2010-10-05 19:30:00 +0000
commitd75019d1df989fdb8781b573f8c58b3286c66786 (patch)
tree083fc5d2c0a45b891acee449adbc625948f33bae
parentd1c9467b41581d40bda857ebd07a4463d4186250 (diff)
downloaditools-d75019d1df989fdb8781b573f8c58b3286c66786.tar.gz
itools-d75019d1df989fdb8781b573f8c58b3286c66786.tar.bz2
itools-d75019d1df989fdb8781b573f8c58b3286c66786.zip
Make ITools use only standard syntax
-rw-r--r--itjs.php4
-rwxr-xr-xtests/it_url.t2
2 files changed, 3 insertions, 3 deletions
diff --git a/itjs.php b/itjs.php
index 52f06d7..f8a19a2 100644
--- a/itjs.php
+++ b/itjs.php
@@ -48,7 +48,7 @@ else if (it::match('\.css', $_SERVER['PHP_SELF']))
ob_start('ob_gzhandler');
$data .= "\n#it_boot_dom { display:none }\n"; # Append magic style for it_boot
if (!it::match('^devel', $GLOBALS['ULTRASERVERTYPE']))
- $data = it::replace(array('[ \t]*([{};])[ \t]*' => '$1', '/\*.*?\*/'=> ""), $data);
+ $data = it::replace(array('[ \t]*([{};])[ \t]*' => '$1', '/\*.*?\*/' => ""), $data);
}
else if (!it::match('\.html$', $file))
{
@@ -70,7 +70,7 @@ if ($checksum != $_SERVER['HTTP_IF_NONE_MATCH'])
if ($_REQUEST['boot'])
{
$data .= "window.it_boot_init();\n";
- $data = sprintf("/*sln:%d*/\n%s/*eln:%d*/", strlen($data), strtr($data, '%' => "%25", '.' => "%2e", 'e' => "%65", 'i' => "%69"), strlen($data)); # Protect from Firewalls/Proxies altering Javascript source code
+ $data = sprintf("/*sln:%d*/\n%s/*eln:%d*/", strlen($data), strtr($data, array('%' => "%25", '.' => "%2e", 'e' => "%65", 'i' => "%69")), strlen($data)); # Protect from Firewalls/Proxies altering Javascript source code
}
echo it_untaint($data);
diff --git a/tests/it_url.t b/tests/it_url.t
index 0178e33..4c59004 100755
--- a/tests/it_url.t
+++ b/tests/it_url.t
@@ -102,7 +102,7 @@ is(
);
$url = new it_url('http://bogus.url');
-$page = $url->get('url' => 'http://www.gna.ch/');
+$page = $url->get(array('url' => 'http://www.gna.ch/'));
is(
it::match('(</html>)', $page),
'</html>',