示例#1
0
 function __construct($primaryID = 0)
 {
     parent::__construct($primaryID);
     // Force "Enable fixtures" for tournaments
     if ($this->getCompetitionType() == 'Tournament') {
         $this->setFieldDB('FixturesEnable', TRUE);
     }
 }
 /**
  * overwrite __construct() function
  * @return void
  */
 function __construct($list_title)
 {
     # these variables are assumed to be globally available
     global $user;
     global $list_state;
     global $class_listtableattachment_fields;
     $this->_user =& $user;
     $this->_list_state =& $list_state;
     $table_name = $this->_convert_list_name_to_table_name($list_title);
     # call parent __construct()
     parent::__construct($table_name, $class_listtableattachment_fields, LISTTABLEATTACHMENT_METADATA);
     $this->_log->debug("constructed new ListTableAttachment object");
 }
 /**
  * overwrite __construct() function
  * @param $table_name string table name of this DatabaseTable object
  * @param $fields array array containing all database fields of this DatabaseTable object
  * @param $metadat_str string string indicating which metadata should be stored for this DatabaseTable object
  * @return void
  */
 function __construct($table_name, $fields, $metadata_str)
 {
     # these variables are assumed to be globally available
     global $list_state;
     global $user;
     global $user_list_permissions;
     # call parent __construct()
     parent::__construct($table_name, $fields, $metadata_str);
     # set global references for this object
     $this->_list_state =& $list_state;
     $this->_user =& $user;
     $this->_user_list_permissions =& $user_list_permissions;
     $this->_json = new Services_JSON();
     self::reset();
     $this->db_field_names_decimal_marks_to_replace = array();
     foreach ($this->db_field_names as $db_field_name) {
         if ($this->fields[$db_field_name][1] == FIELD_TYPE_DEFINITION_FLOAT) {
             if ($this->_user->get_decimal_mark() == DECIMAL_MARK_COMMA) {
                 array_push($this->db_field_names_decimal_marks_to_replace, $db_field_name);
             }
         }
     }
     $this->_log->debug("constructed UserDatabaseTable (table_name=" . $this->table_name . ", metadata_str=" . $metadata_str . ")");
 }