function memcache_admin_init in Zircon Profile 8
Same name and namespace in other branches
- 8.0 modules/memcache/memcache_admin/memcache_admin.module \memcache_admin_init()
For the collection of memcache stats. This small .js file makes sure that the HTML displaying the stats is inside of the <body> part of the HTML document.
File
- modules/
memcache/ memcache_admin/ memcache_admin.module, line 8
Code
function memcache_admin_init() {
global $user;
if ($user->uid == 0 || strstr($_SERVER['PHP_SELF'], 'update.php') || isset($_GET['q']) && (in_array($_GET['q'], array(
'upload/js',
'admin/content/node-settings/rebuild',
)) || substr($_GET['q'], 0, strlen('system/files')) == 'system/files' || substr($_GET['q'], 0, strlen('batch')) == 'batch' || strstr($_GET['q'], 'autocomplete'))) {
// update.php relies on standard error handler
}
else {
if ($user->uid) {
drupal_add_js(drupal_get_path('module', 'memcache_admin') . '/memcache.js');
}
register_shutdown_function('memcache_admin_shutdown');
}
}