Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[spriteme] r40 committed - replace ereg with preg_match

8 views
Skip to first unread message

codesite...@google.com

unread,
Feb 4, 2014, 1:50:05 PM2/4/14
to spri...@googlegroups.com
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);
Reply all
Reply to author
Forward
0 new messages