From: Chad Horohoe Date: Wed, 8 Dec 2010 17:22:49 +0000 (+0000) Subject: (bug 22753) update.php should make things it actually changed stand out better in... X-Git-Tag: 1.31.0-rc.0~33444 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=11f9deb5eba0daaaf45c2202948fa4d5cfc5a588;p=lhc%2Fweb%2Fwiklou.git (bug 22753) update.php should make things it actually changed stand out better in its report. Fixed the last update.php entry that isn't clear on when it did something or skipped a step. Now all of the "nothing done" messages should be prefixed by "...". We should probably abstract this somehow. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d443da6ceb..c83426ace1 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -470,6 +470,8 @@ LocalSettings.php. The specific bugs are listed below in the general notes. * (bug 10871) Javascript and CSS pages in MediaWiki namespace are no longer treated as wikitext on preview. * (bug 25512) Subcategory list should not include category prefix for members. +* (bug 22753) Output from update.php is more clear when things changed, entries + indicating nothing changed are now all prefixed by "..." === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent. diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index 50376a5ca4..7e1f8b1ca2 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -617,13 +617,17 @@ class MysqlUpdater extends DatabaseUpdater { * @see bug 3946 */ protected function doPageRandomUpdate() { - $this->output( "Setting page_random to a random value on rows where it equals 0..." ); + $page = $this->db->tableName( 'page' ); $this->db->query( "UPDATE $page SET page_random = RAND() WHERE page_random = 0", __METHOD__ ); $rows = $this->db->affectedRows(); - $this->output( "changed $rows rows\n" ); + if( $rows ) { + $this->output( "Set page_random to a random value on $row rows where it was set to 0\n" ); + } else { + $this->output( "...no page_random rows needed to be set\n" ); + } } protected function doTemplatelinksUpdate() {