<?php
-
-if ( !defined( 'MEDIAWIKI' ) )
- die( 1 );
+/**
+ * List and paging of category members.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
class CategoryViewer extends ContextSource {
var $limit, $from, $until,
$imgsNoGallery;
/**
- * @var
+ * @var Array
*/
var $nextPage;
$r = wfMsgExt( 'category-empty', array( 'parse' ) );
}
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$langAttribs = array( 'lang' => $lang->getCode(), 'dir' => $lang->getDir() );
# put a div around the headings which are in the user language
$r = Html::openElement( 'div', $langAttribs ) . $r . '</div>';
* @deprecated since 1.17 kept for compatibility, please use addSubcategoryObject instead
*/
function addSubcategory( Title $title, $sortkey, $pageLength ) {
+ wfDeprecated( __METHOD__, '1.17' );
$this->addSubcategoryObject( Category::newFromTitle( $title ), $sortkey, $pageLength );
}
*
* @param Title $title
* @param string $sortkey The human-readable sortkey (before transforming to icu or whatever).
- */
+ * @return string
+ */
function getSubcategorySortChar( $title, $sortkey ) {
global $wgContLang;
# Split into three columns
$columns = array_chunk( $columns, ceil( count( $columns ) / 3 ), true /* preserve keys */ );
- $ret = '<table width="100%"><tr valign="top"><td>';
+ $ret = '<table width="100%"><tr valign="top">';
$prevchar = null;
foreach ( $columns as $column ) {
+ $ret .= '<td width="33.3%">';
$colContents = array();
# Kind of like array_flip() here, but we keep duplicates in an
$prevchar = $char;
}
- $ret .= "</td>\n<td>";
+ $ret .= "</td>\n";
}
- $ret .= '</td></tr></table>';
+ $ret .= '</tr></table>';
return $ret;
}
);
}
- return "($prevLink) ($nextLink)";
+ return $this->msg('categoryviewer-pagedlinks')->rawParams($prevLink, $nextLink)->escaped();
}
/**