Esempio n. 1
0
 /**
  * Simple initialisation method
  *
  */
 public function init()
 {
     if (self::$cs) {
         Sobi::Error('config', SPLang::e('CRITICAL_SECTION_VIOLATED'), SPC::ERROR, 500, __LINE__, __CLASS__);
     }
     /* define critical section to avoid infinite loops */
     self::$cs = true;
     $nameField = self::key('entry.name_field');
     if ($nameField) {
         $fc = SPLoader::loadModel('field');
         $field = new $fc();
         $field->init($nameField);
         $this->set('name_field_nid', $field->get('nid'), 'entry');
         $this->set('name_field_id', $field->get('fid'), 'entry');
     }
     if (defined('SOBIPRO_ADM')) {
         if (self::key('language.adm_domain')) {
             SPLang::registerDomain(self::key('language.adm_domain'));
         }
     } else {
         if (self::key('language.domain')) {
             SPLang::registerDomain(self::key('language.domain'));
         }
     }
     /* set allowed request attributes and tags */
     SPRequest::setTagsAllowed($this->key('html.allowed_tags_array'));
     SPRequest::setAttributesAllowed($this->key('html.allowed_attributes_array'));
     $this->_store['general']['root'] = SOBI_ROOT;
     $this->_store['general']['path'] = SOBI_PATH;
     $this->_store['general']['cms'] = SOBI_CMS;
     $this->_store['general']['live_path'] = SOBI_LIVE_PATH;
     /* leave critical section */
     self::$cs = false;
 }