<?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
{
$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);
SpecialPage::addPage( new ShowProcesslistPage );
} # End of extension function
+} # End of invocation guard
?>