http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88853

Revision: 88853
Author:   yuvipanda
Date:     2011-05-25 22:41:42 +0000 (Wed, 25 May 2011)
Log Message:
-----------
More spacing fixes, and a .vimrc

Modified Paths:
--------------
    trunk/extensions/ShortUrl/ShortUrl.hooks.php
    trunk/extensions/ShortUrl/SpecialShortUrl.php
    trunk/extensions/ShortUrl/populateShortUrlTable.php

Added Paths:
-----------
    trunk/extensions/ShortUrl/.vimrc

Added: trunk/extensions/ShortUrl/.vimrc
===================================================================
--- trunk/extensions/ShortUrl/.vimrc                            (rev 0)
+++ trunk/extensions/ShortUrl/.vimrc    2011-05-25 22:41:42 UTC (rev 88853)
@@ -0,0 +1,2 @@
+set noexpandtab
+set tabstop=4

Modified: trunk/extensions/ShortUrl/ShortUrl.hooks.php
===================================================================
--- trunk/extensions/ShortUrl/ShortUrl.hooks.php        2011-05-25 22:41:10 UTC 
(rev 88852)
+++ trunk/extensions/ShortUrl/ShortUrl.hooks.php        2011-05-25 22:41:42 UTC 
(rev 88853)
@@ -28,10 +28,10 @@
                        $shortURL = $wgShortUrlPrefix . $shortId;
                        $html = Html::rawElement( 'li', array( 'id' => 
't-shorturl' ),
                                Html::Element( 'a', array(
-                                                                       'href' 
=> $shortURL,
-                                                                       'title' 
=> wfMsg( 'shorturl-toolbox-title' )
-                                                               ),
-                                                               wfMsg ( 
'shorturl-toolbox-text' ) )
+                                       'href' => $shortURL,
+                                       'title' => wfMsg( 
'shorturl-toolbox-title' )
+                               ),
+                               wfMsg ( 'shorturl-toolbox-text' ) )
                        );
 
                        echo $html;

Modified: trunk/extensions/ShortUrl/SpecialShortUrl.php
===================================================================
--- trunk/extensions/ShortUrl/SpecialShortUrl.php       2011-05-25 22:41:10 UTC 
(rev 88852)
+++ trunk/extensions/ShortUrl/SpecialShortUrl.php       2011-05-25 22:41:42 UTC 
(rev 88853)
@@ -36,13 +36,13 @@
         * @param $par Mixed: Parameters passed to the page
         */
        public function execute( $par ) {
-        global $wgOut;
+               global $wgOut;
 
-        $title = shorturlDecode( $par );
-        if ( $title ) {
-            $wgOut->redirect( $title->getFullURL(), '301' );
-            return;
-        }
+               $title = shorturlDecode( $par );
+               if ( $title ) {
+                       $wgOut->redirect( $title->getFullURL(), '301' );
+                       return;
+               }
                // Wrong ID
                $notfound = Html::element( 'p', array(), wfMsg ( 
'shorturl-not-found', $par ) );
                $wgOut->addHTML( $notfound );

Modified: trunk/extensions/ShortUrl/populateShortUrlTable.php
===================================================================
--- trunk/extensions/ShortUrl/populateShortUrlTable.php 2011-05-25 22:41:10 UTC 
(rev 88852)
+++ trunk/extensions/ShortUrl/populateShortUrlTable.php 2011-05-25 22:41:42 UTC 
(rev 88853)
@@ -20,15 +20,15 @@
                        __METHOD__
                );
 
-    }
+       }
 
-    //FIXME: Refactor out code in ShortUrl.functions.php so it can be used here
+       //FIXME: Refactor out code in ShortUrl.functions.php so it can be used 
here
        public function execute() {
                $rowCount = 0;
                $dbr = wfGetDB( DB_SLAVE );
-        $all_titles = $dbr->select(
+               $all_titles = $dbr->select(
                        "page",
-            array( "page_namespace", "page_title" ),
+                       array( "page_namespace", "page_title" ),
                        array(),
                        __METHOD__
                );
@@ -45,7 +45,7 @@
                                $insert_buffer = array();
                        }
                        $this->output( $rowCount . " titles done\n" );
-                       
+
                        $rowCount++;
                }
                if( count( $insert_buffer ) > 0 ) {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to