Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchByProperty.php |
— | — | @@ -238,16 +238,43 @@ |
239 | 239 | global $smwgQMaxInlineLimit; |
240 | 240 | |
241 | 241 | if ( $this->offset > 0 ) { |
242 | | - $navigation = '<a href="' . htmlspecialchars( $skin->makeSpecialUrl( 'SearchByProperty', 'offset=' . max( 0, $this->offset - $this->limit ) . '&limit=' . $this->limit . '&property=' . urlencode( $this->property->getWikiValue() ) . '&value=' . urlencode( $this->value->getWikiValue() ) ) ) . '">' . wfMsg( 'smw_result_prev' ) . '</a>'; |
| 242 | + $navigation = Html::element( |
| 243 | + 'a', |
| 244 | + array( |
| 245 | + 'href' => SpecialPage::getSafeTitleFor( 'SearchByProperty' )->getLocalURL( array( |
| 246 | + 'offset' => max( 0, $this->offset - $this->limit ), |
| 247 | + 'limit' => $this->limit, |
| 248 | + 'property' => $this->property->getWikiValue(), |
| 249 | + 'value' => $this->value->getWikiValue() |
| 250 | + ) ) |
| 251 | + ), |
| 252 | + wfMsg( 'smw_result_prev' ) |
| 253 | + ); |
243 | 254 | } |
244 | 255 | else { |
245 | 256 | $navigation = wfMsg( 'smw_result_prev' ); |
246 | 257 | } |
247 | 258 | |
248 | | - $navigation .= '     <b>' . wfMsg( 'smw_result_results' ) . ' ' . ( $this->offset + 1 ) . '– ' . ( $this->offset + min( $count, $this->limit ) ) . '</b>    '; |
| 259 | + $navigation .= |
| 260 | + '     <b>' . |
| 261 | + wfMsg( 'smw_result_results' ) . ' ' . |
| 262 | + ( $this->offset + 1 ) . '– ' . |
| 263 | + ( $this->offset + min( $count, $this->limit ) ) . |
| 264 | + '</b>    '; |
249 | 265 | |
250 | 266 | if ( $count > $this->limit ) { |
251 | | - $navigation .= ' <a href="' . htmlspecialchars( $skin->makeSpecialUrl( 'SearchByProperty', 'offset=' . ( $this->offset + $this->limit ) . '&limit=' . $this->limit . '&property=' . urlencode( $this->property->getWikiValue() ) . '&value=' . urlencode( $this->value->getWikiValue() ) ) ) . '">' . wfMsg( 'smw_result_next' ) . '</a>'; |
| 267 | + $navigation .= Html::element( |
| 268 | + 'a', |
| 269 | + array( |
| 270 | + 'href' => SpecialPage::getSafeTitleFor( 'SearchByProperty' )->getLocalURL( array( |
| 271 | + 'offset' => $this->offset + $this->limit, |
| 272 | + 'limit' => $this->limit, |
| 273 | + 'property' => $this->property->getWikiValue(), |
| 274 | + 'value' => $this->value->getWikiValue() |
| 275 | + ) ) |
| 276 | + ), |
| 277 | + wfMsg( 'smw_result_next' ) |
| 278 | + ); |
252 | 279 | } else { |
253 | 280 | $navigation .= wfMsg( 'smw_result_next' ); |
254 | 281 | } |
— | — | @@ -271,7 +298,18 @@ |
272 | 299 | } |
273 | 300 | |
274 | 301 | if ( $this->limit != $l ) { |
275 | | - $navigation .= '<a href="' . htmlspecialchars( $skin->makeSpecialUrl( 'SearchByProperty', 'offset=' . $this->offset . '&limit=' . $l . '&property=' . urlencode( $this->property->getWikiValue() ) . '&value=' . urlencode( $this->value->getWikiValue() ) ) ) . '">' . $l . '</a>'; |
| 302 | + $navigation .= Html::element( |
| 303 | + 'a', |
| 304 | + array( |
| 305 | + 'href' => SpecialPage::getSafeTitleFor( 'SearchByProperty' )->getLocalURL( array( |
| 306 | + 'offset' => $this->offset, |
| 307 | + 'limit' => $l, |
| 308 | + 'property' => $this->property->getWikiValue(), |
| 309 | + 'value' => $this->value->getWikiValue() |
| 310 | + ) ) |
| 311 | + ), |
| 312 | + $l |
| 313 | + ); |
276 | 314 | } else { |
277 | 315 | $navigation .= '<b>' . $l . '</b>'; |
278 | 316 | } |
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php |
— | — | @@ -176,10 +176,10 @@ |
177 | 177 | $body .= Html::element( |
178 | 178 | 'a', |
179 | 179 | array( |
180 | | - 'href' => SpecialPage::getSafeTitleFor( 'SearchByProperty' )->getLocalURL( |
181 | | - 'property=' . urlencode( $dvProperty->getWikiValue() ) . |
182 | | - '&value=' . urlencode( $this->subject->getWikiValue() ) |
183 | | - ) |
| 180 | + 'href' => SpecialPage::getSafeTitleFor( 'SearchByProperty' )->getLocalURL( array( |
| 181 | + 'property' => $dvProperty->getWikiValue(), |
| 182 | + 'value' => $this->subject->getWikiValue() |
| 183 | + ) ) |
184 | 184 | ), |
185 | 185 | wfMsg( "smw_browse_more" ) |
186 | 186 | ); |
— | — | @@ -302,10 +302,10 @@ |
303 | 303 | return Html::element( |
304 | 304 | 'a', |
305 | 305 | array( |
306 | | - 'href' => SpecialPage::getSafeTitleFor( 'Browse' )->getLocalURL( |
307 | | - "offset={$offset}&dir={$dir}" . |
308 | | - '&article=' . urlencode( $this->subject->getLongWikiText() ) . $frag |
309 | | - ) |
| 306 | + 'href' => SpecialPage::getSafeTitleFor( 'Browse' )->getLocalURL( array( |
| 307 | + 'offset' => "{$offset}&dir={$dir}", |
| 308 | + 'article' => $this->subject->getLongWikiText() . $frag |
| 309 | + ) ) |
310 | 310 | ), |
311 | 311 | $text |
312 | 312 | ); |
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php |
— | — | @@ -77,12 +77,12 @@ |
78 | 78 | $navigation = Html::element( |
79 | 79 | 'a', |
80 | 80 | array( |
81 | | - 'href' => SpecialPage::getSafeTitleFor( 'PageProperty' )->getLocalURL( |
82 | | - 'offset=' . max( 0, $offset - $limit ) . |
83 | | - '&limit=' . $limit . |
84 | | - '&type=' . urlencode( $propname ) . |
85 | | - '&from=' . urlencode( $pagename ) |
86 | | - ) |
| 81 | + 'href' => SpecialPage::getSafeTitleFor( 'PageProperty' )->getLocalURL( array( |
| 82 | + 'offset' => max( 0, $offset - $limit ), |
| 83 | + 'limit' => $limit, |
| 84 | + 'type' => $propname, |
| 85 | + 'from' => $pagename |
| 86 | + ) ) |
87 | 87 | ), |
88 | 88 | wfMsg( 'smw_result_prev' ) |
89 | 89 | ); |
— | — | @@ -100,12 +100,12 @@ |
101 | 101 | $navigation = Html::element( |
102 | 102 | 'a', |
103 | 103 | array( |
104 | | - 'href' => SpecialPage::getSafeTitleFor( 'PageProperty' )->getLocalURL( |
105 | | - 'offset=' . ( $offset + $limit ) . |
106 | | - '&limit=' . $limit . |
107 | | - '&type=' . urlencode( $propname ) . |
108 | | - '&from=' . urlencode( $pagename ) |
109 | | - ) |
| 104 | + 'href' => SpecialPage::getSafeTitleFor( 'PageProperty' )->getLocalURL( array( |
| 105 | + 'offset' => ( $offset + $limit ), |
| 106 | + 'limit' => $limit, |
| 107 | + 'type' => $propname, |
| 108 | + 'from' => $pagename |
| 109 | + ) ) |
110 | 110 | ), |
111 | 111 | wfMsg( 'smw_result_next' ) |
112 | 112 | ); |