function tinybrowser_requirements_check_cookie_domain in TinyBrowser 7
Checks if $cookie_domain is set at settings.php
It has to be set at settings.php because conf_init() sets the $cookie_odmain regardless of the presence in the settings.php. So checking the global $cookie_domain is not good enough.
2 calls to tinybrowser_requirements_check_cookie_domain()
- tinybrowser_requirements in ./
tinybrowser.install - Implements hook_requirements().
- tinybrowser_settings_form in ./
tinybrowser.module
File
- ./
tinybrowser.module, line 764
Code
function tinybrowser_requirements_check_cookie_domain() {
if (file_exists('./' . conf_path() . '/settings.php')) {
$settings = file_get_contents('./' . conf_path() . '/settings.php');
if (preg_match('#^\\s*\\$cookie_domain#m', $settings)) {
return TRUE;
}
}
return FALSE;
}