(bug 8329) Take size of text *after* passing it through pre-save transform
authorRob Church <robchurch@users.mediawiki.org>
Wed, 20 Dec 2006 00:06:15 +0000 (00:06 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Wed, 20 Dec 2006 00:06:15 +0000 (00:06 +0000)
includes/Article.php

index 0d696ce..327a40c 100644 (file)
@@ -1278,13 +1278,13 @@ class Article {
 
                $oldtext = $this->getContent();
                $oldsize = strlen( $oldtext );
-               $newsize = strlen( $text );
 
                # Provide autosummaries if one is not provided.
                if ($flags & EDIT_AUTOSUMMARY && $summary == '')
                        $summary = $this->getAutosummary( $oldtext, $text, $flags );
 
                $text = $this->preSaveTransform( $text );
+               $newsize = strlen( $text );
 
                $dbw =& wfGetDB( DB_MASTER );
                $now = wfTimestampNow();