r47054 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47053‎ | r47054 | r47055 >
Date:21:59, 9 February 2009
Author:siebrand
Status:deferred
Tags:
Comment:
Replace hard coded pipe separators with locale based
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)
  • /trunk/extensions/CleanChanges/CleanChanges_body.php (modified) (history)
  • /trunk/extensions/CodeBrowse/CodeBrowseRepoListView.php (modified) (history)
  • /trunk/extensions/CodeReview/CodeRepoListView.php (modified) (history)
  • /trunk/extensions/CodeReview/CodeRevisionView.php (modified) (history)
  • /trunk/extensions/ConfirmAccount/ConfirmAccount_body.php (modified) (history)
  • /trunk/extensions/ContributionReporting/ContributionHistory_body.php (modified) (history)
  • /trunk/extensions/DynamicPageList/DynamicPageList2.php (modified) (history)
  • /trunk/extensions/EditUser/1.15/EditUser_body.php (modified) (history)
  • /trunk/extensions/ImageTagging/ImageTagging.php (modified) (history)
  • /trunk/extensions/LatexDoc/LatexDoc.php (modified) (history)
  • /trunk/extensions/LookupUser/LookupUser.body.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Overlay.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Tools.php (modified) (history)
  • /trunk/extensions/NewestPages/NewestPages.page.php (modified) (history)
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchByProperty.php (modified) (history)
  • /trunk/extensions/SisterSites/SisterSites.php (modified) (history)
  • /trunk/extensions/SocialProfile/SystemGifts/SpecialSystemGiftManagerLogo.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserGifts/SpecialGiftManagerLogo.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserGifts/SpecialViewGift.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserGifts/SpecialViewGifts.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserRelationship/SpecialViewRelationships.php (modified) (history)
  • /trunk/extensions/SpecialFileList/SpecialFilelist.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeBrowse/CodeBrowseRepoListView.php
@@ -13,20 +13,20 @@
1414
1515 $text = '';
1616 foreach( $repos as $repo ){
 17+ global $wgLang;
 18+
1719 $name = $repo->getName();
1820 $text .= "* '''[[Special:CodeBrowse/$name|$name]]''' (";
19 - $text .= "[[Special:Code/$name|".wfMsgHtml( 'code-log' )."]]";
20 - $text .= " | [[Special:Code/$name/comments|".wfMsgHtml( 'code-notes' )."]]";
21 - $text .= " | [[Special:Code/$name/tag|".wfMsgHtml( 'code-tags' )."]]";
22 - $text .= " | [[Special:Code/$name/author|".wfMsgHtml( 'code-authors' )."]]";
 21+ $links[] = "[[Special:Code/$name|" . wfMsgHtml( 'code-log' ) . "]]";
 22+ $links[] = "[[Special:Code/$name/comments|" . wfMsgHtml( 'code-notes' ) . "]]";
 23+ $links[] = "[[Special:Code/$name/tag|" . wfMsgHtml( 'code-tags' ) . "]]";
 24+ $links[] = "[[Special:Code/$name/author|" . wfMsgHtml( 'code-authors' ) . "]]";
 25+ $text .= $wgLang->pipeList( $links );
2326 $text .= ")\n";
2427 }
2528
2629 return $text;
27 -
2830 }
29 -
30 -
3131 }
3232
3333 class CodeRepoListView {
Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -23,7 +23,7 @@
2424 * Override SpecialPage::execute()
2525 */
2626 function execute( $param ) {
27 - global $wgOut, $wgRequest, $wgRecordAdminUseNamespaces;
 27+ global $wgOut, $wgRequest, $wgRecordAdminUseNamespaces, $wgLang;
2828 $this->setHeaders();
2929 $type = $wgRequest->getText( 'wpType' ) or $type = $param;
3030 $record = $wgRequest->getText( 'wpRecord' );
@@ -35,9 +35,10 @@
3636 if ( $wpTitle && !ereg( "^$type:.+$", $wpTitle ) ) $wpTitle = "$type:$wpTitle";
3737 }
3838
39 - $wgOut->addHTML( "<div class='center'><a href='" . $title->getLocalURL() . "/$type'>" . wfMsg( 'recordadmin-newsearch', $type ) . "</a> | "
40 - . "<a href='" . $title->getLocalURL() . "'>" . wfMsg( 'recordadmin-newrecord' ) . "</a></div><br>\n"
41 - );
 39+ $wgOut->addHTML( $wgLang->pipeList( array(
 40+ "<div class='center'><a href='" . $title->getLocalURL() . "/$type'>" . wfMsg( 'recordadmin-newsearch', $type ) . "</a>",
 41+ "<a href='" . $title->getLocalURL() . "'>" . wfMsg( 'recordadmin-newrecord' ) . "</a></div><br>\n"
 42+ ) ) );
4243
4344 # Get posted form values if any
4445 $posted = array();
Index: trunk/extensions/LatexDoc/LatexDoc.php
@@ -138,6 +138,7 @@
139139 'action=latexdoc&ext=pdf' );
140140 $htmlLatex = nl2br( htmlspecialchars( $text ) );
141141
 142+ // FIXME: hard coded pipe-separator (use $wgLang->pipeList( array ) if possible.
142143 $framedLatex = <<<ENDTEXT
143144 $dviLink | $pdfLink
144145 <hr />
Index: trunk/extensions/ContributionReporting/ContributionHistory_body.php
@@ -5,7 +5,7 @@
66 }
77
88 function execute( $language = NULL ) {
9 - global $wgRequest, $wgOut, $wgTitle;
 9+ global $wgRequest, $wgOut, $wgTitle, $wgLang;
1010
1111 if ( !preg_match( '/^[a-z-]+$/', $language ) ) {
1212 $language = 'en';
@@ -75,7 +75,7 @@
7676 );
7777 $pagingDiv = Xml::openElement( 'div',
7878 array( 'align' => 'right', 'style' => 'padding-bottom:20px' ) ) .
79 - implode( " | ", $pagingLinks ) .
 79+ $wgLang->pipeList( $pagingLinks ) .
8080 Xml::closeElement( 'div' );
8181 $output .= $pagingDiv;
8282
Index: trunk/extensions/DynamicPageList/DynamicPageList2.php
@@ -3879,7 +3879,7 @@
38803880 if($article->mUserLink != '') $rBody .= ' . . [[User:' . $article->mUser .'|'.$article->mUser.']]';
38813881 if($article->mContributor != '')$rBody .= ' . . [[User:' . $article->mContributor .'|'.$article->mContributor." $article->mContrib]]";
38823882
3883 - if( !empty($article->mCategoryLinks) ) $rBody .= ' . . <SMALL>' . wfMsg('categories') . ': ' . implode(' | ', $article->mCategoryLinks) . '</SMALL>';
 3883+ if( !empty($article->mCategoryLinks) ) $rBody .= ' . . <small>' . wfMsg('categories') . ': ' . $wgLang->pipeList( $article->mCategoryLinks ) . '</small>';
38843884 }
38853885
38863886 // add included contents
@@ -4115,7 +4115,4 @@
41164116 sort($paramoptions);
41174117 return $this->escapeMsg( $msgid, $paramvar, htmlspecialchars( $val ), ExtDynamicPageList2::$options[$paramvar]['default'], implode(' | ', $paramoptions ));
41184118 }
4119 -
41204119 }
4121 -
4122 -?>
\ No newline at end of file
Index: trunk/extensions/EditUser/1.15/EditUser_body.php
@@ -695,7 +695,7 @@
696696 $this->tableRow(
697697 wfMsgExt( 'prefs-memberingroups', array( 'parseinline' ), count( $userEffectiveGroupsArray ) ),
698698 $wgLang->commaList( $userEffectiveGroupsArray ) .
699 - '<br />(' . implode( ' | ', $toolLinks ) . ')'
 699+ '<br />(' . $wgLang->pipeList( $toolLinks ) . ')'
700700 ) .
701701
702702 $this->tableRow(
Index: trunk/extensions/SpecialFileList/SpecialFilelist.php
@@ -321,7 +321,7 @@
322322 $ret[] = $this->sk->makeKnownLinkObj( $titleObj, $wgLang->formatNum( $l ), $p ) ;
323323 }
324324
325 - $text = wfMsg( "showlast", implode ( " | " , $ret ), wfMsg('bydate') );
 325+ $text = wfMsg( "showlast", $wgLang->pipeList( $ret ), wfMsg('bydate') );
326326 return $text ;
327327 }
328328
@@ -329,6 +329,8 @@
330330 * Returns the option links
331331 */
332332 function options ( &$params ) {
 333+ global $wgLang;
 334+
333335 $titleObj = Title::makeTitle( NS_SPECIAL, 'Filelist' );
334336 $ret = array () ;
335337
@@ -342,7 +344,7 @@
343345 $bots = $params['gallery'] ? wfMsg('filelist-show-list') : wfMsg('filelist-show-gallery') ;
344346 $ret[] = $this->sk->makeKnownLinkObj( $titleObj, $bots, $this->getURLparams ( $p2 ) );
345347
346 - return "<p>" . implode ( " | " , $ret ) . "</p>" ;
 348+ return "<p>" . $wgLang->pipeList( $ret ) . "</p>" ;
347349 }
348350
349351 /**
@@ -369,7 +371,7 @@
370372 $nextLink = $this->sk->makeKnownLinkObj( $titleObj, $nextLink, $this->getURLparams ( $p2 ) );
371373 }
372374
373 - $out .= $prevLink . " | " . $nextLink ;
 375+ $out .= $wgLang->pipeList( array( $prevLink, $nextLink ) );
374376
375377 return "<p>" . $out . "</p>" ;
376378 }
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Tools.php
@@ -128,8 +128,12 @@
129129 'js_eval' => $this->js_eval ) );
130130 }
131131 function render_menu() {
132 - return '<a href="javascript:mv_tool_disp(\'stream_page\')">' . wfMsg( 'mv_stream_meta' ) . '</a>' . ' | ' .
133 - '<a href="javascript:mv_tool_disp(\'menu\')">' . wfMsg( 'mv_stream_tool_heading' ) . '</a>';
 132+ global $wgLang;
 133+
 134+ return $wgLang->pipeList( array(
 135+ '<a href="javascript:mv_tool_disp(\'stream_page\')">' . wfMsg( 'mv_stream_meta' ) . '</a>',
 136+ '<a href="javascript:mv_tool_disp(\'menu\')">' . wfMsg( 'mv_stream_tool_heading' ) . '</a>'
 137+ ) );
134138 }
135139
136140 /*
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Overlay.php
@@ -77,15 +77,19 @@
7878 </div>';
7979 }
8080 function render_menu() {
 81+ global $wgLang;
 82+
8183 $base_title = '';
8284 // set the base title to the stream name:
8385 if ( isset( $this->mv_interface->article->mvTitle ) ) {
8486 $base_title = $this->mv_interface->article->mvTitle->getStreamName();
8587 }
8688 // '<a title="'.wfMsg('mv_search_stream_title').'" href="javascript:mv_tool_disp(\'search\')">'.wfMsg('mv_search_stream').'</a>'
87 - return '<a title="' . htmlspecialchars( wfMsg( 'mv_mang_layers_title' ) ) . '" href="javascript:mv_tool_disp(\'mang_layers\')">' . wfMsg( 'mv_mang_layers' ) . '</a>' .
88 - ' | ' . '<a title="' . htmlspecialchars( wfMsg( 'mv_new_ht_en' ) ) . '" href="javascript:mv_disp_add_mvd(\'ht_en\')">' . wfMsg( 'mv_new_ht_en' ) . '</a>' .
89 - ' | ' . '<a href="javascript:mv_disp_add_mvd(\'anno_en\')">' . wfMsg( 'mv_new_anno_en' ) . '</a>';
 89+ return $wgLang->pipeList( array(
 90+ '<a title="' . htmlspecialchars( wfMsg( 'mv_mang_layers_title' ) ) . '" href="javascript:mv_tool_disp(\'mang_layers\')">' . wfMsg( 'mv_mang_layers' ) . '</a>',
 91+ '<a title="' . htmlspecialchars( wfMsg( 'mv_new_ht_en' ) ) . '" href="javascript:mv_disp_add_mvd(\'ht_en\')">' . wfMsg( 'mv_new_ht_en' ) . '</a>',
 92+ '<a href="javascript:mv_disp_add_mvd(\'anno_en\')">' . wfMsg( 'mv_new_anno_en' ) . '</a>'
 93+ ) );
9094 }
9195 /* output caption div links */
9296 function get_video_timeline() {
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php
@@ -723,6 +723,7 @@
724724
725725 // $wgOut->addWikiText( $copywarn );
726726 $wgOut->addHTML( $this->editFormTextAfterWarn );
 727+ $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
727728 $wgOut->addHTML( "
728729 {$metadata}
729730 {$editsummary}
@@ -734,7 +735,7 @@
735736 $wgOut->addHTML(
736737 "<div class='editButtons'>
737738 {$buttonshtml}
738 - <span class='editHelp'>{$cancel} | {$edithelp}</span>
 739+ <span class='editHelp'>{$cancel}{$separator}{$edithelp}</span>
739740 </div><!-- editButtons -->
740741 </div><!-- editOptions -->" );
741742
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -816,6 +816,7 @@
817817 } else {
818818 $nlink = '<a href="' . $title->escapeLocalUrl( $q ) . "\" class=\"mw-nextlink\">{$next}</a>";
819819 }
 820+ // If ever re-enabled, remember to use pipe-separator / Language::pipeList
820821 /*$nums = wfNumLink( $offset, 20, $title, $query ) . ' | ' .
821822 wfNumLink( $offset, 50, $title, $query ) . ' | ' .
822823 wfNumLink( $offset, 100, $title, $query ) ;
Index: trunk/extensions/LookupUser/LookupUser.body.php
@@ -111,7 +111,11 @@
112112 } else {
113113 $registration = wfMsg( 'lookupuser-no-registration' );
114114 }
115 - $wgOut->addWikiText( '*' . wfMsg( 'username' ) . ' [[User:' . $name . '|' . $name . ']] ([[User talk:' . $name . '|' . wfMsg( 'talkpagelinktext' ) . ']] | [[Special:Contributions/' . $name . '|' . wfMsg( 'contribslink' ) . ']])' );
 115+ $wgOut->addWikiText( '*' . wfMsg( 'username' ) . ' [[User:' . $name . '|' . $name . ']] (' .
 116+ $wgLang->pipeList( array(
 117+ '[[User talk:' . $name . '|' . wfMsg( 'talkpagelinktext' ) . ']]',
 118+ '[[Special:Contributions/' . $name . '|' . wfMsg( 'contribslink' ) . ']])'
 119+ ) ) );
116120 $wgOut->addWikiText( '*' . wfMsg( 'lookupuser-id', $user->getId() ) );
117121 $wgOut->addWikiText( '*' . wfMsg( 'lookupuser-email', $email, $name ) );
118122 $wgOut->addWikiText( '*' . wfMsg( 'lookupuser-realname', $user->getRealName() ) );
@@ -121,4 +125,4 @@
122126 $wgOut->addWikiText( '*' . wfMsg( 'lookupuser-useroptions' ) . '<br />' . $optionsString );
123127 }
124128 }
125 -}
\ No newline at end of file
 129+}
Index: trunk/extensions/CodeReview/CodeRevisionView.php
@@ -113,6 +113,8 @@
114114 }
115115
116116 protected function navigationLinks() {
 117+ global $wgLang;
 118+
117119 $rev = $this->mRev->getId();
118120 $prev = $this->mRev->getPrevious();
119121 $next = $this->mRev->getNext();
@@ -139,7 +141,7 @@
140142 $links[] = $this->mSkin->link( $nextTarget, "r$next" ) . '&nbsp;&gt;';
141143 }
142144
143 - return implode( ' | ', $links );
 145+ return $wgLang->pipeList( $links );
144146 }
145147
146148 protected function checkPostings() {
Index: trunk/extensions/CodeReview/CodeRepoListView.php
@@ -19,13 +19,15 @@
2020 }
2121
2222 public static function getNavItem( $name ) {
 23+ global $wgLang;
 24+
2325 $text = "'''[[Special:Code/$name|$name]]''' (";
24 - $text .= "[[Special:Code/$name/comments|".wfMsgHtml( 'code-notes' )."]]";
25 - $text .= " | [[Special:Code/$name/status|".wfMsgHtml( 'code-status' )."]]";
26 - $text .= " | [[Special:Code/$name/tag|".wfMsgHtml( 'code-tags' )."]]";
27 - $text .= " | [[Special:Code/$name/author|".wfMsgHtml( 'code-authors' )."]]";
 26+ $links[] = "[[Special:Code/$name/comments|" . wfMsgHtml( 'code-notes' ) . "]]";
 27+ $links[] = "[[Special:Code/$name/status|" . wfMsgHtml( 'code-status' ) . "]]";
 28+ $links[] = "[[Special:Code/$name/tag|" . wfMsgHtml( 'code-tags' ) . "]]";
 29+ $links[] = "[[Special:Code/$name/author|" . wfMsgHtml( 'code-authors' ) . "]]";
 30+ $text .= $wgLang->pipeList( $links );
2831 $text .= ")";
2932 return $text;
3033 }
3134 }
32 -
Index: trunk/extensions/SocialProfile/UserGifts/SpecialViewGifts.php
@@ -122,7 +122,8 @@
123123 <div class="g-actions">
124124 <a href="'.$give_gift_link->escapeFullURL('gift_id='.$gift['gift_id']).'">'.wfMsg('g-to-another').'</a>';
125125 if( $rel->user_name == $wgUser->getName() ) {
126 - $output .= ' | <a href="'.$remove_gift_link->escapeFullURL('gift_id='.$gift['id']).'">'.wfMsg('g-remove-gift').'</a>';
 126+ $output .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
 127+ $output .= '<a href="' . $remove_gift_link->escapeFullURL( 'gift_id=' . $gift['id'] ) . '">' . wfMsg( 'g-remove-gift' ) . '</a>';
127128 }
128129 $output .= '</div>
129130 <div class="cleared"></div>';
Index: trunk/extensions/SocialProfile/UserGifts/SpecialViewGift.php
@@ -82,7 +82,10 @@
8383 <div class=\"g-describe\">{$gift["description"]}</div>
8484 <div class=\"g-actions\">
8585 <a href=\"".$give_gift_link->escapeFullURL('gift_id='.$gift['gift_id'])."\">".wfMsg('g-to-another')."</a>";
86 - if( $gift['user_name_to'] == $wgUser->getName() ) $output .= " | <a href=\"".$remove_gift_link->escapeFullURL('gift_id='.$gift['id'])."\">".wfMsg('g-remove-gift')."</a>";
 86+ if( $gift['user_name_to'] == $wgUser->getName() ) {
 87+ $output .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
 88+ $output .= "<a href=\"" . $remove_gift_link->escapeFullURL( 'gift_id=' . $gift['id'] ) . "\">" . wfMsg( 'g-remove-gift' ) . "</a>";
 89+ }
8790 $output .= '</div>
8891 </div>';
8992
Index: trunk/extensions/SocialProfile/UserGifts/SpecialGiftManagerLogo.php
@@ -378,7 +378,7 @@
379379 * @access private
380380 */
381381 function showSuccess( $status ) {
382 - global $wgUser, $wgOut, $wgContLang, $wgDBname, $wgUploadPath, $wgScriptPath;
 382+ global $wgUser, $wgOut, $wgContLang, $wgDBname, $wgUploadPath, $wgScriptPath, $wgLang;
383383 wfLoadExtensionMessages('UserGifts');
384384 $ext = 'jpg';
385385
@@ -395,8 +395,11 @@
396396 $output .= '<tr><td valign="top" style="color:#666666;font-weight:800">'.wfMsg('g-small').'</td><td><img src="'.$wgUploadPath.'/awards/' . $this->gift_id . '_s.' . $ext . '?ts' . rand() . '"></td></tr>';
397397 $output .= '<tr><td><input type="button" onclick="javascript:history.go(-1)" value="'.wfMsg('g-go-back').'"></td></tr>';
398398
399 - $output .= '<tr><td><a href="'.$wgScriptPath.'/index.php?title=Special:GiftManager">'.wfMsg('g-back-gift-list').'</a> | ';
400 - $output .= '<a href="'.$wgScriptPath.'/index.php?title=Special:GiftManager&amp;id='. $this->gift_id .'">'.wfMsg('g-back-edit-gift').'</a></td></tr>';
 399+ // FIXME: contains very hard coded URLs
 400+ $output .= $wgLang->pipeList( array(
 401+ '<tr><td><a href="' . $wgScriptPath . '/index.php?title=Special:GiftManager">' . wfMsg( 'g-back-gift-list' ) . '</a>',
 402+ '<a href="' . $wgScriptPath . '/index.php?title=Special:GiftManager&amp;id=' . $this->gift_id . '">' . wfMsg( 'g-back-edit-gift' ) . '</a></td></tr>'
 403+ ) );
401404 $output .= '</table>';
402405 $wgOut->addHTML($output);
403406 }
Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
@@ -409,7 +409,7 @@
410410 }
411411
412412 function getProfileTop( $user_id, $user_name ) {
413 - global $IP, $wgTitle, $wgUser, $wgMemc, $wgUploadPath;
 413+ global $IP, $wgTitle, $wgUser, $wgMemc, $wgUploadPath, $wgLang;
414414
415415 // Load messages, we're gonna need 'em
416416 wfLoadExtensionMessages( 'SocialProfileUserProfile' );
@@ -482,25 +482,41 @@
483483 <div class="profile-actions">';
484484
485485 if ( $this->isOwner() ) {
486 - $output .= '
487 - <a href="'.$update_profile->escapeFullURL().'">'.wfMsg('user-edit-profile').'</a> |
488 - <a href="'.$upload_avatar->escapeFullURL().'">'.wfMsg('user-upload-avatar').'</a> |
489 - <a href="'.$watchlist->escapeFullURL().'">'.wfMsg('user-watchlist').'</a> |
490 - ';
 486+ $output .= $wgLang->pipeList( array(
 487+ '<a href="' . $update_profile->escapeFullURL() . '">' . wfMsg( 'user-edit-profile ') . '</a>',
 488+ '<a href="' . $upload_avatar->escapeFullURL() . '">' . wfMsg( 'user-upload-avatar' ) . '</a>',
 489+ '<a href="' . $watchlist->escapeFullURL() . '">' . wfMsg( 'user-watchlist' ) . '</a>',
 490+ ''
 491+ ) );
491492 } else if( $wgUser->isLoggedIn() ) {
492493 if( $relationship == false ) {
493 - $output .= '<a href="'.$add_relationship->escapeFullURL('user='.$user_safe.'&rel_type=1').'" rel="nofollow">'.wfMsg('user-add-friend').'</a> |
494 - <a href="'.$add_relationship->escapeFullURL('user='.$user_safe.'&rel_type=2').'" rel="nofollow">'.wfMsg('user-add-foe').'</a> | ';
 494+ $output .= $wgLang->pipeList( array(
 495+ '<a href="'.$add_relationship->escapeFullURL('user='.$user_safe.'&rel_type=1').'" rel="nofollow">'.wfMsg('user-add-friend').'</a>',
 496+ '<a href="'.$add_relationship->escapeFullURL('user='.$user_safe.'&rel_type=2').'" rel="nofollow">'.wfMsg('user-add-foe').'</a>',
 497+ ''
 498+ ) );
495499 } else {
496 - if( $relationship == 1 ) $output .= '<a href="'.$remove_relationship->escapeFullURL('user='.$user_safe).'">'.wfMsg('user-remove-friend').'</a> | ';
497 - if( $relationship == 2 ) $output .= '<a href="'.$remove_relationship->escapeFullURL('user='.$user_safe).'">'.wfMsg('user-remove-foe').'</a> | ';
 500+ if( $relationship == 1 ) {
 501+ $output .= $wgLang->pipeList( array(
 502+ '<a href="' . $remove_relationship->escapeFullURL( 'user=' . $user_safe ) . '">' . wfMsg( 'user-remove-friend' ) . '</a>',
 503+ ''
 504+ ) );
 505+ }
 506+ if( $relationship == 2 ) {
 507+ $output .= $wgLang->pipeList( array(
 508+ '<a href="' . $remove_relationship->escapeFullURL( 'user=' . $user_safe ) . '">' . wfMsg( 'user-remove-foe' ) . '</a>',
 509+ ''
 510+ ) );
 511+ }
498512 }
499513
500514 global $wgUserBoard;
501515 if( $wgUserBoard ){
502 - $output .= '<a href="'.$send_message->escapeFullURL('user='.$wgUser->getName().'&conv='.$user_safe).'" rel="nofollow">'.wfMsg('user-send-message').'</a> | ';
 516+ $output .= '<a href="'.$send_message->escapeFullURL('user='.$wgUser->getName().'&conv='.$user_safe).'" rel="nofollow">'.wfMsg('user-send-message').'</a>';
 517+ $output .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
503518 }
504 - $output .= '<a href="'.$give_gift->escapeFullURL('user='.$user_safe).'" rel="nofollow">'.wfMsg('user-send-gift').'</a> |';
 519+ $output .= '<a href="'.$give_gift->escapeFullURL('user='.$user_safe).'" rel="nofollow">'.wfMsg('user-send-gift').'</a>';
 520+ $output .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
505521 }
506522
507523 $output .= '<a href="'.$contributions->escapeFullURL().'" rel="nofollow">'.wfMsg('user-contributions').'</a> ';
@@ -840,7 +856,7 @@
841857 <div class="action-right">';
842858 if( $wgUser->getName() == $user_name ) {
843859 if( $friends ) $output .= '<a href="' . UserBoard::getBoardBlastURL().'">'.wfMsg('user-send-board-blast').'</a>';
844 - if( $total > 10 ) $output .= ' | ';
 860+ if( $total > 10 ) $output .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
845861 }
846862 if( $total > 10 ) $output .= '<a href="'.UserBoard::getUserBoardURL($user_name).'">'.wfMsg('user-view-all').'</a>';
847863 $output .= '</div>
Index: trunk/extensions/SocialProfile/UserRelationship/SpecialViewRelationships.php
@@ -26,7 +26,7 @@
2727 * @param $params Mixed: parameter(s) passed to the page or null
2828 */
2929 public function execute( $params ) {
30 - global $wgUser, $wgOut, $wgRequest, $wgUserRelationshipScripts;
 30+ global $wgUser, $wgOut, $wgRequest, $wgUserRelationshipScripts, $wgLang;
3131
3232 wfLoadExtensionMessages( 'SocialProfileUserRelationship' );
3333
@@ -159,10 +159,14 @@
160160 </div>
161161 <div class=\"relationship-actions\">";
162162 if( $indivRelationship == false ) {
163 - $output .= "<a href=\"".$add_relationship_link->escapeFullURL('user='.$user_safe.'&rel_type=1')."\">".wfMsg('ur-add-friend')."</a> |
164 - <a href=\"".$add_relationship_link->escapeFullURL('user='.$user_safe.'&rel_type=2')."\">".wfMsg('ur-add-foe')."</a> | ";
 163+ $output .= $wgLang->pipeList( array(
 164+ "<a href=\"" . $add_relationship_link->escapeFullURL( 'user=' . $user_safe . '&rel_type=1') . "\">" . wfMsg( 'ur-add-friend') . "</a>",
 165+ "<a href=\"" . $add_relationship_link->escapeFullURL( 'user=' . $user_safe . '&rel_type=2') . "\">" . wfMsg( 'ur-add-foe' ) . "</a>",
 166+ ''
 167+ ) );
165168 } else if( $user_name == $wgUser->getName() ) {
166 - $output .= "<a href=\"".$remove_relationship_link->escapeFullURL('user='.$user_safe)."\">".$rem."</a> | ";
 169+ $output .= "<a href=\"".$remove_relationship_link->escapeFullURL('user='.$user_safe)."\">".$rem."</a>";
 170+ $output .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
167171 }
168172 $output .= "<a href=\"".$give_gift_link->escapeFullURL('user='.$user_safe)."\">".wfMsg('ur-give-gift')."</a>";
169173
Index: trunk/extensions/SocialProfile/SystemGifts/SpecialSystemGiftManagerLogo.php
@@ -369,7 +369,7 @@
370370 * @access private
371371 */
372372 function showSuccess( $status ) {
373 - global $wgUser, $wgOut, $wgContLang, $wgDBname, $wgUploadPath, $wgScriptPath;
 373+ global $wgUser, $wgOut, $wgContLang, $wgDBname, $wgUploadPath, $wgScriptPath, $wgLang;
374374 wfLoadExtensionMessages('SystemGifts');
375375 $ext = 'jpg';
376376
@@ -386,8 +386,11 @@
387387 $output .= '<tr><td valign="top" style="color:#666666;font-weight:800">'.wfMsg('ga-small').'</td><td><img src="'.$wgUploadPath.'/awards/sg_' . $this->gift_id . '_s.' . $ext . '?ts' . rand() . '"></td></tr>';
388388 $output .= '<tr><td><input type="button" onclick="javascript:history.go(-1)" value="'.wfMsg('ga-goback').'"></td></tr>';
389389
390 - $output .= '<tr><td><a href="'.$wgScriptPath.'/index.php?title=Special:SystemGiftManager">'.wfMsg('ga-back-gift-list').'</a> | ';
391 - $output .= '<a href="'.$wgScriptPath.'/index.php?title=Special:SystemGiftManager&amp;id='. $this->gift_id .'">'.wfMsg('ga-back-edit-gift').'</a></td></tr>';
 390+ // FIXME: contains very hard coded URLs
 391+ $output .= $wgLang->pipeList( array(
 392+ '<tr><td><a href="' . $wgScriptPath . '/index.php?title=Special:SystemGiftManager">' . wfMsg( 'ga-back-gift-list' ) . '</a>',
 393+ '<a href="' . $wgScriptPath . '/index.php?title=Special:SystemGiftManager&amp;id=' . $this->gift_id . '">' . wfMsg( 'ga-back-edit-gift') . '</a></td></tr>'
 394+ ) );
392395 $output .= '</table>';
393396 $wgOut->addHTML($output);
394397 }
Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php
@@ -550,7 +550,7 @@
551551
552552 $wikiLink = $special->getLocalURL( 'target=' . $t->getPartialURL() . '&' . $this->getOptionsAsUrlParameters() );
553553
554 - if ( $s !== '' ) $s .= ' | ';
 554+ if ( $s !== '' ) $s .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
555555
556556 $s .= Xml::openElement( 'span', array( 'class' => 'CategoryTreeItem' ) );
557557 $s .= Xml::openElement( 'a', array( 'class' => 'CategoryTreeLabel', 'href' => $wikiLink ) ) . $label . Xml::closeElement( 'a' );
Index: trunk/extensions/ConfirmAccount/ConfirmAccount_body.php
@@ -15,9 +15,9 @@
1616 SpecialPage::SpecialPage('ConfirmAccounts','confirmaccount');
1717 }
1818
19 - function execute( $par ) {
20 - global $wgRequest, $wgOut, $wgUser, $wgAccountRequestTypes;
21 -
 19+ function execute( $par ) {
 20+ global $wgRequest, $wgOut, $wgUser, $wgAccountRequestTypes, $wgLang;
 21+
2222 if( !$wgUser->isAllowed( 'confirmaccount' ) ) {
2323 $wgOut->permissionRequired( 'confirmaccount' );
2424 return;
@@ -91,22 +91,40 @@
9292 $listLink = wfMsgHtml( 'confirmaccount-showopen' );
9393 }
9494 if( $this->acrID || !$this->showHeld ) {
95 - $listLink .= ' | '.$this->skin->makeKnownLinkObj( $titleObj,
96 - wfMsgHtml( 'confirmaccount-showheld' ), wfArrayToCGI( array( 'wpShowHeld' => 1 ) ) );
 95+ $listLink = $wgLang->pipeList( array(
 96+ $listLink,
 97+ $this->skin->makeKnownLinkObj( $titleObj,
 98+ wfMsgHtml( 'confirmaccount-showheld' ), wfArrayToCGI( array( 'wpShowHeld' => 1 ) ) )
 99+ ) );
97100 } else {
98 - $listLink .= ' | '.wfMsgHtml( 'confirmaccount-showheld' );
 101+ $listLink = $wgLang->pipeList( array(
 102+ $listLink,
 103+ wfMsgHtml( 'confirmaccount-showheld' )
 104+ ) );
99105 }
100106 if( $this->acrID || !$this->showRejects ) {
101 - $listLink .= ' | '.$this->skin->makeKnownLinkObj( $titleObj, wfMsgHtml( 'confirmaccount-showrej' ),
102 - wfArrayToCGI( array( 'wpShowRejects' => 1 ) ) );
 107+ $listLink = $wgLang->pipeList( array(
 108+ $listLink,
 109+ $this->skin->makeKnownLinkObj( $titleObj, wfMsgHtml( 'confirmaccount-showrej' ),
 110+ wfArrayToCGI( array( 'wpShowRejects' => 1 ) ) )
 111+ ) );
103112 } else {
104 - $listLink .= ' | '.wfMsgHtml( 'confirmaccount-showrej' );
 113+ $listLink = $wgLang->pipeList( array(
 114+ $listLink,
 115+ wfMsgHtml( 'confirmaccount-showrej' )
 116+ ) );
105117 }
106118 if( $this->acrID || !$this->showStale ) {
107 - $listLink .= ' | '.$this->skin->makeKnownLinkObj( $titleObj, wfMsgHtml( 'confirmaccount-showexp' ),
108 - wfArrayToCGI( array( 'wpShowStale' => 1 ) ) );
 119+ $listLink = $wgLang->pipeList( array(
 120+ $listLink,
 121+ $this->skin->makeKnownLinkObj( $titleObj, wfMsgHtml( 'confirmaccount-showexp' ),
 122+ wfArrayToCGI( array( 'wpShowStale' => 1 ) ) )
 123+ ) );
109124 } else {
110 - $listLink .= ' | '.wfMsgHtml( 'confirmaccount-showexp' );
 125+ $listLink = $wgLang->pipeList( array(
 126+ $listLink,
 127+ wfMsgHtml( 'confirmaccount-showexp' )
 128+ ) );
111129 }
112130
113131 # Say what queue we are in...
@@ -133,7 +151,7 @@
134152 }
135153
136154 function showQueues() {
137 - global $wgOut, $wgAccountRequestTypes;
 155+ global $wgOut, $wgAccountRequestTypes, $wgLang;
138156
139157 $wgOut->addWikiText( wfMsg('confirmaccount-maintext') );
140158
@@ -169,7 +187,9 @@
170188 __METHOD__ );
171189 $rejects .= " [$count]";
172190
173 - $wgOut->addHTML( "<li><i>".wfMsgHtml("confirmaccount-type-$i")."</i> ($open | $held | $rejects | $stale)</li>" );
 191+ $wgOut->addHTML( "<li><i>".wfMsgHtml("confirmaccount-type-$i")."</i> ($open" .
 192+ $wgLang->pipeList( array( $held, $rejects, $stale ) ) .
 193+ ")</li>" );
174194 }
175195 $wgOut->addHTML( '</ul>' );
176196 }
Index: trunk/extensions/ImageTagging/ImageTagging.php
@@ -318,7 +318,7 @@
319319 }
320320
321321 function wfGetImageTags($img, $imgName) {
322 - global $wgDBname, $wgUser, $wgOut;
 322+ global $wgDBname, $wgUser, $wgOut, $wgLang;
323323
324324 wfProfileIn( __METHOD__ );
325325
@@ -353,7 +353,7 @@
354354
355355 $removeLink = '<a href="#" onclick="removeTag(' . $o->unique_id . ', this, \'' . addslashes( $o->article_tag ) . '\'); return false;">' . wfMsgHtml('imagetagging-removetag') . '</a>';
356356
357 - $html .= $span . $articleLink . ' (' . $imagesLink . ' | ' . $removeLink . ')</span>';
 357+ $html .= $span . $articleLink . ' (' . $wgLang->pipeList( array( $imagesLink, $removeLink ) ) . ')</span>';
358358 }
359359 $db->freeResult($res);
360360
Index: trunk/extensions/SisterSites/SisterSites.php
@@ -31,6 +31,8 @@
3232 }
3333
3434 function wfSisterList( $sites ) {
 35+ global $wgLang;
 36+
3537 foreach( $sites as $site ) {
3638 $bits[] = Xml::element( 'a',
3739 array(
@@ -42,7 +44,7 @@
4345 }
4446 return "<div class=\"mw_sistersites\">" .
4547 "Sister sites: " .
46 - implode( " | ", $bits ) .
 48+ $wgLang->pipeList( $bits ) .
4749 "</div>\n";
4850 }
4951
Index: trunk/extensions/NewestPages/NewestPages.page.php
@@ -123,6 +123,8 @@
124124 }
125125
126126 function makeLimitLinks() {
 127+ global $wgLang;
 128+
127129 $limits = array( 10, 20, 30, 50, 100, 150 );
128130 foreach( $limits as $limit ) {
129131 if( $limit != $this->limit ) {
@@ -131,7 +133,7 @@
132134 $links[] = (string)$limit;
133135 }
134136 }
135 - return( wfMsgHtml( 'newestpages-limitlinks', implode( ' | ', $links ) ) );
 137+ return( wfMsgHtml( 'newestpages-limitlinks', $wgLang->pipeList( $links ) ) );
136138 }
137139
138140 function makeRedirectToggle() {
Index: trunk/extensions/CleanChanges/CleanChanges_body.php
@@ -473,7 +473,8 @@
474474 }
475475
476476 if( $items ) {
477 - $data = array( "wgUserInfo$rci" => '(' . implode( ' | ', $items ) . ')' );
 477+ global $wgLang;
 478+ $data = array( "wgUserInfo$rci" => '(' . $wgLang->pipeList( $items ) . ')' );
478479
479480 return array($tl, $data);
480481 } else {
Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php
@@ -222,7 +222,7 @@
223223
224224
225225 protected function getInputForm($printoutstring, $urltail) {
226 - global $wgUser, $smwgQSortingSupport;
 226+ global $wgUser, $smwgQSortingSupport, $wgLang;
227227 $skin = $wgUser->getSkin();
228228 $result = '';
229229
@@ -259,9 +259,12 @@
260260 $result .= '<a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask',$urltail . '&eq=yes&sc=1')) . '" rel="nofollow">' . wfMsg('smw_add_sortcondition') . '</a>'; // note that $urltail uses a , separated list for sorting, so setting sc to 1 always adds one new condition
261261 }
262262 $result .= '<br /><input type="submit" value="' . wfMsg('smw_ask_submit') . '"/>' .
263 - '<input type="hidden" name="eq" value="yes"/>' .
264 - ' <a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask',$urltail)) . '" rel="nofollow">' . wfMsg('smw_ask_hidequery') . '</a> | <a href="' . htmlspecialchars(wfMsg('smw_ask_doculink')) . '">' . wfMsg('smw_ask_help') . '</a>' .
265 - "\n</form><br />";
 263+ '<input type="hidden" name="eq" value="yes"/>' .
 264+ $wgLang->pipeList( array(
 265+ ' <a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask',$urltail)) . '" rel="nofollow">' . wfMsg('smw_ask_hidequery') . '</a>',
 266+ '<a href="' . htmlspecialchars(wfMsg('smw_ask_doculink')) . '">' . wfMsg('smw_ask_help') . '</a>'
 267+ ) ) .
 268+ "\n</form><br />";
266269 } else {
267270 $result .= '<p><a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask',$urltail . '&eq=yes')) . '" rel="nofollow">' . wfMsg('smw_ask_editquery') . '</a></p>';
268271 }
@@ -295,7 +298,7 @@
296299 if ($first) {
297300 $navigation .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(';
298301 $first = false;
299 - } else $navigation .= ' | ';
 302+ } else $navigation .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
300303 if ( $limit != $l ) {
301304 $navigation .= '<a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . $offset . '&limit=' . $l . $urltail)) . '" rel="nofollow">' . $l . '</a>';
302305 } else {
@@ -365,7 +368,7 @@
366369 if ($first) {
367370 $navigation .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(';
368371 $first = false;
369 - } else $navigation .= ' | ';
 372+ } else $navigation .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
370373 if ($l > $smwgQMaxLimit) {
371374 $l = $smwgQMaxLimit;
372375 $max = true;
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchByProperty.php
@@ -223,7 +223,7 @@
224224 $navigation .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(';
225225 $first = false;
226226 } else
227 - $navigation .= ' | ';
 227+ $navigation .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
228228 if ($l > $smwgQMaxInlineLimit) {
229229 $l = $smwgQMaxInlineLimit;
230230 $max = true;

Follow-up revisions

RevisionCommit summaryAuthorDate
r47547RecordAdmin: Reapply r47054 (migrate extensions to $wgLang->pipelist()) which...catrope13:41, 20 February 2009
r47732Fix link pipe breakage from r47054aaron23:33, 23 February 2009

Status & tagging log