Jack Phoenix has uploaded a new change for review.
https://gerrit.wikimedia.org/r/95457
Change subject: Per special request: eliminate $wgTitle usage.
......................................................................
Per special request: eliminate $wgTitle usage.
Change-Id: Ie9c83c37a4616823f68f69fcdfb98c18a5db5f34
---
M CodeReviewHooks.php
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeReview
refs/changes/57/95457/1
diff --git a/CodeReviewHooks.php b/CodeReviewHooks.php
index 10aeda6..faec0e9 100644
--- a/CodeReviewHooks.php
+++ b/CodeReviewHooks.php
@@ -104,11 +104,11 @@
* @param $values array
* @return bool
*/
- public static function onMakeGlobalVariablesScript( &$values ) {
+ public static function onMakeGlobalVariablesScript( &$values, $out ) {
# Bleugh, this is horrible
- global $wgTitle;
- if ( $wgTitle->isSpecial( 'Code' ) ) {
- $bits = explode( '/', $wgTitle->getText() );
+ $title = $out->getTitle();
+ if ( $title->isSpecial( 'Code' ) ) {
+ $bits = explode( '/', $title->getText() );
if ( isset( $bits[1] ) ) {
$values['wgCodeReviewRepository'] = $bits[1];
}
--
To view, visit https://gerrit.wikimedia.org/r/95457
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9c83c37a4616823f68f69fcdfb98c18a5db5f34
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeReview
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits