From 2675a066d9d0f9ddfbb4e3e8594dfba6f4f81e2e Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 3 Jan 2007 23:42:28 +0000 Subject: [PATCH] Advise users when updates for a query page have been disabled using $wgDisableQueryPageUpdate --- RELEASE-NOTES | 3 ++- includes/QueryPage.php | 8 ++++++++ languages/messages/MessagesEn.php | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d18d38d1bd..29cbecbb25 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -457,7 +457,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Attempt to detect redirect loops for the canonical title redirect, and give some hints to the poor confused administrator. * Introduce new flag 'R' - raw output for language variant escape tags - +* Advise users when updates for a query page have been disabled using + $wgDisableQueryPageUpdate == Languages updated == diff --git a/includes/QueryPage.php b/includes/QueryPage.php index e4f55516ea..ff6355e754 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -312,6 +312,14 @@ class QueryPage { } $wgOut->addWikiText( $cacheNotice ); + + # If updates on this page have been disabled, let the user know + # that the data set won't be refreshed for now + global $wgDisableQueryPageUpdate; + if( is_array( $wgDisableQueryPageUpdate ) && in_array( $this->getName(), $wgDisableQueryPageUpdate ) ) { + $wgOut->addWikiText( wfMsg( 'querypage-no-updates' ) ); + } + } } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index ff1852d73a..d5653c4dc6 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -764,6 +764,7 @@ Please report this to an administrator, making note of the URL.', 'perfdisabledsub' => 'Here is a saved copy from $1:', # obsolete? 'perfcached' => 'The following data is cached and may not be up to date.', 'perfcachedts' => 'The following data is cached, and was last updated $1.', +'querypage-no-updates' => 'Updates for this page are currently disabled. Data here will not presently be refreshed.', 'wrong_wfQuery_params' => 'Incorrect parameters to wfQuery()
Function: $1
Query: $2', -- 2.20.1