Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -2619,13 +2619,11 @@ |
2620 | 2620 | * @param $oppositedm Boolean Add the direction mark opposite to your |
2621 | 2621 | * language, to display text properly |
2622 | 2622 | * @return String |
| 2623 | + * @deprecated since 1.19; use Language::specialList() instead |
2623 | 2624 | */ |
2624 | 2625 | function wfSpecialList( $page, $details, $oppositedm = true ) { |
2625 | 2626 | global $wgLang; |
2626 | | - $dirmark = ( $oppositedm ? $wgLang->getDirMark( true ) : '' ) . |
2627 | | - $wgLang->getDirMark(); |
2628 | | - $details = $details ? $dirmark . " ($details)" : ''; |
2629 | | - return $page . $details; |
| 2627 | + return $wgLang->specialList( $page, $details, $oppositedm ); |
2630 | 2628 | } |
2631 | 2629 | |
2632 | 2630 | /** |
Index: trunk/phase3/includes/specials/SpecialFewestrevisions.php |
— | — | @@ -90,6 +90,6 @@ |
91 | 91 | array( 'action' => 'history' ) |
92 | 92 | ) . $redirect; |
93 | 93 | |
94 | | - return wfSpecialList( $plink, $nlink ); |
| 94 | + return $this->getLang()->specialList( $plink, $nlink ); |
95 | 95 | } |
96 | 96 | } |
Index: trunk/phase3/includes/specials/SpecialCategories.php |
— | — | @@ -114,9 +114,10 @@ |
115 | 115 | function formatRow($result) { |
116 | 116 | $title = Title::makeTitle( NS_CATEGORY, $result->cat_title ); |
117 | 117 | $titleText = Linker::link( $title, htmlspecialchars( $title->getText() ) ); |
| 118 | + $lang = $this->getLang(); |
118 | 119 | $count = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ), |
119 | | - $this->getLang()->formatNum( $result->cat_pages ) ); |
120 | | - return Xml::tags('li', null, wfSpecialList( $titleText, $count ) ) . "\n"; |
| 120 | + $lang->formatNum( $result->cat_pages ) ); |
| 121 | + return Xml::tags('li', null, $lang->specialList( $titleText, $count ) ) . "\n"; |
121 | 122 | } |
122 | 123 | |
123 | 124 | public function getStartForm( $from ) { |
Index: trunk/phase3/includes/specials/SpecialMostcategories.php |
— | — | @@ -62,6 +62,6 @@ |
63 | 63 | |
64 | 64 | $count = $this->msg( 'ncategories' )->numParams( $result->value )->escaped(); |
65 | 65 | $link = Linker::link( $title ); |
66 | | - return wfSpecialList( $link, $count ); |
| 66 | + return $this->getLang()->specialList( $link, $count ); |
67 | 67 | } |
68 | 68 | } |
Index: trunk/phase3/includes/specials/SpecialPopularpages.php |
— | — | @@ -62,6 +62,6 @@ |
63 | 63 | htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) |
64 | 64 | ); |
65 | 65 | $nv = $this->msg( 'nviews' )->numParams( $result->value )->escaped(); |
66 | | - return wfSpecialList($link, $nv ); |
| 66 | + return $this->getLang()->specialList( $link, $nv ); |
67 | 67 | } |
68 | 68 | } |
Index: trunk/phase3/includes/specials/SpecialUnwatchedpages.php |
— | — | @@ -83,6 +83,6 @@ |
84 | 84 | array( 'action' => 'watch', 'token' => $token ) |
85 | 85 | ); |
86 | 86 | |
87 | | - return wfSpecialList( $plink, $wlink ); |
| 87 | + return $this->getLang()->specialList( $plink, $wlink ); |
88 | 88 | } |
89 | 89 | } |
Index: trunk/phase3/includes/specials/SpecialProtectedtitles.php |
— | — | @@ -105,7 +105,7 @@ |
106 | 106 | |
107 | 107 | wfProfileOut( __METHOD__ ); |
108 | 108 | |
109 | | - return '<li>' . wfSpecialList( $link, implode( $description_items, ', ' ) ) . "</li>\n"; |
| 109 | + return '<li>' . $lang->specialList( $link, implode( $description_items, ', ' ) ) . "</li>\n"; |
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
Index: trunk/phase3/includes/specials/SpecialMostlinkedtemplates.php |
— | — | @@ -98,7 +98,7 @@ |
99 | 99 | public function formatResult( $skin, $result ) { |
100 | 100 | $title = Title::makeTitle( $result->namespace, $result->title ); |
101 | 101 | |
102 | | - return wfSpecialList( |
| 102 | + return $this->getLang()->specialList( |
103 | 103 | Linker::link( $title ), |
104 | 104 | $this->makeWlhLink( $title, $result ) |
105 | 105 | ); |
Index: trunk/phase3/includes/specials/SpecialUnusedtemplates.php |
— | — | @@ -61,19 +61,19 @@ |
62 | 62 | */ |
63 | 63 | function formatResult( $skin, $result ) { |
64 | 64 | $title = Title::makeTitle( NS_TEMPLATE, $result->title ); |
65 | | - $pageLink = $skin->linkKnown( |
| 65 | + $pageLink = Linker::linkKnown( |
66 | 66 | $title, |
67 | 67 | null, |
68 | 68 | array(), |
69 | 69 | array( 'redirect' => 'no' ) |
70 | 70 | ); |
71 | | - $wlhLink = $skin->linkKnown( |
| 71 | + $wlhLink = Linker::linkKnown( |
72 | 72 | SpecialPage::getTitleFor( 'Whatlinkshere' ), |
73 | 73 | wfMsgHtml( 'unusedtemplateswlh' ), |
74 | 74 | array(), |
75 | 75 | array( 'target' => $title->getPrefixedText() ) |
76 | 76 | ); |
77 | | - return wfSpecialList( $pageLink, $wlhLink ); |
| 77 | + return $this->getLang()->specialList( $pageLink, $wlhLink ); |
78 | 78 | } |
79 | 79 | |
80 | 80 | function getPageHeader() { |
Index: trunk/phase3/includes/specials/SpecialWantedcategories.php |
— | — | @@ -69,8 +69,9 @@ |
70 | 70 | array( 'broken' ) |
71 | 71 | ); |
72 | 72 | |
| 73 | + $lang = $this->getLang(); |
73 | 74 | $nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ), |
74 | | - $this->getLang()->formatNum( $result->value ) ); |
75 | | - return wfSpecialList( $plink, $nlinks ); |
| 75 | + $lang->formatNum( $result->value ) ); |
| 76 | + return $lang->specialList( $plink, $nlinks ); |
76 | 77 | } |
77 | 78 | } |
Index: trunk/phase3/includes/specials/SpecialListusers.php |
— | — | @@ -131,24 +131,26 @@ |
132 | 132 | $userPage = Title::makeTitle( NS_USER, $row->user_name ); |
133 | 133 | $name = Linker::link( $userPage, htmlspecialchars( $userPage->getText() ) ); |
134 | 134 | |
| 135 | + $lang = $this->getLang(); |
| 136 | + |
135 | 137 | $groups_list = self::getGroups( $row->user_id ); |
136 | 138 | if( count( $groups_list ) > 0 ) { |
137 | 139 | $list = array(); |
138 | 140 | foreach( $groups_list as $group ) |
139 | 141 | $list[] = self::buildGroupLink( $group, $userPage->getText() ); |
140 | | - $groups = $this->getLang()->commaList( $list ); |
| 142 | + $groups = $lang->commaList( $list ); |
141 | 143 | } else { |
142 | 144 | $groups = ''; |
143 | 145 | } |
144 | 146 | |
145 | | - $item = wfSpecialList( $name, $groups ); |
| 147 | + $item = $lang->specialList( $name, $groups ); |
146 | 148 | if( $row->ipb_deleted ) { |
147 | 149 | $item = "<span class=\"deleted\">$item</span>"; |
148 | 150 | } |
149 | 151 | |
150 | 152 | global $wgEdititis; |
151 | 153 | if ( $wgEdititis ) { |
152 | | - $editCount = $this->getLang()->formatNum( $row->edits ); |
| 154 | + $editCount = $lang->formatNum( $row->edits ); |
153 | 155 | $edits = ' [' . wfMsgExt( 'usereditcount', array( 'parsemag', 'escape' ), $editCount ) . ']'; |
154 | 156 | } else { |
155 | 157 | $edits = ''; |
— | — | @@ -157,8 +159,8 @@ |
158 | 160 | $created = ''; |
159 | 161 | # Some rows may be NULL |
160 | 162 | if( $row->creation ) { |
161 | | - $d = $this->getLang()->date( wfTimestamp( TS_MW, $row->creation ), true ); |
162 | | - $t = $this->getLang()->time( wfTimestamp( TS_MW, $row->creation ), true ); |
| 163 | + $d = $lang->date( wfTimestamp( TS_MW, $row->creation ), true ); |
| 164 | + $t = $lang->time( wfTimestamp( TS_MW, $row->creation ), true ); |
163 | 165 | $created = ' (' . wfMsg( 'usercreated', $d, $t ) . ')'; |
164 | 166 | $created = htmlspecialchars( $created ); |
165 | 167 | } |
Index: trunk/phase3/includes/specials/SpecialActiveusers.php |
— | — | @@ -119,6 +119,8 @@ |
120 | 120 | $ulinks = Linker::userLink( $row->user_id, $userName ); |
121 | 121 | $ulinks .= Linker::userToolLinks( $row->user_id, $userName ); |
122 | 122 | |
| 123 | + $lang = $this->getLang(); |
| 124 | + |
123 | 125 | $list = array(); |
124 | 126 | foreach( self::getGroups( $row->user_id ) as $group ) { |
125 | 127 | if ( isset( $this->groups[$group] ) ) { |
— | — | @@ -126,14 +128,14 @@ |
127 | 129 | } |
128 | 130 | $list[] = self::buildGroupLink( $group, $userName ); |
129 | 131 | } |
130 | | - $groups = $this->getLang()->commaList( $list ); |
| 132 | + $groups = $lang->commaList( $list ); |
131 | 133 | |
132 | | - $item = wfSpecialList( $ulinks, $groups ); |
| 134 | + $item = $lang->specialList( $ulinks, $groups ); |
133 | 135 | $count = wfMsgExt( 'activeusers-count', |
134 | 136 | array( 'parsemag' ), |
135 | | - $this->getLang()->formatNum( $row->recentedits ), |
| 137 | + $lang->formatNum( $row->recentedits ), |
136 | 138 | $userName, |
137 | | - $this->getLang()->formatNum( $this->RCMaxAge ) |
| 139 | + $lang->formatNum( $this->RCMaxAge ) |
138 | 140 | ); |
139 | 141 | $blocked = $row->blocked ? ' ' . wfMsgExt( 'listusers-blocked', array( 'parsemag' ), $userName ) : ''; |
140 | 142 | |
Index: trunk/phase3/includes/specials/SpecialAncientpages.php |
— | — | @@ -67,6 +67,6 @@ |
68 | 68 | $title, |
69 | 69 | htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) |
70 | 70 | ); |
71 | | - return wfSpecialList( $link, htmlspecialchars( $d ) ); |
| 71 | + return $this->getLang()->specialList( $link, htmlspecialchars( $d ) ); |
72 | 72 | } |
73 | 73 | } |
Index: trunk/phase3/includes/specials/SpecialProtectedpages.php |
— | — | @@ -142,7 +142,7 @@ |
143 | 143 | return Html::rawElement( |
144 | 144 | 'li', |
145 | 145 | array(), |
146 | | - wfSpecialList( $link . $stxt, $lang->commaList( $description_items ), false ) . $changeProtection ) . "\n"; |
| 146 | + $lang->specialList( $link . $stxt, $lang->commaList( $description_items ), false ) . $changeProtection ) . "\n"; |
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
Index: trunk/phase3/includes/specials/SpecialMostlinked.php |
— | — | @@ -99,6 +99,6 @@ |
100 | 100 | $link = Linker::link( $title ); |
101 | 101 | $wlh = $this->makeWlhLink( $title, |
102 | 102 | $this->msg( 'nlinks' )->numParams( $result->value )->escaped() ); |
103 | | - return wfSpecialList( $link, $wlh ); |
| 103 | + return $this->getLang()->specialList( $link, $wlh ); |
104 | 104 | } |
105 | 105 | } |
Index: trunk/phase3/includes/specials/SpecialMostlinkedcategories.php |
— | — | @@ -84,6 +84,6 @@ |
85 | 85 | $plink = Linker::link( $nt, htmlspecialchars( $text ) ); |
86 | 86 | |
87 | 87 | $nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped(); |
88 | | - return wfSpecialList( $plink, $nlinks ); |
| 88 | + return $this->getLang()->specialList( $plink, $nlinks ); |
89 | 89 | } |
90 | 90 | } |
Index: trunk/phase3/includes/QueryPage.php |
— | — | @@ -777,7 +777,7 @@ |
778 | 778 | array( 'broken' ) |
779 | 779 | ); |
780 | 780 | } |
781 | | - return wfSpecialList( $pageLink, $this->makeWlhLink( $title, $skin, $result ) ); |
| 781 | + return $this->getLang()->specialList( $pageLink, $this->makeWlhLink( $title, $skin, $result ) ); |
782 | 782 | } else { |
783 | 783 | $tsafe = htmlspecialchars( $result->title ); |
784 | 784 | return wfMsgHtml( 'wantedpages-badtitle', $tsafe ); |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -3702,6 +3702,22 @@ |
3703 | 3703 | } |
3704 | 3704 | |
3705 | 3705 | /** |
| 3706 | + * Make a list item, used by various special pages |
| 3707 | + * |
| 3708 | + * @param $page String Page link |
| 3709 | + * @param $details String Text between brackets |
| 3710 | + * @param $oppositedm Boolean Add the direction mark opposite to your |
| 3711 | + * language, to display text properly |
| 3712 | + * @return String |
| 3713 | + */ |
| 3714 | + function specialList( $page, $details, $oppositedm = true ) { |
| 3715 | + $dirmark = ( $oppositedm ? $this->getDirMark( true ) : '' ) . |
| 3716 | + $this->getDirMark(); |
| 3717 | + $details = $details ? $dirmark . " ($details)" : ''; |
| 3718 | + return $page . $details; |
| 3719 | + } |
| 3720 | + |
| 3721 | + /** |
3706 | 3722 | * Get the conversion rule title, if any. |
3707 | 3723 | * |
3708 | 3724 | * @return string |