You are here

function _ckeditor_requirements_cookiedomainset in CKEditor - WYSIWYG HTML editor 6

Same name and namespace in other branches
  1. 7 ckeditor.install \_ckeditor_requirements_cookiedomainset()

Checks if $cookie_domain was set.

It has to include settings.php again because conf_init() sets $cookie_domain regardless of its presence in settings.php, so simply checking $GLOBALS['cookie_domain'] is not possible.

This function is used by ckeditor_requirements().

Return value

boolean True iff $cookie_domain was set in settings.php.

1 call to _ckeditor_requirements_cookiedomainset()
ckeditor_requirements in ./ckeditor.install
Implementation of hook_requirements().

File

./ckeditor.install, line 472

Code

function _ckeditor_requirements_cookiedomainset() {
  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;
}