<?php
+#
+# If enabled through $wgAllowSysopQueries = true, this class
+# let users with sysop right the possibility to make sql queries
+# against the cur table.
+# Heavy queries could slow down the database specially for the
+# biggest wikis.
function wfSpecialAsksql()
{
- global $wgUser, $wgOut, $wgRequest;
+ global $wgUser, $wgOut, $wgRequest, $wgAllowSysopQueries;
- if ( ! $wgUser->isSysop() ) {
+ if( !$wgAllowSysopQueries ) {
+ $wgOut->errorpage( "nosuchspecialpage", "nospecialpagetext" );
+ return;
+ }
+ if( !$wgUser->isSysop() ) {
$wgOut->sysopRequired();
return;
}