Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_QueryPage.php |
— | — | @@ -37,9 +37,8 @@ |
38 | 38 | * |
39 | 39 | * @param $offset database query offset |
40 | 40 | * @param $limit database query limit |
41 | | - * @param $shownavigation show navigation like "next 200"? |
42 | 41 | */ |
43 | | - function doQuery( $offset, $limit, $shownavigation = true ) { |
| 42 | + function doQuery( $offset = false, $limit = false ) { |
44 | 43 | global $wgOut, $wgContLang; |
45 | 44 | |
46 | 45 | $options = new SMWRequestOptions(); |
— | — | @@ -52,27 +51,26 @@ |
53 | 52 | $sk = $this->getSkin(); |
54 | 53 | $sname = $this->getName(); |
55 | 54 | |
56 | | - if ( $shownavigation ) { |
57 | | - $wgOut->addHTML( $this->getPageHeader() ); |
| 55 | + $wgOut->addHTML( $this->getPageHeader() ); |
58 | 56 | |
59 | | - // if list is empty, show it |
60 | | - if ( $num == 0 ) { |
61 | | - smwfLoadExtensionMessages( 'SemanticMediaWiki' ); |
62 | | - $wgOut->addHTML( '<p>' . wfMsgHTML( 'specialpage-empty' ) . '</p>' ); |
63 | | - return; |
64 | | - } |
| 57 | + // if list is empty, show it |
| 58 | + if ( $num == 0 ) { |
| 59 | + smwfLoadExtensionMessages( 'SemanticMediaWiki' ); |
| 60 | + $wgOut->addHTML( '<p>' . wfMsgHTML( 'specialpage-empty' ) . '</p>' ); |
| 61 | + return; |
| 62 | + } |
65 | 63 | |
66 | | - $top = wfShowingResults( $offset, $num ); |
67 | | - $wgOut->addHTML( "<p>{$top}\n" ); |
| 64 | + $top = wfShowingResults( $offset, $num ); |
| 65 | + $wgOut->addHTML( "<p>{$top}\n" ); |
68 | 66 | |
69 | | - // often disable 'next' link when we reach the end |
70 | | - $atend = $num < $limit; |
| 67 | + // often disable 'next' link when we reach the end |
| 68 | + $atend = $num < $limit; |
71 | 69 | |
72 | | - $sl = wfViewPrevNext( $offset, $limit , |
73 | | - $wgContLang->specialPage( $sname ), |
74 | | - wfArrayToCGI( $this->linkParameters() ), $atend ); |
75 | | - $wgOut->addHTML( "<br />{$sl}</p>\n" ); |
76 | | - } |
| 70 | + $sl = wfViewPrevNext( $offset, $limit , |
| 71 | + $wgContLang->specialPage( $sname ), |
| 72 | + wfArrayToCGI( $this->linkParameters() ), $atend ); |
| 73 | + $wgOut->addHTML( "<br />{$sl}</p>\n" ); |
| 74 | + |
77 | 75 | if ( $num > 0 ) { |
78 | 76 | $s = array(); |
79 | 77 | if ( ! $this->listoutput ) |
— | — | @@ -90,9 +88,9 @@ |
91 | 89 | $str = $this->listoutput ? $wgContLang->listToText( $s ) : implode( '', $s ); |
92 | 90 | $wgOut->addHTML( $str ); |
93 | 91 | } |
94 | | - if ( $shownavigation ) { |
95 | | - $wgOut->addHTML( "<p>{$sl}</p>\n" ); |
96 | | - } |
| 92 | + |
| 93 | + $wgOut->addHTML( "<p>{$sl}</p>\n" ); |
| 94 | + |
97 | 95 | return $num; |
98 | 96 | } |
99 | 97 | |
— | — | @@ -114,4 +112,3 @@ |
115 | 113 | } |
116 | 114 | |
117 | 115 | } |
118 | | - |