Github has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/175113

Change subject: Use __DIR__ instead of dirname( __FILE__ ) A description!
......................................................................

Use __DIR__ instead of dirname( __FILE__ )
A description!

Newline
Closes https://github.com/wikimedia/mediawiki-extensions-examples/pull/2

Change-Id: Ie9145196476a1bb43c1a0611c5c424b56ea3655d
---
M Example/Example.hooks.php
M SpecialIncludable.php
2 files changed, 4 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/examples 
refs/changes/13/175113/1

diff --git a/Example/Example.hooks.php b/Example/Example.hooks.php
index 202b9b5..b7f2b76 100644
--- a/Example/Example.hooks.php
+++ b/Example/Example.hooks.php
@@ -79,9 +79,7 @@
         * This registers our database schema update(s)
         */
        public static function onLoadExtensionSchemaUpdates( $updater ) {
-               $dir = dirname( __FILE__ );
-
-               $updater->addExtensionTable( 'example_note', 
"$dir/sql/add-example_note.sql" );
+               $updater->addExtensionTable( 'example_note', __DIR__ . 
'/sql/add-example_note.sql' );
 
                return true;
        }
diff --git a/SpecialIncludable.php b/SpecialIncludable.php
index 3bee312..9c13e9a 100644
--- a/SpecialIncludable.php
+++ b/SpecialIncludable.php
@@ -31,15 +31,13 @@
         * Show the page
         */
        public function execute( $par = null ) {
-               global $wgOut;
-               
-               if ( $this->including() )
+               if ( $this->including() ) {
                        $out = "I'm being included";
-               else {
+               } else {
                        $out = "I'm being viewed as a Special Page";
                        $this->setHeaders();
                }
 
-               $wgOut->addWikiText( $out );
+               $this->getOutput()->addWikiText( $out );
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/175113
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9145196476a1bb43c1a0611c5c424b56ea3655d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/examples
Gerrit-Branch: master
Gerrit-Owner: Github <github.ger...@tools.wmflabs.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to