r5954 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5953‎ | r5954 | r5955 >
Date:00:07, 18 October 2004
Author:kateturner
Status:old
Tags:
Comment:
here we go again
Modified paths:
  • /branches/REL1_3A/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: branches/REL1_3A/phase3/includes/Title.php
@@ -515,7 +515,7 @@
516516 if( Namespace::getUser() == $this->mNamespace
517517 and preg_match("/\\.(css|js)$/", $this->mTextform )
518518 and !$wgUser->isSysop()
519 - and !preg_match("/^".preg_quote($wgUser->getName(), '/')."/", $this->mTextform) )
 519+ and !preg_match("/^".preg_quote($wgUser->getName(), '/')."\//", $this->mTextform) )
520520 { return false; }
521521 $ur = $wgUser->getRights();
522522 foreach ( $this->getRestrictions() as $r ) {
@@ -556,7 +556,7 @@
557557 # protect css/js subpages of user pages
558558 # XXX: this might be better using restrictions
559559 global $wgUser;
560 - return ( $wgUser->isSysop() or preg_match("/^".preg_quote($wgUser->getName())."/", $this->mTextform) );
 560+ return ( $wgUser->isSysop() or preg_match("/^".preg_quote($wgUser->getName(), '/')."\//", $this->mTextform) );
561561 }
562562
563563 # Accessor/initialisation for mRestrictions

Status & tagging log