Mailing List Archive

SVN: [114931] trunk/extensions/PageTriage/includes/ArticleMetadata.php
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114931

Revision: 114931
Author: bsitu
Date: 2012-04-16 21:28:17 +0000 (Mon, 16 Apr 2012)
Log Message:
-----------
add default value to pagetriage metadata

Modified Paths:
--------------
trunk/extensions/PageTriage/includes/ArticleMetadata.php

Modified: trunk/extensions/PageTriage/includes/ArticleMetadata.php
===================================================================
--- trunk/extensions/PageTriage/includes/ArticleMetadata.php 2012-04-16 21:28:04 UTC (rev 114930)
+++ trunk/extensions/PageTriage/includes/ArticleMetadata.php 2012-04-16 21:28:17 UTC (rev 114931)
@@ -165,7 +165,9 @@
}
}

- foreach ( $pageData as $pageId => $val ) {
+ $defaultVal = array_fill_keys( array_keys( self::getValidTags() ), '' );
+ foreach ( $pageData as $pageId => &$val ) {
+ $val += $defaultVal;
$this->setMetadataToCache( $pageId, $val );
}



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs