Index: trunk/extensions/SimpleSecurity/SimpleSecurity.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | |
20 | 20 | if (!defined('MEDIAWIKI')) die('Not an entry point.'); |
21 | 21 | |
22 | | -define('SIMPLESECURITY_VERSION', '4.2.5, 2008-08-27'); |
| 22 | +define('SIMPLESECURITY_VERSION', '4.2.6, 2008-08-28'); |
23 | 23 | |
24 | 24 | # Global security settings |
25 | 25 | $wgSecurityMagicIf = "ifusercan"; # the name for doing a permission-based conditional |
— | — | @@ -200,14 +200,15 @@ |
201 | 201 | |
202 | 202 | # Hack to prevent specialpage operations on unreadable pages |
203 | 203 | if (!is_object($wgTitle)) return true; |
204 | | - $ns = $wgTitle->getNamespace(); |
| 204 | + $title = $wgTitle; |
| 205 | + $ns = $title->getNamespace(); |
205 | 206 | if ($ns == NS_SPECIAL) { |
206 | | - list($name, $par) = explode('/', $wgTitle->getDBkey(), 2); |
| 207 | + list($name, $par) = explode('/', $title->getDBkey().'/', 2); |
207 | 208 | if ($par) $title = Title::newFromText($par); |
208 | 209 | elseif ($wgRequest->getVal('target')) $title = Title::newFromText($wgRequest->getVal('target')); |
209 | 210 | elseif ($wgRequest->getVal('oldtitle')) $title = Title::newFromText($wgRequest->getVal('oldtitle')); |
210 | | - } else $title = $wgTitle; |
211 | | - if (!is_object($title)) return true; # If still no usable title bail |
| 211 | + } |
| 212 | + if (!is_object($title)) return true; # If still no usable title bail |
212 | 213 | |
213 | 214 | $this->info['LS'] = array(); # security info for rules from LocalSettings ($wgPageRestrictions) |
214 | 215 | $this->info['PR'] = array(); # security info for rules from protect tab |