/** * Constructor * * @access protected * @param string $gadget Gadget's name(filesystem name) * @return void */ protected function __construct($gadget) { parent::__construct($gadget); if (isset($GLOBALS['app']) && isset($GLOBALS['app']->Session)) { $this->user = (int) $GLOBALS['app']->Session->GetAttribute('user'); $default_theme = unserialize($GLOBALS['app']->Registry->fetch('theme', 'Settings')); $this->theme = $default_theme['name']; $this->locality = (int) $default_theme['locality']; } else { $this->user = 0; $this->theme = 'jaws'; $this->locality = 0; } }