Changing comments layout preparing for generated documentation with Phpdocumentor
[lhc/web/wiklou.git] / includes / SpecialCategories.php
1 <?php
2 /**
3 *
4 */
5
6 /**
7 *
8 */
9 require_once("QueryPage.php");
10
11 /**
12 *
13 */
14 class CategoriesPage extends QueryPage {
15
16 function getName() {
17 return "Categories";
18 }
19
20 function isExpensive() {
21 return false;
22 }
23
24 function getSQL() {
25 $NScat = NS_CATEGORY;
26 $dbr =& wfGetDB( DB_SLAVE );
27 $categorylinks = $dbr->tableName( 'categorylinks' );
28 return "SELECT DISTINCT 'Categories' as type,
29 {$NScat} as namespace,
30 cl_to as title,
31 1 as value
32 FROM $categorylinks";
33 }
34
35 function sortDescending() {
36 return false;
37 }
38
39 function formatResult( $skin, $result ) {
40 global $wgLang;
41 $title = Title::makeTitle( NS_CATEGORY, $result->title );
42 return $skin->makeLinkObj( $title, $title->getText() );
43 }
44 }
45
46 /**
47 *
48 */
49 function wfSpecialCategories() {
50 list( $limit, $offset ) = wfCheckLimits();
51
52 $cap = new CategoriesPage();
53
54 return $cap->doQuery( $offset, $limit );
55 }
56
57 ?>