summaryrefslogtreecommitdiffstats
path: root/inc/util.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2014-11-18 19:48:44 +0100
committerSimon Rettberg2014-11-18 19:48:44 +0100
commit463d695c4f7ba87ba99f0ffc548ad6f994ff49d0 (patch)
tree49f7f26bf4368f0947a59d34e4f441ad8d20261c /inc/util.inc.php
parentCreate slxlog URL dynamically depending on current script's directory (diff)
downloadslx-admin-463d695c4f7ba87ba99f0ffc548ad6f994ff49d0.tar.gz
slx-admin-463d695c4f7ba87ba99f0ffc548ad6f994ff49d0.tar.xz
slx-admin-463d695c4f7ba87ba99f0ffc548ad6f994ff49d0.zip
Added proxy server settings
Diffstat (limited to 'inc/util.inc.php')
-rw-r--r--inc/util.inc.php19
1 files changed, 1 insertions, 18 deletions
diff --git a/inc/util.inc.php b/inc/util.inc.php
index 109c0c5d..6e97e0bd 100644
--- a/inc/util.inc.php
+++ b/inc/util.inc.php
@@ -30,7 +30,7 @@ class Util
public static function redirect($location = false)
{
if ($location === false) {
- $location = preg_replace('/(&|\?)message\[\]\=[^&]*(&|$)/', '\1', $_SERVER['REQUEST_URI']);
+ $location = preg_replace('/(&|\?)message\[\]\=[^&]*/', '\1', $_SERVER['REQUEST_URI']);
}
Session::save();
$messages = Message::toRequest();
@@ -187,22 +187,5 @@ class Util
return true;
}
-
- /**
- * Return contents of given file as string, but only read up to maxBytes bytes.
- *
- * @param string $file file to read
- * @param int $maxBytes maximum length to read
- * @return boolean success or failure
- */
- public static function readFile($file, $maxBytes = 1000)
- {
- $fh = @fopen($file, 'rb');
- if ($fh === false)
- return false;
- $data = fread($fh, $maxBytes);
- fclose($fh);
- return $data;
- }
}