[evolvis-commits] r18727: trunk pending merges:↵ tg 2012-10-09 allow MySQL users to choose either PHP5 client library (Closes: #689758) while here↵ tg 2012-10-09 first draft of patch to fix DB upgrade FUBAR issue for PostgreSQL↵ tg 2012-10-09 <img> tags must always have an alt attribute

mirabilos at evolvis.org mirabilos at evolvis.org
Tue Oct 9 14:33:16 CEST 2012


Author: mirabilos
Date: 2012-10-09 14:33:15 +0200 (Tue, 09 Oct 2012)
New Revision: 18727

Added:
   trunk/mediawiki/debian/patches/bz29635.patch
Modified:
   trunk/mediawiki/debian/changelog
   trunk/mediawiki/debian/control
   trunk/mediawiki/debian/patches/fix_invalid_xhtml.patch
   trunk/mediawiki/debian/patches/series
Log:
trunk pending merges:
  tg 2012-10-09 allow MySQL users to choose either PHP5 client library (Closes: #689758) while here
    tg 2012-10-09 first draft of patch to fix DB upgrade FUBAR issue for PostgreSQL
    tg 2012-10-09 <img> tags must always have an alt attribute

Modified: trunk/mediawiki/debian/changelog
===================================================================
--- trunk/mediawiki/debian/changelog	2012-10-08 17:22:48 UTC (rev 18726)
+++ trunk/mediawiki/debian/changelog	2012-10-09 12:33:15 UTC (rev 18727)
@@ -1,3 +1,12 @@
+mediawiki (1:1.19.2-2tarent2) unstable; urgency=low
+
+  { issues committed in pkg-mediawiki already }
+  * <img> tags must always have an alt attribute
+  * fix DB upgrade FUBAR issue for PostgreSQL (BZ#29635)
+  * allow MySQL users to choose either PHP5 client library (Closes: #689758)
+
+ -- Thorsten Glaser <t.glaser at tarent.de>  Tue, 09 Oct 2012 14:32:42 +0200
+
 mediawiki (1:1.19.2-2tarent1) unstable; urgency=low
 
   [ Thorsten Glaser ]

Modified: trunk/mediawiki/debian/control
===================================================================
--- trunk/mediawiki/debian/control	2012-10-08 17:22:48 UTC (rev 18726)
+++ trunk/mediawiki/debian/control	2012-10-09 12:33:15 UTC (rev 18727)
@@ -14,7 +14,7 @@
 
 Package: mediawiki
 Architecture: all
-Depends: apache2 | httpd, php5, php5-pgsql | php5-mysql | php5-sqlite, mime-support, libjs-jquery, libjs-jquery-tipsy, libjs-jquery-cookie, libjs-jquery-form, ${misc:Depends}
+Depends: apache2 | httpd, php5, php5-pgsql | php5-mysql | php5-sqlite | php5-mysqlnd, mime-support, libjs-jquery, libjs-jquery-tipsy, libjs-jquery-cookie, libjs-jquery-form, ${misc:Depends}
 Recommends: postgresql-contrib | mysql-server, php5-cli, python, php-wikidiff2,  mediawiki-extensions-base
 Suggests: imagemagick | php5-gd, mediawiki-math, memcached, clamav
 Breaks: fusionforge-plugin-mediawiki (<< 5.2~rc1+1~),

Added: trunk/mediawiki/debian/patches/bz29635.patch
===================================================================
--- trunk/mediawiki/debian/patches/bz29635.patch	                        (rev 0)
+++ trunk/mediawiki/debian/patches/bz29635.patch	2012-10-09 12:33:15 UTC (rev 18727)
@@ -0,0 +1,64 @@
+$Id$
+
+Fix upgrade issue discussed on:
+https://bugzilla.wikimedia.org/show_bug.cgi?id=29635
+
+--- a/includes/installer/PostgresUpdater.php
++++ b/includes/installer/PostgresUpdater.php
+@@ -32,8 +32,8 @@ class PostgresUpdater extends DatabaseUp
+ 			array( 'renameTable', 'text', 'pagecontent'),
+ 
+ 			# new sequences
+-			array( 'addSequence', 'logging_log_id_seq'          ),
+-			array( 'addSequence', 'page_restrictions_pr_id_seq' ),
++			array( 'addOrRenameSequence', 'log_log_id_seq',      'logging_log_id_seq'          ),
++			array( 'addOrRenameSequence', 'pr_id_val',           'page_restrictions_pr_id_seq' ),
+ 
+ 			# renamed sequences
+ 			array( 'renameSequence', 'ipblocks_ipb_id_val', 'ipblocks_ipb_id_seq'         ),
+@@ -41,8 +41,6 @@ class PostgresUpdater extends DatabaseUp
+ 			array( 'renameSequence', 'text_old_id_val',     'text_old_id_seq'             ),
+ 			array( 'renameSequence', 'category_id_seq',     'category_cat_id_seq'         ),
+ 			array( 'renameSequence', 'rc_rc_id_seq',        'recentchanges_rc_id_seq'     ),
+-			array( 'renameSequence', 'log_log_id_seq',      'logging_log_id_seq'          ),
+-			array( 'renameSequence', 'pr_id_val',           'page_restrictions_pr_id_seq' ),
+ 			array( 'renameSequence', 'us_id_seq',           'uploadstash_us_id_seq' ),
+ 
+ 			# new tables
+@@ -412,6 +410,36 @@ END;
+ 		}
+ 	}
+ 
++	protected function addOrRenameSequence( $old, $new ) {
++		/*
++		 * Prior to the existence of this method, both
++		 * addSequence and renameSequence were called,
++		 * but possibly in wrong order, leading to is-
++		 * sues like bugzilla #29635.
++		 * This means we must first detect whether the
++		 * sequences both already exist and have quite
++		 * a problem then. Normally, we'd need to keep
++		 * the higher of them by some complicated code
++		 * in PL/PGSQL (this has already been done for
++		 * a sequence in Evolvis), but since this only
++		 * affects two sequences, and only for a short
++		 * period of time, we can just assume that the
++		 * old sequence is to be kept and the newer to
++		 * be deleted.
++		 * If only old exists, rename that, otherwise,
++		 * create new.
++		 */
++		if ( $this->db->sequenceExists( $old ) ) {
++			if ( $this->db->sequenceExists( $new ) ) {
++				$this->output( "Removing sequence $new\n" );
++				$this->db->query( "DROP SEQUENCE $new" );
++			}
++			$this->renameSequence( $old, $new );
++		} else {
++			$this->addSequence( $new );
++		}
++	}
++
+ 	protected function renameTable( $old, $new ) {
+ 		if ( $this->db->tableExists( $old ) ) {
+ 			$this->output( "Renaming table $old to $new\n" );

Modified: trunk/mediawiki/debian/patches/fix_invalid_xhtml.patch
===================================================================
--- trunk/mediawiki/debian/patches/fix_invalid_xhtml.patch	2012-10-08 17:22:48 UTC (rev 18726)
+++ trunk/mediawiki/debian/patches/fix_invalid_xhtml.patch	2012-10-09 12:33:15 UTC (rev 18727)
@@ -7,6 +7,7 @@
 • let makeLink and all its callers remove HTML5-only attributes from
   hyperlinks if someone else was not careful (rather, several someones)
 • prevent <ul></ul> without any <li /> inside
+• <img> tags must always have an alt attribute
 
 --- a/includes/HTMLForm.php
 +++ b/includes/HTMLForm.php
@@ -167,3 +168,24 @@
  		}
  	}
  
+--- a/includes/media/MediaTransformOutput.php
++++ b/includes/media/MediaTransformOutput.php
+@@ -259,7 +259,7 @@ class ThumbnailImage extends MediaTransf
+ 		}
+ 
+ 		$attribs = array(
+-			'alt' => $alt,
++			'alt' => $alt ? $alt : '(thumbnail)',
+ 			'src' => $this->url,
+ 			'width' => $this->width,
+ 			'height' => $this->height,
+--- a/includes/specials/SpecialUpload.php
++++ b/includes/specials/SpecialUpload.php
+@@ -930,6 +930,7 @@ class UploadForm extends HTMLForm {
+ 				$this->addHeaderText(
+ 					'<div class="thumb t' . $wgContLang->alignEnd() . '">' .
+ 					Html::element( 'img', array(
++						'alt' => '(thumbnail)',
+ 						'src' => $mto->getUrl(),
+ 						'class' => 'thumbimage',
+ 					) ) . '</div>', 'description' );

Modified: trunk/mediawiki/debian/patches/series
===================================================================
--- trunk/mediawiki/debian/patches/series	2012-10-08 17:22:48 UTC (rev 18726)
+++ trunk/mediawiki/debian/patches/series	2012-10-09 12:33:15 UTC (rev 18727)
@@ -3,4 +3,5 @@
 fix_invalid_sql.patch
 fix_invalid_xhtml.patch
 fix_warnings.patch
+bz29635.patch
 tarent.patch



More information about the evolvis-commits mailing list