From: Aaron Schulz Date: Sat, 30 Aug 2008 00:29:46 +0000 (+0000) Subject: * Small performance tweak by switching check order X-Git-Tag: 1.31.0-rc.0~45552 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=d1c7fa806da12cb75b7e690dfebe8012f3d34546;p=lhc%2Fweb%2Fwiklou.git * Small performance tweak by switching check order * Tweak comments --- diff --git a/includes/EditPage.php b/includes/EditPage.php index de414416c5..7f3853d279 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -699,7 +699,7 @@ class EditPage { } } - if( !$this->showCustomIntro() && !$this->mTitle->exists() ) { + if( !$this->mTitle->exists() && !$this->showCustomIntro() ) { if( $wgUser->isLoggedIn() ) { $wgOut->wrapWikiMsg( '
$1
', 'newarticletext' ); } else { @@ -1163,15 +1163,15 @@ class EditPage { if ( !$this->checkUnicodeCompliantBrowser() ) { $wgOut->addWikiMsg( 'nonunicodebrowser' ); } - if ( isset( $this->mArticle ) && isset( $this->mArticle->mRevision ) ) { - // Let sysop know that this will make private content public if saved + if ( isset( $this->mArticle ) && isset( $this->mArticle->mRevision ) ) { + // Let sysop know that this will make private content public if saved if( !$this->mArticle->mRevision->userCan( Revision::DELETED_TEXT ) ) { $wgOut->addWikiMsg( 'rev-deleted-text-permission' ); } else if( $this->mArticle->mRevision->isDeleted( Revision::DELETED_TEXT ) ) { $wgOut->addWikiMsg( 'rev-deleted-text-view' ); } - + // Let user know they are editing an old version if( !$this->mArticle->mRevision->isCurrent() ) { $this->mArticle->setOldSubtitle( $this->mArticle->mRevision->getId() ); $wgOut->addWikiMsg( 'editingold' );