*/
// Set to true to add more debug messages to the error log
-define('GLM_SERVERSTATS_PLUGIN_DEBUG', false);
+define('GLM_SERVERSTATS_PLUGIN_DEBUG', true);
// Database Connection
define('GLM_SERVERSTATS_DATABASE_NAME', 'bandwidth');
*/
function glmServerStatsAjax()
{
-
+ $glmAjaxActionCalled = true;
$glmAction = false;
// Get the requested model
// Call controller to handle AJAX request - Ajax models should not return to controller
if ($glmAction && $glmAction != '') {
- serverStatsController($glmAction);
+ serverStatsController($glmAction, true);
}
}
* model and the view.
*
*/
-function serverStatsController($model)
+function serverStatsController($model, $isAjax = false)
{
if (GLM_SERVERSTATS_PLUGIN_DEBUG) {
trigger_error("GLM Usage Controller Start: Model = $model", E_USER_NOTICE );
}
+ if (GLM_SERVERSTATS_PLUGIN_DEBUG && !$isAjax) {
+ trigger_error("GLM Usage Plugin Debug Enabled: *** Turn off for production *** - See defines.php", E_USER_NOTICE );
+ }
+
// Enque admin scripts and css here so that only happens when we're doing something
glmServerJqueryScipts();
glmServerStatsScripts();