Remove bundled copy of PHPTAL, no longer needed for MonoBook. The user can install...
[lhc/web/wiklou.git] / extensions / ShowProcesslist.php
index 3a29e47..23f1597 100644 (file)
@@ -1,10 +1,12 @@
 <?php
+# Not a valid entry point, skip unless MEDIAWIKI is defined
+if (defined('MEDIAWIKI')) {
 
 $wgExtensionFunctions[] = "wfShowProcesslist";
 
 function wfShowProcesslist() {
-
-require_once( 'includes/SpecialPage.php' );
+global $IP;
+require_once( "$IP/includes/SpecialPage.php" );
 
 class ShowProcesslistPage extends UnlistedSpecialPage
 {
@@ -23,7 +25,7 @@ class ShowProcesslistPage extends UnlistedSpecialPage
 
                $res=wfQuery("SHOW FULL PROCESSLIST",DB_READ);
                $output=array();
-               $output = "<table border=1>";
+               $output = '<table border="1">';
                while ( $row=wfFetchObject($res)){
                        $output .= "<tr>";
                        $fields = get_object_vars($row);
@@ -41,4 +43,5 @@ class ShowProcesslistPage extends UnlistedSpecialPage
 SpecialPage::addPage( new ShowProcesslistPage );
 
 } # End of extension function
+} # End of invocation guard
 ?>