fix some spacing
[lhc/web/wiklou.git] / includes / installer / WebInstallerPage.php
index a193afb..e126c23 100644 (file)
@@ -36,7 +36,7 @@ abstract class WebInstallerPage {
         */
        public $parent;
 
-       public abstract function execute();
+       abstract public function execute();
 
        /**
         * Constructor.
@@ -369,7 +369,7 @@ class WebInstaller_ExistingWiki extends WebInstallerPage {
 
                // Set the relevant variables from LocalSettings.php
                $requiredVars = array( 'wgDBtype' );
-               $status = $this->importVariables( $requiredVars , $vars );
+               $status = $this->importVariables( $requiredVars, $vars );
                $installer = $this->parent->getDBInstaller();
                $status->merge( $this->importVariables( $installer->getGlobalNames(), $vars ) );
                if ( !$status->isOK() ) {
@@ -422,6 +422,7 @@ class WebInstaller_Welcome extends WebInstallerPage {
                } else {
                        $this->parent->showStatusMessage( $status );
                }
+               return '';
        }
 
 }
@@ -644,7 +645,7 @@ class WebInstaller_Name extends WebInstallerPage {
                        $this->parent->getTextBox( array(
                                'var' => 'wgSitename',
                                'label' => 'config-site-name',
-                         'help' => $this->parent->getHelpBox( 'config-site-name-help' )
+                               'help' => $this->parent->getHelpBox( 'config-site-name-help' )
                        ) ) .
                        $this->parent->getRadioSet( array(
                                'var' => '_NamespaceType',
@@ -954,7 +955,7 @@ class WebInstaller_Options extends WebInstallerPage {
 
                // We'll hide/show this on demand when the value changes, see config.js.
                $cacheval = $this->getVar( 'wgMainCacheType' );
-               if (!$cacheval) {
+               if ( !$cacheval ) {
                        // We need to set a default here; but don't hardcode it
                        // or we lose it every time we reload the page for validation
                        // or going back!
@@ -1001,7 +1002,7 @@ class WebInstaller_Options extends WebInstallerPage {
                $styleUrl = $server . dirname( dirname( $this->parent->getUrl() ) ) .
                        '/skins/common/config-cc.css';
                $iframeUrl = 'http://creativecommons.org/license/?' .
-                       wfArrayToCGI( array(
+                       wfArrayToCgi( array(
                                'partner' => 'MediaWiki',
                                'exit_url' => $exitUrl,
                                'lang' => $this->getVar( '_UserLang' ),
@@ -1024,7 +1025,7 @@ class WebInstaller_Options extends WebInstallerPage {
                } else {
                        $iframeAttribs['src'] = $this->getCCPartnerUrl();
                }
-               $wrapperStyle = ($this->getVar('_LicenseCode') == 'cc-choose') ? '' : 'display: none';
+               $wrapperStyle = ($this->getVar( '_LicenseCode' ) == 'cc-choose') ? '' : 'display: none';
 
                return
                        "<div class=\"config-cc-wrapper\" id=\"config-cc-wrapper\" style=\"$wrapperStyle\">\n" .
@@ -1154,12 +1155,12 @@ class WebInstaller_Install extends WebInstallerPage {
                        return 'continue';
                } elseif( $this->parent->request->wasPosted() ) {
                        $this->startForm();
-                       $this->addHTML("<ul>");
+                       $this->addHTML( "<ul>" );
                        $results = $this->parent->performInstallation(
-                               array( $this, 'startStage'),
+                               array( $this, 'startStage' ),
                                array( $this, 'endStage' )
                        );
-                       $this->addHTML("</ul>");
+                       $this->addHTML( "</ul>" );
                        // PerformInstallation bails on a fatal, so make sure the last item
                        // completed before giving 'next.' Likewise, only provide back on failure
                        $lastStep = end( $results );
@@ -1175,7 +1176,7 @@ class WebInstaller_Install extends WebInstallerPage {
        }
 
        public function startStage( $step ) {
-               $this->addHTML( "<li>" . wfMessage( "config-install-$step" )->escaped() . wfMessage( 'ellipsis')->escaped() );
+               $this->addHTML( "<li>" . wfMessage( "config-install-$step" )->escaped() . wfMessage( 'ellipsis' )->escaped() );
                if ( $step == 'extension-tables' ) {
                        $this->startLiveBox();
                }
@@ -1258,7 +1259,7 @@ class WebInstaller_Restart extends WebInstallerPage {
 
 abstract class WebInstaller_Document extends WebInstallerPage {
 
-       protected abstract function getFileName();
+       abstract protected function getFileName();
 
        public  function execute() {
                $text = $this->getFileContents();
@@ -1286,8 +1287,8 @@ class WebInstaller_ReleaseNotes extends WebInstaller_Document {
        protected function getFileName() {
                global $wgVersion;
 
-               if(preg_match( '/^(\d+)\.(\d+).*/i', $wgVersion, $result ) ) {
-                       throw new MWException('Variable $wgVersion has an invalid value.');
+               if( !preg_match( '/^(\d+)\.(\d+).*/i', $wgVersion, $result ) ) {
+                       throw new MWException( 'Variable $wgVersion has an invalid value.' );
                }
 
                return 'RELEASE-NOTES-' . $result[1] . '.' . $result[2];
@@ -1301,4 +1302,3 @@ class WebInstaller_UpgradeDoc extends WebInstaller_Document {
 class WebInstaller_Copying extends WebInstaller_Document {
        protected function getFileName() { return 'COPYING'; }
 }
-