r51792 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51791‎ | r51792 | r51793 >
Date:15:24, 12 June 2009
Author:daniel
Status:deferred
Tags:
Comment:
wwFakeCommonsPlural
Modified paths:
  • /trunk/WikiWord/WikiWord/src/main/php/config.sample.php (modified) (history)
  • /trunk/WikiWord/WikiWord/src/main/php/wwutils.php (modified) (history)

Diff [purge]

Index: trunk/WikiWord/WikiWord/src/main/php/wwutils.php
@@ -425,7 +425,7 @@
426426 }
427427
428428 function getImagesAbout($id, $max = 0) {
429 - global $wwFakeCommonsConcepts;
 429+ global $wwFakeCommonsConcepts, $wwFakeCommonsPlural;
430430
431431 $concepts = $this->getLocalConcepts($id);
432432
@@ -455,7 +455,12 @@
456456 return $images->listImages($max);
457457
458458 $img = $this->getImagesInCategory("commmons", $title); //FIXME: resource mapping
459 - $images->addImages($img, "commons:" . $title, "category", 0.5);
 459+ $images->addImages($img, "commons:category:" . $title, "category", 0.5);
 460+
 461+ if ($wwFakeCommonsConcepts && $wwFakeCommonsPlural) {
 462+ $img = $this->getImagesInCategory("commmons", $title); //FIXME: resource mapping
 463+ $images->addImages($img, "commons:category:" . $title, "category(pl)", 0.5);
 464+ }
460465 }
461466
462467 return $images->listImages($max);
Index: trunk/WikiWord/WikiWord/src/main/php/config.sample.php
@@ -17,6 +17,7 @@
1818 $wwImagePageURL = "http://commons.wikimedia.org/wiki/File:{name}";
1919
2020 $wwFakeCommonsConcepts = true;
 21+$wwFakeCommonsPlural = true;
2122 $wwCommonsTablePrefix = "commonswiki_p.";
2223
2324 $wwWikiInfoTable = "toolserver.wiki";

Status & tagging log