From: Roan Kattouw Date: Mon, 3 Mar 2008 16:22:36 +0000 (+0000) Subject: (bug 13166) Adding TitleSecureAndSplit hook. Modified patch by Joshua Bacher X-Git-Tag: 1.31.0-rc.0~49272 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=33a913d27fd897eca941e16124c022c0456cda3b;p=lhc%2Fweb%2Fwiklou.git (bug 13166) Adding TitleSecureAndSplit hook. Modified patch by Joshua Bacher --- diff --git a/docs/hooks.txt b/docs/hooks.txt index eebdfe7328..db132f7f16 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1021,6 +1021,10 @@ $user: user who did the move $pageid: database ID of the page that's been moved $redirid: database ID of the created redirect +'TitleSecureAndSplit': At the end of Title::secureAndSplit() +$title: The Title object +$dbkey: The DB key + 'UndeleteShowRevision': called when showing a revision in Special:Undelete $title: title object related to the revision $rev: revision (object) that will be viewed diff --git a/includes/Title.php b/includes/Title.php index ea2b197342..ff8a234c72 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2107,8 +2107,9 @@ class Title { $this->mUrlform = wfUrlencode( $dbkey ); $this->mTextform = str_replace( '_', ' ', $dbkey ); - - return true; + + # Hooks can reject titles by returning false + return wfRunHooks('TitleSecureAndSplit', array( $this, &$dbkey )); } /**