Merge "Added --all option and other features to purgeList.php"
[lhc/web/wiklou.git] / includes / EditPage.php
index 5b01ca5..4e3ea49 100644 (file)
@@ -546,8 +546,8 @@ class EditPage {
                        // Standard preference behaviour
                        return true;
                } elseif ( !$this->mTitle->exists() &&
-                 isset( $wgPreviewOnOpenNamespaces[$this->mTitle->getNamespace()] ) &&
-                 $wgPreviewOnOpenNamespaces[$this->mTitle->getNamespace()] )
+                       isset( $wgPreviewOnOpenNamespaces[$this->mTitle->getNamespace()] ) &&
+                       $wgPreviewOnOpenNamespaces[$this->mTitle->getNamespace()] )
                {
                        // Categories are special
                        return true;
@@ -1162,7 +1162,7 @@ class EditPage {
                                return false;
 
                        case self::AS_PARSE_ERROR:
-                               $wgOut->addWikiText( '<div class="error">' . $status->getWikiText() . '</div>');
+                               $wgOut->addWikiText( '<div class="error">' . $status->getWikiText() . '</div>' );
                                return true;
 
                        case self::AS_SUCCESS_NEW_ARTICLE:
@@ -2197,7 +2197,7 @@ class EditPage {
                        } catch ( MWContentSerializationException $ex ) {
                                // this can't really happen, but be nice if it does.
                                $msg = wfMessage( 'content-failed-to-parse', $this->contentModel, $this->contentFormat, $ex->getMessage() );
-                               $wgOut->addWikiText( '<div class="error">' . $msg->text() . '</div>');
+                               $wgOut->addWikiText( '<div class="error">' . $msg->text() . '</div>' );
                        }
                }
 
@@ -2616,7 +2616,7 @@ HTML
                                $this->showDiff();
                        } catch ( MWContentSerializationException $ex ) {
                                $msg = wfMessage( 'content-failed-to-parse', $this->contentModel, $this->contentFormat, $ex->getMessage() );
-                               $wgOut->addWikiText( '<div class="error">' . $msg->text() . '</div>');
+                               $wgOut->addWikiText( '<div class="error">' . $msg->text() . '</div>' );
                        }
                }
        }
@@ -2888,21 +2888,24 @@ HTML
                $dbr = wfGetDB( DB_SLAVE );
                $data = $dbr->selectRow(
                        array( 'logging', 'user' ),
-                       array( 'log_type',
-                                  'log_action',
-                                  'log_timestamp',
-                                  'log_user',
-                                  'log_namespace',
-                                  'log_title',
-                                  'log_comment',
-                                  'log_params',
-                                  'log_deleted',
-                                  'user_name' ),
-                       array( 'log_namespace' => $this->mTitle->getNamespace(),
-                                  'log_title' => $this->mTitle->getDBkey(),
-                                  'log_type' => 'delete',
-                                  'log_action' => 'delete',
-                                  'user_id=log_user' ),
+                       array(
+                               'log_type',
+                               'log_action',
+                               'log_timestamp',
+                               'log_user',
+                               'log_namespace',
+                               'log_title',
+                               'log_comment',
+                               'log_params',
+                               'log_deleted',
+                               'user_name'
+                       ), array(
+                               'log_namespace' => $this->mTitle->getNamespace(),
+                               'log_title' => $this->mTitle->getDBkey(),
+                               'log_type' => 'delete',
+                               'log_action' => 'delete',
+                               'user_id=log_user'
+                       ),
                        __METHOD__,
                        array( 'LIMIT' => 1, 'ORDER BY' => 'log_timestamp DESC' )
                );
@@ -2957,13 +2960,13 @@ HTML
 
                        if ( $this->mTriedSave && !$this->mTokenOk ) {
                                if ( $this->mTokenOkExceptSuffix ) {
-                                       $note = wfMessage( 'token_suffix_mismatch' )->plain() ;
+                                       $note = wfMessage( 'token_suffix_mismatch' )->plain();
 
                                } else {
-                                       $note = wfMessage( 'session_fail_preview' )->plain() ;
+                                       $note = wfMessage( 'session_fail_preview' )->plain();
                                }
                        } elseif ( $this->incompleteForm ) {
-                               $note = wfMessage( 'edit_form_incomplete' )->plain() ;
+                               $note = wfMessage( 'edit_form_incomplete' )->plain();
                        } else {
                                $note = wfMessage( 'previewnote' )->plain() .
                                        ' [[#' . self::EDITFORM_ID . '|' . $wgLang->getArrow() . ' ' . wfMessage( 'continue-editing' )->text() . ']]';
@@ -2972,7 +2975,7 @@ HTML
                        $parserOptions = $this->mArticle->makeParserOptions( $this->mArticle->getContext() );
                        $parserOptions->setEditSection( false );
                        $parserOptions->setIsPreview( true );
-                       $parserOptions->setIsSectionPreview( !is_null($this->section) && $this->section !== '' );
+                       $parserOptions->setIsSectionPreview( !is_null( $this->section ) && $this->section !== '' );
 
                        # don't parse non-wikitext pages, show message about preview
                        if ( $this->mTitle->isCssJsSubpage() || $this->mTitle->isCssOrJsPage() ) {
@@ -2995,7 +2998,7 @@ HTML
                                # Used messages to make sure grep find them:
                                # Messages: usercsspreview, userjspreview, sitecsspreview, sitejspreview
                                if( $level && $format ) {
-                                       $note = "<div id='mw-{$level}{$format}preview'>" . wfMessage( "{$level}{$format}preview" )->text()  . "</div>";
+                                       $note = "<div id='mw-{$level}{$format}preview'>" . wfMessage( "{$level}{$format}preview" )->text() . "</div>";
                                }
                        }
 
@@ -3031,7 +3034,7 @@ HTML
                                }
                        }
                } catch ( MWContentSerializationException $ex ) {
-                       $m = wfMessage('content-failed-to-parse', $this->contentModel, $this->contentFormat, $ex->getMessage() );
+                       $m = wfMessage( 'content-failed-to-parse', $this->contentModel, $this->contentFormat, $ex->getMessage() );
                        $note .= "\n\n" . $m->parse();
                        $previewHTML = '';
                }