# HG changeset patch # User Dan # Date 1239819828 14400 # Node ID facff435cdaa3a573063779a864d21fd6f4e3224 # Parent e5de998b934b614d5c777d6aecf6ad3760dbfedb Made Special:Log tolerate literal, unescaped slashes in page names (hack of sorts, but still...) diff -r e5de998b934b -r facff435cdaa plugins/SpecialLog.php --- a/plugins/SpecialLog.php Tue Apr 14 21:03:25 2009 -0400 +++ b/plugins/SpecialLog.php Wed Apr 15 14:23:48 2009 -0400 @@ -82,10 +82,10 @@ redirect($url, '', '', 0); } $params = explode('/', $params); - foreach ( $params as $param ) + foreach ( $params as $i => $param ) { $param = str_replace('.2f', '/', dirtify_page_id($param)); - if ( preg_match('/^([a-z!]+)=(.+?)$/', $param, $match) ) + if ( preg_match('/^([a-z]+)!?=(.+?)$/', $param, $match) ) { $name =& $match[1]; $value =& $match[2]; @@ -108,6 +108,22 @@ } break; case 'page': + // tolerate slashes + $j = $i; + while ( true ) + { + if ( isset($params[++$j]) ) + { + if ( preg_match('/^([a-z]+)!?=(.+?)$/', $params[$j]) ) + break; + + $value .= '/' . $params[$j]; + } + else + { + break; + } + } if ( get_class($perms) == 'sessionManager' ) { unset($perms);