コード例 #1
0
 /**
  * Constructor
  * Set up the model with relevant tables and releated fields.
  * @return void
  */
 public function __construct()
 {
     // call AbstractSqlItem constructor
     parent::__construct();
     // set root directories
     $this->_setRootdirectoryForArea();
     // set table names
     $this->table_directory = $this->cfg->db('directory');
     $this->table_directory_lang = $this->cfg->db('directory_lang');
     // table directory
     $this->_addTable($this->table_directory);
     $this->_addTableFields($this->table_directory, array('name' => '', 'dirname' => '', 'parentid' => '', 'status' => '', 'area' => ''));
     $this->_addDefaultFields($this->table_directory);
     $this->_addRowMapping($this->table_directory, array('id' => 'iddirectory'));
     $this->_addDisabledFields($this->table_directory, array('idlang' => TRUE, 'ip' => TRUE, 'groupkey' => TRUE));
     // table directory_lang
     $this->_addTable($this->table_directory_lang);
     $this->_addTableFields($this->table_directory_lang, array('iddirectory' => '', 'description' => ''));
     $this->_addForeignkeys($this->table_directory_lang, array('iddirectory' => array('table' => $this->table_directory, 'foreignkey' => 'id')));
     $this->_addDefaultFields($this->table_directory_lang);
     $this->_addRowMapping($this->table_directory_lang, array('id' => 'iddirectorylang'));
     $this->_addDisabledFields($this->table_directory_lang, array('ip' => TRUE, 'groupkey' => TRUE));
     // set client settings if not yet set
     if (self::$client_settings['is_default'] == TRUE) {
         self::$client_settings['allow_invalid_dirnames'] = (int) $this->cfg->client('allow_invalid_dirnames', self::$client_settings['allow_invalid_dirnames']);
         unset(self::$client_settings['is_default']);
     }
 }
コード例 #2
0
ファイル: CodeSqlItem.php プロジェクト: rbraband/sefrengo
 /**
  * Constructor sets up the model with relevant tables and releated fields.
  */
 public function __construct()
 {
     // call AbstractSqlItem constructor
     parent::__construct();
     $this->table_code = $this->cfg->db('code');
     // table directory
     $this->_addTable($this->table_code);
     $this->_addTableFields($this->table_code, array('idcatside' => '', 'code' => '', 'changed' => '1'));
     $this->_addDefaultFields($this->table_code);
     $this->_addRowMapping($this->table_code, array('id' => 'idcode'));
     $this->_addDisabledFields($this->table_code, array('idclient' => TRUE, 'created' => TRUE, 'created_author' => TRUE, 'lastmodified' => TRUE, 'lastmodified_author' => TRUE, 'ip' => TRUE, 'groupkey' => TRUE));
 }
コード例 #3
0
ファイル: ValueSqlItem.php プロジェクト: rbraband/sefrengo
 /**
  * Constructor sets up the model with relevant tables and releated fields.
  */
 public function __construct()
 {
     // call AbstractSqlItem constructor
     parent::__construct();
     $this->table_values = $this->cfg->db('values');
     // table directory
     $this->_addTable($this->table_values);
     $this->_addTableFields($this->table_values, array('group_name' => '', 'description' => '', 'key1' => '', 'key2' => '', 'key3' => '', 'key4' => '', 'value' => '', 'conf_sortindex' => '', 'conf_desc_langstring' => '', 'conf_head_langstring' => '', 'conf_input_type' => '', 'conf_input_type_val' => '', 'conf_head_langstring' => '', 'conf_input_type_langstring' => '', 'conf_visible' => ''));
     $this->_addDefaultFields($this->table_values);
     $this->_addRowMapping($this->table_values, array('id' => 'idvalues'));
     $this->_addDisabledFields($this->table_values, array('created' => TRUE, 'created_author' => TRUE, 'lastmodified' => TRUE, 'lastmodified_author' => TRUE, 'ip' => TRUE, 'groupkey' => TRUE));
 }
コード例 #4
0
ファイル: EventSqlItem.php プロジェクト: rbraband/sefrengo
 /**
  * Constructor sets up the model with relevant tables and releated fields.
  */
 public function __construct()
 {
     // call AbstractSqlItem constructor
     parent::__construct();
     $this->table_values = $this->cfg->db('event');
     // table directory
     $this->_addTable($this->table_values);
     $this->_addTableFields($this->table_values, array('name' => '', 'code' => '', 'sortindex' => '', 'title' => '', 'description' => '', 'reference_type' => '', 'reference_id' => '', 'reference_name' => ''));
     $this->_addDefaultFields($this->table_values);
     $this->_addRowMapping($this->table_values, array('id' => 'idevent'));
     $this->_addDisabledFields($this->table_values, array('ip' => TRUE, 'groupkey' => TRUE));
 }
コード例 #5
0
ファイル: FiletypeSqlItem.php プロジェクト: rbraband/sefrengo
 /**
  * Constructor sets up the model with relevant tables and releated fields.
  */
 public function __construct()
 {
     // call AbstractSqlItem constructor
     parent::__construct();
     $this->table_filetype = $this->cfg->db('filetype');
     // table directory
     $this->_addTable($this->table_filetype);
     $this->_addTableFields($this->table_filetype, array('filetype' => '', 'description' => '', 'filetypepict' => '', 'status' => '', 'filetypegroup' => '', 'mimetype' => '', 'addinfo_names' => ''));
     $this->_addDefaultFields($this->table_filetype);
     $this->_addRowMapping($this->table_filetype, array('id' => 'idfiletype'));
     $this->_addDisabledFields($this->table_filetype, array('idlang' => TRUE, 'ip' => TRUE, 'groupkey' => TRUE));
 }
コード例 #6
0
ファイル: LogSqlItem.php プロジェクト: rbraband/sefrengo
 /**
  * Constructor sets up the model with relevant tables and releated fields.
  */
 public function __construct()
 {
     // call AbstractSqlItem constructor
     parent::__construct();
     // overwrite current_author with username and not id
     $this->itemcfg['current_author'] = $this->cfg->auth('uname');
     $this->table_logs = $this->cfg->db('logs');
     // set up table
     $this->_addTable($this->table_logs);
     $this->_addTableFields($this->table_logs, array('is_backend' => '', 'priority' => '', 'priorityname' => '', 'type' => '', 'message' => ''));
     $this->_addSerializedFields($this->table_logs, array('param' => ''));
     $this->_addDefaultFields($this->table_logs);
     $this->_addRowMapping($this->table_logs, array('id' => 'idlog'));
     $this->_addDisabledFields($this->table_logs, array('groupkey' => TRUE));
 }
コード例 #7
0
ファイル: FileSqlItem.php プロジェクト: rbraband/sefrengo
 /**
  * Constructor sets up the model with relevant tables and releated fields.
  * @return void
  */
 public function __construct()
 {
     // call AbstractSqlItem constructor
     parent::__construct();
     // set root directories
     $this->_setRootdirectoryForArea();
     // set table names
     $this->table_upl = $this->cfg->db('upl');
     $this->table_upl_lang = $this->cfg->db('upl_lang');
     // table upl
     $this->_addTable($this->table_upl);
     $this->_addTableFields($this->table_upl, array('filename' => '', 'iddirectory' => '', 'idfiletype' => '', 'pictwidth' => '', 'pictheight' => '', 'pictcolor' => '', 'pictthumbwidth' => '', 'pictthumbheight' => '', 'filesize' => '', 'area' => '', 'status' => ''));
     $this->_addSerializedFields($this->table_upl, array('configdata' => ''));
     $this->_addDefaultFields($this->table_upl);
     $this->_addRowMapping($this->table_upl, array('id' => 'idupl'));
     $this->_addDisabledFields($this->table_upl, array('idlang' => TRUE, 'ip' => TRUE, 'groupkey' => TRUE));
     // table upl_lang
     $this->_addTable($this->table_upl_lang);
     $this->_addTableFields($this->table_upl_lang, array('idupl' => '', 'title' => '', 'description' => ''));
     $this->_addForeignkeys($this->table_upl_lang, array('idupl' => array('table' => $this->table_upl, 'foreignkey' => 'id')));
     $this->_addDefaultFields($this->table_upl_lang);
     $this->_addRowMapping($this->table_upl_lang, array('id' => 'idupllang'));
     $this->_addDisabledFields($this->table_upl_lang, array('ip' => TRUE, 'groupkey' => TRUE));
     // set thumbnail settings if not yet set from client configuration
     if (self::$thumbnail_settings['is_default'] == TRUE) {
         // get default thumbnail settings and clear it
         $thumbnail_settings = self::$thumbnail_settings;
         self::$thumbnail_settings = array();
         $thumbnail_settings['generate_thumb'] = explode(',', $this->cfg->client('generate_thumb', implode(',', $thumbnail_settings['generate_thumb'])));
         $thumbnail_settings['thumb_extension'] = $this->cfg->client('thumbext', $thumbnail_settings['thumb_extension']);
         $thumbnail_settings['thumb_size'] = $this->cfg->client('thumb_size', $thumbnail_settings['thumb_size']);
         // note the underscore between $client_cfg['thumb_aspectratio'] and 'thumb_aspect_ratio'!
         $thumbnail_settings['thumb_aspect_ratio'] = $this->cfg->client('thumb_aspectratio', $thumbnail_settings['thumb_aspect_ratio']);
         $thumbnail_settings['more_thumb_size'] = explode(',', $this->cfg->client('more_thumb_size', implode(',', $thumbnail_settings['more_thumb_size'])));
         $thumbnail_settings['more_thumb_aspect_ratio'] = explode(',', $this->cfg->client('more_thumb_aspect_ratio', implode(',', $thumbnail_settings['more_thumb_aspect_ratio'])));
         unset($thumbnail_settings['is_default']);
         $this->setGlobalThumbnailSettings($thumbnail_settings);
     }
     // set client settings if not yet set
     if (self::$client_settings['is_default'] == TRUE) {
         self::$client_settings['allow_invalid_filenames'] = (int) $this->cfg->client('allow_invalid_filenames', self::$client_settings['allow_invalid_filenames']);
         unset(self::$client_settings['is_default']);
     }
 }