summaryrefslogtreecommitdiffstats
path: root/inc/util.inc.php
diff options
context:
space:
mode:
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;
- }
}