Revision: 40
Author: stevesoudersorg
Date: Tue Feb 4 18:49:44 2014 UTC
Log: replace ereg with preg_match
http://code.google.com/p/spriteme/source/detail?r=40
Modified:
/trunk/results.php
=======================================
--- /trunk/results.php Tue Mar 5 16:45:53 2013 UTC
+++ /trunk/results.php Tue Feb 4 18:49:44 2014 UTC
@@ -33,7 +33,7 @@
}
// strip off all querystrings for privacy
- if ( ereg("(http.*)\?", $url, $regs) ) {
+ if ( preg_match('/(http.*)\?/', $url, $regs) ) {
$url = $regs[1];
}
@@ -62,7 +62,7 @@
}
// strip off all querystrings for privacy
- if ( ereg("(http.*)\?", $url, $regs) ) {
+ if ( preg_match('/(http.*)\?/', $url, $regs) ) {
$url = $regs[1];
}
@@ -428,7 +428,7 @@
function shortenUrl($url, $max = 50) {
- //if ( ereg("(http[^\/]*\/\/[^\/]*\/[^\/]*\/).*(\/[^\/]*)$", $url, $regs)
) {
+ //if ( preg_match('/(http[^\/]*\/\/[^\/]*\/[^\/]*\/).*(\/[^\/]*)$/',
$url, $regs) ) {
if ( $max < strlen($url) ) {
$iSlash = strpos($url, "/", 10);