/** * Instanciate the specified theme */ public function &createInstance($options = array(), $initArgs = array()) { // Grab the theme folder from request vars if present if (@empty($options['folderName'])) { // xoops_theme_select still exists to keep compatibilitie ... if (($req = @$_REQUEST['xoops_theme_select']) && $this->isThemeAllowed($req)) { $options['folderName'] = $req; if (isset($_SESSION) && $this->allowUserSelection) { $_SESSION[$this->xoBundleIdentifier]['defaultTheme'] = $req; } } elseif (($req = @$_REQUEST['theme_select']) && $this->isThemeAllowed($req)) { $options['folderName'] = $req; if (isset($_SESSION) && $this->allowUserSelection) { $_SESSION[$this->xoBundleIdentifier]['defaultTheme'] = $req; } } elseif (isset($_SESSION[$this->xoBundleIdentifier]['defaultTheme'])) { $options['folderName'] = $_SESSION[$this->xoBundleIdentifier]['defaultTheme']; } elseif (@empty($options['folderName']) || !$this->isThemeAllowed($options['folderName'])) { $options['folderName'] = $this->defaultTheme; } $GLOBALS['icmsConfig']['theme_set'] = $options['folderName']; } $options['path'] = is_dir(ICMS_MODULES_PATH . '/system/themes/' . $options['folderName']) ? ICMS_MODULES_PATH . '/system/themes/' . $options['folderName'] : ICMS_THEME_PATH . '/' . $options['folderName']; $inst = new icms_view_theme_Object(); foreach ($options as $k => $v) { $inst->{$k} = $v; } $inst->xoInit(); return $inst; }
public function xoInit($options = array()) { parent::xoInit($options); $this->_deprecated('icms_view_theme_Object', sprintf(_CORE_REMOVE_IN_VERSION, '1.4')); }