DB error log
[lhc/web/wiklou.git] / includes / SpecialAsksql.php
index 150137c..63fefb1 100644 (file)
@@ -1,10 +1,20 @@
 <?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;
        }