function memcache_admin_init in Memcache API and Integration 5
Same name and namespace in other branches
- 6 memcache_admin/memcache_admin.module \memcache_admin_init()
- 7 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
- memcache_admin/
memcache_admin.module, line 8
Code
function memcache_admin_init() {
global $user;
if ($user->uid == 0 || strstr($_SERVER['PHP_SELF'], 'update.php') || 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');
}
}