Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -116,6 +116,7 @@ |
117 | 117 | Enable by setting $wgEnableJavaScriptTest to true. |
118 | 118 | * Extensions can use the RequestContextCreateSkin hook to override what skin is |
119 | 119 | loaded in some contexts. |
| 120 | +* (bug 33456) Show $wgQueryCacheLimit on cached query pages. |
120 | 121 | |
121 | 122 | === Bug fixes in 1.19 === |
122 | 123 | * $wgUploadNavigationUrl should be used for file redlinks if. |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -999,8 +999,8 @@ |
1000 | 1000 | 'badtitle' => 'Bad title', |
1001 | 1001 | 'badtitletext' => 'The requested page title was invalid, empty, or an incorrectly linked inter-language or inter-wiki title. |
1002 | 1002 | It may contain one or more characters which cannot be used in titles.', |
1003 | | -'perfcached' => 'The following data is cached and may not be up to date.', |
1004 | | -'perfcachedts' => 'The following data is cached, and was last updated $1.', |
| 1003 | +'perfcached' => 'The following data is cached and may not be up to date. A maximum of $1 results are available in the cache.', |
| 1004 | +'perfcachedts' => 'The following data is cached, and was last updated $1. A maximum of $4 results are available in the cache.', |
1005 | 1005 | 'querypage-no-updates' => 'Updates for this page are currently disabled. |
1006 | 1006 | Data here will not presently be refreshed.', |
1007 | 1007 | 'wrong_wfQuery_params' => 'Incorrect parameters to wfQuery()<br /> |
Index: trunk/phase3/languages/messages/MessagesQqq.php |
— | — | @@ -655,10 +655,12 @@ |
656 | 656 | * $1 is the page name', |
657 | 657 | 'badtitle' => 'The page title when a user requested a page with invalid page name. The content will be {{msg-mw|badtitletext}}.', |
658 | 658 | 'badtitletext' => 'The message shown when a user requested a page with invalid page name. The page title will be {{msg-mw|badtitle}}.', |
| 659 | +'perfcached' => 'Like {{msg-mw|perfcachedts}} but used when we do not know how long ago page was cached (unlikely to happen). $1 is the max result cut off ($wgQueryCacheLimit)', |
659 | 660 | 'perfcachedts' => 'Used on pages that list page lists for which the displayed data is cached. Parameters: |
660 | 661 | * $1 is a time stamp (date and time combined) |
661 | 662 | * $2 is a date (optional) |
662 | | -* $3 is a time (optional)', |
| 663 | +* $3 is a time (optional) |
| 664 | +* $4 is the cut off limit for cached results ($wgQueryCacheLimit). If there are more then this many results for the query, only the first $4 of those will be listed on the page. Usually $4 is about 1000.', |
663 | 665 | 'querypage-no-updates' => 'Text on some special pages, e.g. [[Special:FewestRevisions]].', |
664 | 666 | 'viewsource' => 'The text displayed in place of the "edit" tab when the user has no permission to edit the page. |
665 | 667 | |
Index: trunk/phase3/includes/QueryPage.php |
— | — | @@ -437,6 +437,7 @@ |
438 | 438 | * real, honest-to-gosh query page. |
439 | 439 | */ |
440 | 440 | function execute( $par ) { |
| 441 | + global $wgQueryCacheLimit; |
441 | 442 | if ( !$this->userCanExecute( $this->getUser() ) ) { |
442 | 443 | $this->displayRestrictionError(); |
443 | 444 | return; |
— | — | @@ -468,17 +469,18 @@ |
469 | 470 | |
470 | 471 | # Fetch the timestamp of this update |
471 | 472 | $ts = $this->getCachedTimestamp(); |
| 473 | + $lang = $this->getLanguage(); |
| 474 | + $maxResults = $lang->formatNum( $wgQueryCacheLimit ); |
472 | 475 | |
473 | 476 | if ( $ts ) { |
474 | | - $lang = $this->getLanguage(); |
475 | 477 | $updated = $lang->timeanddate( $ts, true, true ); |
476 | 478 | $updateddate = $lang->date( $ts, true, true ); |
477 | 479 | $updatedtime = $lang->time( $ts, true, true ); |
478 | 480 | $out->addMeta( 'Data-Cache-Time', $ts ); |
479 | 481 | $out->addInlineScript( "var dataCacheTime = '$ts';" ); |
480 | | - $out->addWikiMsg( 'perfcachedts', $updated, $updateddate, $updatedtime ); |
| 482 | + $out->addWikiMsg( 'perfcachedts', $updated, $updateddate, $updatedtime, $maxResults ); |
481 | 483 | } else { |
482 | | - $out->addWikiMsg( 'perfcached' ); |
| 484 | + $out->addWikiMsg( 'perfcached', $maxResults ); |
483 | 485 | } |
484 | 486 | |
485 | 487 | # If updates on this page have been disabled, let the user know |