From 11f9deb5eba0daaaf45c2202948fa4d5cfc5a588 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 8 Dec 2010 17:22:49 +0000 Subject: [PATCH] (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. --- RELEASE-NOTES | 2 ++ includes/installer/MysqlUpdater.php | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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() { -- 2.20.1