X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=profileinfo.php;h=b47033a7233f69c955115efe14dac5fdc18f9e66;hb=5e56acb64a25d4f5c8d49b6c4417228362aa229f;hp=ccf59fecab358f6b0dbc6e2367bb1cf75792b0f5;hpb=8a0282e238f665c1f71eff5724c1961d7d38ec79;p=lhc%2Fweb%2Fwiklou.git diff --git a/profileinfo.php b/profileinfo.php index ccf59fecab..b47033a723 100644 --- a/profileinfo.php +++ b/profileinfo.php @@ -28,8 +28,14 @@ ini_set( 'zlib.output_compression', 'off' ); $wgEnableProfileInfo = $wgProfileToDatabase = false; +if ( isset( $_SERVER['MW_COMPILED'] ) ) { + require ( 'phase3/includes/WebStart.php' ); +} else { + require ( dirname( __FILE__ ) . '/includes/WebStart.php' ); +} + -require_once( './includes/WebStart.php' ); +header( 'Content-Type: text/html; charset=utf-8' ); ?> @@ -72,6 +78,17 @@ if ( !$wgEnableProfileInfo ) { exit( 1 ); } +$dbr = wfGetDB( DB_SLAVE ); + +if( !$dbr->tableExists( 'profileinfo' ) ) { + echo "
No 'profileinfo' table exists, so we can't show you anything.
\n"; + echo "If you want to log profiling data, create the table using " + . "maintenance/archives/patch-profiling.sql and enable " + . "\$wgProfileToDatabase.
\n"; + echo "