* @since 1.19 $context is a second, required parameter
* @param $title Title
* @param $context IContextSource
* @since 1.19 $context is a second, required parameter
* @param $title Title
* @param $context IContextSource
- * @param $from String
- * @param $until String
+ * @param $from Array An array with keys page, subcat,
+ * and file for offset of results of each section (since 1.17)
+ * @param $until Array An array with 3 keys for until of each section (since 1.17)
- function __construct( $title, IContextSource $context, $from = '', $until = '', $query = array() ) {
+ function __construct( $title, IContextSource $context, $from = array(), $until = array(), $query = array() ) {
*/
function addSubcategory( Title $title, $sortkey, $pageLength ) {
wfDeprecated( __METHOD__, '1.17' );
*/
function addSubcategory( Title $title, $sortkey, $pageLength ) {
wfDeprecated( __METHOD__, '1.17' );
- * Get the character to be used for sorting subcategories.
- * If there's a link from Category:A to Category:B, the sortkey of the resulting
- * entry in the categorylinks table is Category:A, not A, which it SHOULD be.
- * Workaround: If sortkey == "Category:".$title, than use $title for sorting,
- * else use sortkey...
- *
- * @param Title $title
- * @param string $sortkey The human-readable sortkey (before transforming to icu or whatever).
+ * Get the character to be used for sorting subcategories.
+ * If there's a link from Category:A to Category:B, the sortkey of the resulting
+ * entry in the categorylinks table is Category:A, not A, which it SHOULD be.
+ * Workaround: If sortkey == "Category:".$title, than use $title for sorting,
+ * else use sortkey...
+ *
+ * @param Title $title
+ * @param string $sortkey The human-readable sortkey (before transforming to icu or whatever).
$this->children_start_char = array_reverse( $this->children_start_char );
}
if ( $this->flip['page'] ) {
$this->children_start_char = array_reverse( $this->children_start_char );
}
if ( $this->flip['page'] ) {
$this->articles_start_char = array_reverse( $this->articles_start_char );
}
if ( !$this->showGallery && $this->flip['file'] ) {
$this->articles_start_char = array_reverse( $this->articles_start_char );
}
if ( !$this->showGallery && $this->flip['file'] ) {
'page_is_redirect', 'cl_sortkey', 'cat_id', 'cat_title',
'cat_subcats', 'cat_pages', 'cat_files',
'cl_sortkey_prefix', 'cl_collation' ),
'page_is_redirect', 'cl_sortkey', 'cat_id', 'cat_title',
'cat_subcats', 'cat_pages', 'cat_files',
'cl_sortkey_prefix', 'cl_collation' ),
- 'categorylinks' => array( 'INNER JOIN', 'cl_from = page_id' ),
- 'category' => array( 'LEFT JOIN', 'cat_title = page_title AND page_namespace = ' . NS_CATEGORY )
+ 'categorylinks' => array( 'INNER JOIN', 'cl_from = page_id' ),
+ 'category' => array( 'LEFT JOIN', array(
+ 'cat_title = page_title',
+ 'page_namespace' => NS_CATEGORY
+ ))
$list = self::columnList( $articles, $articles_start_char );
} elseif ( count( $articles ) > 0 ) {
// for short lists of articles in categories.
$list = self::columnList( $articles, $articles_start_char );
} elseif ( count( $articles ) > 0 ) {
// for short lists of articles in categories.
$pageLang = $this->title->getPageLanguage();
$attribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(),
$pageLang = $this->title->getPageLanguage();
$attribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(),
return Title::makeTitle( $title->getNamespace(),
$title->getDBkey(), $fragment );
}
return Title::makeTitle( $title->getNamespace(),
$title->getDBkey(), $fragment );
}
/**
* What to do if the category table conflicts with the number of results
* returned? This function says what. Each type is considered independently
/**
* What to do if the category table conflicts with the number of results
* returned? This function says what. Each type is considered independently