From: Catrope Date: Fri, 22 Jun 2012 22:36:35 +0000 (-0700) Subject: Rename getCopyWarn() to getCopyrightWarning() and make it public and static X-Git-Tag: 1.31.0-rc.0~23189^2 X-Git-Url: http://git.cyclocoop.org//%27http:/code.google.com/p/ie7-js//%27?a=commitdiff_plain;h=b225e0507904a30d418daab5553a2463a764cd04;p=lhc%2Fweb%2Fwiklou.git Rename getCopyWarn() to getCopyrightWarning() and make it public and static This way other code will be able to obtain the copyright warning without duplicating the logic. Kept getCopyWarn() around for backwards compatibility Change-Id: I439d2b8a19c35716b208ae7f9926cd92ab482777 --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 6e6f825f81..f533016284 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2414,7 +2414,16 @@ HTML '' ); } + /** + * Get the copyright warning + * + * Renamed to getCopyrightWarning(), old name kept around for backwards compatibility + */ protected function getCopywarn() { + return self::getCopyrightWarning( $this->mTitle ); + } + + public static function getCopyrightWarning( $title ) { global $wgRightsText; if ( $wgRightsText ) { $copywarnMsg = array( 'copyrightwarning', @@ -2425,7 +2434,7 @@ HTML '[[' . wfMsgForContent( 'copyrightpage' ) . ']]' ); } // Allow for site and per-namespace customization of contribution/copyright notice. - wfRunHooks( 'EditPageCopyrightWarning', array( $this->mTitle, &$copywarnMsg ) ); + wfRunHooks( 'EditPageCopyrightWarning', array( $title, &$copywarnMsg ) ); return "
\n" . call_user_func_array( "wfMsgNoTrans", $copywarnMsg ) . "\n
";