From: Aaron Schulz Date: Sun, 6 Jan 2008 02:50:18 +0000 (+0000) Subject: Don't compare text twice X-Git-Tag: 1.31.0-rc.0~50118 X-Git-Url: https://git.cyclocoop.org/?a=commitdiff_plain;h=7f9fbfe940e924d243463083e6a819ccf575bd80;p=lhc%2Fweb%2Fwiklou.git Don't compare text twice --- diff --git a/includes/Article.php b/includes/Article.php index 9a7e85bd6d..575f48fb7e 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1349,8 +1349,10 @@ class Article { $lastRevision = 0; $revisionId = 0; + + $changed = ( strcmp( $text, $oldtext ) != 0 ); - if ( 0 != strcmp( $text, $oldtext ) ) { + if ( $changed ) { $this->mGoodAdjustment = (int)$this->isCountable( $text ) - (int)$this->isCountable( $oldtext ); $this->mTotalAdjustment = 0; @@ -1415,9 +1417,8 @@ class Article { # Invalidate cache of this article and all pages using this article # as a template. Partly deferred. Article::onArticleEdit( $this->mTitle ); - + # Update links tables, site stats, etc. - $changed = ( strcmp( $oldtext, $text ) != 0 ); $this->editUpdates( $text, $summary, $isminor, $now, $revisionId, $changed ); } } else {