From d983f7f5cfe73adb23fef37474d7245c003046e8 Mon Sep 17 00:00:00 2001 From: Alex Z Date: Mon, 20 Jul 2009 05:14:35 +0000 Subject: [PATCH] (bug 19818) - Allow users to patrol edits to user CSS/JS subpages even if they can't edit them --- RELEASE-NOTES | 2 ++ includes/Title.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 7d9e4d8e71..bd7f1b27d7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -302,6 +302,8 @@ this. Was used when mwEmbed was going to be an extension. * (bug 19445) Change oldimage table to use ON UPDATE CASCADE for FK to image table. * (bug 14080) Short notation links to subpages didn't work in edit summaries * (bug 17374) Special:Export no longer exports multiple copies of pages +* (bug 19818) Edits to user CSS/JS subpages can now be marked as patrolled by + users who can't edit them == API changes in 1.16 == diff --git a/includes/Title.php b/includes/Title.php index 0aaaa8d8ab..00513607e2 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1281,7 +1281,7 @@ class Title { # Protect css/js subpages of user pages # XXX: this might be better using restrictions # XXX: Find a way to work around the php bug that prevents using $this->userCanEditCssJsSubpage() from working - if( $this->isCssJsSubpage() && !$user->isAllowed('editusercssjs') + if( $this->isCssJsSubpage() && !$user->isAllowed('editusercssjs' ) && $action != 'patrol' && !preg_match('/^'.preg_quote($user->getName(), '/').'\//', $this->mTextform) ) { $errors[] = array('customcssjsprotected'); -- 2.20.1