[Pkg-mediawiki-commits] r352 - in mediawiki-extensions/experimental/debian: . patches

Thorsten Glaser tg at alioth.debian.org
Thu Jul 26 13:14:37 UTC 2012


Author: tg
Date: 2012-07-26 13:14:37 +0000 (Thu, 26 Jul 2012)
New Revision: 352

Modified:
   mediawiki-extensions/experimental/debian/changelog
   mediawiki-extensions/experimental/debian/patches/fix_collection.patch
Log:
Fix content-less ul element in Collection extension

Version commits in experimental as 3~x~y (here 3~0~1),
where 3.0 will be the first version uploaded to unstable
after the post-wheezy unfreeze, and 3~0, 3~1, ?\226?\128?\166 will be
the versions I (or someone else) will upload to Debian
experimental, whereas 3~0~1, 3~0~2, ?\226?\128?\166 will be the versions
I build locally for testing so we can use 2.8, 2.9, 2.10,
etc. for uploads to wheezy.


Modified: mediawiki-extensions/experimental/debian/changelog
===================================================================
--- mediawiki-extensions/experimental/debian/changelog	2012-07-26 12:41:35 UTC (rev 351)
+++ mediawiki-extensions/experimental/debian/changelog	2012-07-26 13:14:37 UTC (rev 352)
@@ -1,3 +1,9 @@
+mediawiki-extensions (3~0~1) experimental; urgency=low
+
+  * Fix content-less ul element in Collection extension
+
+ -- Thorsten Glaser <t.glaser at tarent.de>  Thu, 26 Jul 2012 15:12:51 +0200
+
 mediawiki-extensions (2.7) unstable; urgency=low
 
   * Target MediaWiki 1.19

Modified: mediawiki-extensions/experimental/debian/patches/fix_collection.patch
===================================================================
--- mediawiki-extensions/experimental/debian/patches/fix_collection.patch	2012-07-26 12:41:35 UTC (rev 351)
+++ mediawiki-extensions/experimental/debian/patches/fix_collection.patch	2012-07-26 13:14:37 UTC (rev 352)
@@ -2,6 +2,7 @@
 
 Fix Collection extension:
 • Invalid XHTML nesting
+• Empty ul element
 
 --- a/dist/mediawiki-extensions-collection/usr/share/mediawiki-extensions/collection/Collection.templates.php
 +++ b/dist/mediawiki-extensions-collection/usr/share/mediawiki-extensions/collection/Collection.templates.php
@@ -23,12 +24,39 @@
  				<input name="token" type="hidden" value="<?php echo htmlspecialchars( $GLOBALS['wgUser']->editToken() ) ?>" />
  				<input name="bookcmd" type="hidden" value="save_collection" />
  			</form>
-@@ -221,7 +221,7 @@ if ( count( $this->data['collection']['i
+@@ -215,13 +215,17 @@ if ( count( $this->data['collection']['i
+ </div>
+ <?php } ?>
+ 
+-<ul id="collectionList">
+-
+ <?php
++$ul_shown = false;
  foreach ( $this->data['collection']['items'] as $index => $item ) {
- 	if ( $item['type'] == 'article' ) { ?>
+-	if ( $item['type'] == 'article' ) { ?>
++	if ( $item['type'] == 'article' ) {
++		if (!$ul_shown) {
++			echo '<ul id="collectionList">' . "\n";
++			$ul_shown = true;
++		}
++?>
  	<li id="item-<?php echo intval( $index ) ?>" class="article">
 -		<a onclick="return coll_remove_item(<?php echo intval( $index ) ?>)" href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'remove_item', 'index' => $index ) ) ) ?>" title="<?php $this->msg( 'coll-remove' ) ?>"><img src="<?php echo htmlspecialchars( $mediapath . "remove.png" ) ?>" width="10" height="10" alt="<?php $this->msg( 'coll-remove' ) ?>" /></a><a>
 +		<a onclick="return coll_remove_item(<?php echo intval( $index ) ?>)" href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'remove_item', 'index' => $index ) ) ) ?>" title="<?php $this->msg( 'coll-remove' ) ?>"><img src="<?php echo htmlspecialchars( $mediapath . "remove.png" ) ?>" width="10" height="10" alt="<?php $this->msg( 'coll-remove' ) ?>" /></a>
  		<noscript>
  		<?php if ( $index == 0 ) { ?>
  			<img src="<?php echo htmlspecialchars( $mediapath . "trans.png" ) ?>" width="10" height="10" alt="" />
+@@ -269,8 +273,11 @@ foreach ( $this->data['collection']['ite
+ 		<a class="makeVisible" <?php if ( !isset( $this->data['is_ajax'] ) ) { echo 'style="display:none"'; } ?> onclick="<?php echo htmlspecialchars( 'return coll_rename_chapter(' . intval( $index ) . ', ' . Xml::encodeJsVar( $item['title'] ) . ')' ) ?>" href="javascript:void(0)">[<?php $this->msg( 'coll-rename' ) ?>]</a>
+ 	</li>
+ 	<?php }
+-} ?>
+-</ul>
++}
++if ($ul_shown) {
++	echo "</ul>\n";
++}
++?>
+ 
+ </div>
+ 




More information about the Pkg-mediawiki-commits mailing list