r55629 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55628‎ | r55629 | r55630 >
Date:15:42, 27 August 2009
Author:brion
Status:ok (Comments)
Tags:
Comment:
Tracked down mystery bug Johannes pointed out to me with hr localization ...
We tried to create an Article object to check for title existence, which failed if the title was invalid.
This ended up being the case for Croatian due to a one-char typo in i18n. :)
Fixed that and fixed the existence checks not to die. (Need to check if this code is still around in trunk)
Modified paths:
  • /branches/wmf-deployment/extensions/Collection/Collection.i18n.php (modified) (history)
  • /branches/wmf-deployment/extensions/Collection/Collection.templates.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/extensions/Collection/Collection.i18n.php
@@ -2711,7 +2711,7 @@
27122712 'coll-return_to' => 'Vrati se na [[:$1]]',
27132713 'coll-more_info' => 'Prikaži više informacija',
27142714 'coll-hide_info' => 'Sakrij informacije',
2715 - 'coll-order_info_article' => '{{MediaWiki:Coll-Helppage}}/informacije o narudžbi PediaPressa',
 2715+ 'coll-order_info_article' => '{{MediaWiki:Coll-helppage}}/informacije o narudžbi PediaPressa',
27162716 );
27172717
27182718 /** Upper Sorbian (Hornjoserbsce)
Index: branches/wmf-deployment/extensions/Collection/Collection.templates.php
@@ -70,8 +70,7 @@
7171 </div>
7272 <?php
7373 $t = Title::newFromText(wfMsgForContent('coll-order_info_article'));
74 -$a = new Article($t);
75 -if ( $a->exists() ) { ?>
 74+if ( $t && $t->exists() ) { ?>
7675 <div id="coll-more_info" style="display:none">
7776 <a href="javascript:void(0)" onclick="coll_toggle_order_info(true);"><?php $this->msgWiki('coll-more_info') ?></a>
7877 </div>
@@ -83,7 +82,7 @@
8483 <?php } ?>
8584 </div>
8685 <?php
87 -if ($a->exists() ) { ?>
 86+if ($t && $t->exists() ) { ?>
8887 <div id="coll-order_info" style="display:none; margin-top: 2em;">
8988 <?php
9089 echo $GLOBALS['wgParser']->parse('{{:' . $t . '}}',
@@ -382,8 +381,7 @@
383382 )->getText();
384383 $title_string = wfMsgForContent('coll-template_blacklist_title');
385384 $t = Title::newFromText($title_string);
386 -$a = new Article($t);
387 -if ( $a->exists() ) {
 385+if ( $t && $t->exists() ) {
388386 echo $GLOBALS['wgParser']->parse(
389387 wfMsgNoTrans('coll-blacklisted-templates', $title_string),
390388 $GLOBALS['wgTitle'],

Follow-up revisions

RevisionCommit summaryAuthorDate
r55633applied diff from r55629 (from wmf-deployment branch)jojo17:14, 27 August 2009

Comments

#Comment by Siebrand (talk | contribs)   17:05, 27 August 2009

Status & tagging log