public function init() { parent::init(); if (!function_exists('simplexml_load_string')) { require_once IA_INCLUDES . 'utils' . IA_DS . 'simplexml.class.php'; $this->_foreign = new simplexml(); } }
public function init() { parent::init(); $this->_cachingEnabled = true; if (!file_exists($this->_savePath)) { iaCore::instance()->util()->makeDirCascade($this->_savePath, 0777); } $mask = !function_exists('posix_getuid') || function_exists('posix_getuid') && posix_getuid() != fileowner(IA_HOME . 'index' . iaSystem::EXECUTABLE_FILE_EXT) ? 0777 : 0755; chmod($this->_savePath, $mask); }
/** * Set default user and group * @param bool $user * @param bool $group * @return void */ public function init() { parent::init(); $this->iaCore->factory('users'); $user = iaUsers::hasIdentity() ? iaUsers::getIdentity()->id : 0; $group = iaUsers::hasIdentity() ? iaUsers::getIdentity()->usergroup_id : 4; $objects = array(); $actions = array(); $rows = $this->iaCore->iaDb->all(iaDb::ALL_COLUMNS_SELECTION, null, null, null, $this->_dbTableObjects); foreach ($rows as $row) { if ($row['object'] != $row['pre_object']) { $row['object'] = $row['pre_object'] . '-' . $row['object']; } $key = $row['object']; isset($actions[$key]) || ($actions[$key] = array()); $actions[$key][] = $row['action']; $objects[$row['object'] . self::DELIMITER . $row['action']] = (int) $row['access']; } $this->_actions = $actions; $this->_objects = $objects; if (empty($this->_permissions) || $user !== false || $group !== false) { $this->_permissions = $this->getPermissions($user, $group); } }
public function init() { parent::init(); $this->resources = new iaStore(array('css' => new iaStore(), 'js' => new iaStore())); }