Index: branches/unlabeled/unlabeled-1.17.2/core/units/groups/groups_config.php =================================================================== diff -u -r7701 -r7829 --- branches/unlabeled/unlabeled-1.17.2/core/units/groups/groups_config.php (.../groups_config.php) (revision 7701) +++ branches/unlabeled/unlabeled-1.17.2/core/units/groups/groups_config.php (.../groups_config.php) (revision 7829) @@ -71,7 +71,7 @@ ), 'Fields' => Array ( - 'GroupId' => Array(), + 'GroupId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Name' => Array('type' => 'string', 'not_null' => '1', 'required' => 1, 'default' => ''), 'Description' => Array('type' => 'string','default' => ''), 'CreatedOn' => Array('type' => 'double', 'formatter' => 'kDateFormatter', 'not_null' => '1','default' => '#NOW#'), Index: branches/unlabeled/unlabeled-1.21.2/core/units/languages/languages_config.php =================================================================== diff -u -r7813 -r7829 --- branches/unlabeled/unlabeled-1.21.2/core/units/languages/languages_config.php (.../languages_config.php) (revision 7813) +++ branches/unlabeled/unlabeled-1.21.2/core/units/languages/languages_config.php (.../languages_config.php) (revision 7829) @@ -143,7 +143,7 @@ ) ), 'Fields' => Array( - 'LanguageId' => Array('type' => 'int'), + 'LanguageId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'PackName' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1), 'LocalName' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1), 'Enabled' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1, 'not_null' => '1', 'default' => 1), Index: branches/unlabeled/unlabeled-1.10.2/core/units/phrases/phrases_config.php =================================================================== diff -u -r7701 -r7829 --- branches/unlabeled/unlabeled-1.10.2/core/units/phrases/phrases_config.php (.../phrases_config.php) (revision 7701) +++ branches/unlabeled/unlabeled-1.10.2/core/units/phrases/phrases_config.php (.../phrases_config.php) (revision 7829) @@ -108,7 +108,7 @@ 'Phrase' => Array('type' => 'string','required'=>1,'unique'=>Array('LanguageId'),'not_null' => '1','default' => ''), 'Translation' => Array('type' => 'string','required'=>1,'not_null' => '1','default' => ''), 'PhraseType' => Array('type' => 'int','required'=>1,'formatter'=>'kOptionsFormatter','options'=>Array(0=>'la_PhraseType_Front',1=>'la_PhraseType_Admin',2=>'la_PhraseType_Both'), 'use_phrases' => 1, 'not_null' => '1','default' => '0'), - 'PhraseId' => Array('type' => 'int','not_null' => '1','default' => ''), + 'PhraseId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'LanguageId' => Array('type' => 'int','not_null' => '1','default' => '0'), 'LastChanged' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'not_null' => '1','default' => '0'), 'LastChangeIP' => Array('type' => 'string','not_null' => '1','default' => ''), Index: branches/unlabeled/unlabeled-1.65.2/core/kernel/utility/unit_config_reader.php =================================================================== diff -u -r7828 -r7829 --- branches/unlabeled/unlabeled-1.65.2/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 7828) +++ branches/unlabeled/unlabeled-1.65.2/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 7829) @@ -350,67 +350,81 @@ $this->Application->ReplacementTemplates = array_merge_recursive2($this->Application->ReplacementTemplates, $config['ReplacementTemplates']); } - if ( $this->Application->isDebugMode() && constOn('DBG_VALIDATE_CONFIGS') && isset($config['TableName']) ) - { - global $debugger; - $tablename = $config['TableName']; + if ( $this->Application->isDebugMode(false) && constOn('DBG_VALIDATE_CONFIGS') && isset($config['TableName']) ) { + $this->ValidateConfig($prefix); + } + } - $conn =& $this->Application->GetADODBConnection(); - - $table_found = $conn->Query('SHOW TABLES LIKE "'.$tablename.'"'); - if (!$table_found) { - // config present, but table missing, strange - $debugger->appendHTML("Config Warning: Table $tablename missing, but prefix ".$config['Prefix']." requires it!"); - safeDefine('DBG_RAISE_ON_WARNINGS', 1); - return ; - } - - $res = $conn->Query("DESCRIBE $tablename"); + function ValidateConfig($prefix) + { + global $debugger; + + $config =& $this->configData[$prefix]; + + $tablename = $config['TableName']; - foreach ($res as $field) { - $f_name = $field['Field']; - if (getArrayValue($config, 'Fields')) { - if (preg_match('/l[\d]+_[\w]/', $f_name)) { - // skip multilingual fields - continue; - } - - if (!array_key_exists ($f_name, $config['Fields'])) { - $debugger->appendHTML("Config Warning: Field $f_name exists in the database, but is not defined in config file for prefix ".$config['Prefix']." !"); - safeDefine('DBG_RAISE_ON_WARNINGS', 1); - } - else { - $options = $config['Fields'][$f_name]; - if ($field['Null'] != 'YES') { - // MySQL5 for null returns "NO", but MySQL4 returns "" - if ( $f_name != $config['IDField'] && !isset($options['not_null']) && !isset($options['required']) ) { - $debugger->appendHTML("Config Error: Field $f_name in config for prefix ".$config['Prefix']." is NOT NULL in the database, but is not configured as not_null or required !"); - safeDefine('DBG_RAISE_ON_WARNINGS', 1); - } - if ( isset($options['not_null']) && !isset($options['default']) ) { - $debugger->appendHTML("Config Error: Field $f_name in config for prefix ".$config['Prefix']." is described as NOT NULL, but does not have DEFAULT value !"); - safeDefine('DBG_RAISE_ON_WARNINGS', 1); - } - - if (!isset($options['default'])) { - $debugger->appendHTML("Config Error: Default value for field $f_name in config for prefix ".$config['Prefix']." not set !"); - safeDefine('DBG_RAISE_ON_WARNINGS', 1); - } - else if ($options['default'] != '#NOW#' && $field['Default'] !== (string)$options['default']) { - $debugger->appendHTML("Config Error: Default value for field $f_name (".var_export($options['default'], true).") in config for prefix ".$config['Prefix']." differs from default value from field in database (".var_export($field['Default'], true).") !"); - $debugger->dumpVars($field['Default'], $options['default'], 'STRICT'); - safeDefine('DBG_RAISE_ON_WARNINGS', 1); - } - - // check that all idfields have default values & are not_null!!! + $conn =& $this->Application->GetADODBConnection(); + + $table_found = $conn->Query('SHOW TABLES LIKE "'.$tablename.'"'); + if (!$table_found) { + // config present, but table missing, strange + $debugger->appendHTML("Config Warning: Table $tablename missing, but prefix ".$config['Prefix']." requires it!"); + safeDefine('DBG_RAISE_ON_WARNINGS', 1); + return ; + } + + $res = $conn->Query("DESCRIBE $tablename"); + + $config_link = $debugger->getFileLink(FULL_PATH.$this->prefixFiles[$config['Prefix']], 1, $config['Prefix']); + + foreach ($res as $field) { + $f_name = $field['Field']; + if (getArrayValue($config, 'Fields')) { + if (preg_match('/l[\d]+_[\w]/', $f_name)) { + // skip multilingual fields + continue; + } + + if (!array_key_exists ($f_name, $config['Fields'])) { + $debugger->appendHTML("Config Warning: Field $f_name exists in the database, but is not defined in config file for prefix ".$config_link." !"); + safeDefine('DBG_RAISE_ON_WARNINGS', 1); + } + else { + $options = $config['Fields'][$f_name]; + if ($field['Null'] != 'YES') { + // MySQL5 for null returns "NO", but MySQL4 returns "" + if ( $f_name != $config['IDField'] && !isset($options['not_null']) && !isset($options['required']) ) { + $debugger->appendHTML("Config Error: Field $f_name in config for prefix ".$config_link." is NOT NULL in the database, but is not configured as not_null or required !"); + safeDefine('DBG_RAISE_ON_WARNINGS', 1); } - + if ( isset($options['not_null']) && !isset($options['default']) ) { + $debugger->appendHTML("Config Error: Field $f_name in config for prefix ".$config_link." is described as NOT NULL, but does not have DEFAULT value !"); + safeDefine('DBG_RAISE_ON_WARNINGS', 1); + } + + if (!isset($options['default'])) { + $debugger->appendHTML("Config Error: Default value for field $f_name in config for prefix ".$config_link." not set !"); + safeDefine('DBG_RAISE_ON_WARNINGS', 1); + } + elseif ($f_name == $config['IDField'] && $options['default'] !== 0) { + $debugger->appendHTML("Config Error: Default value for field IDField $f_name (".var_export($options['default'], true).") in config for prefix ".$config_link." differs from default value from field in database (".var_export($field['Default'], true).") !"); + safeDefine('DBG_RAISE_ON_WARNINGS', 1); + } + else if ($options['default'] != '#NOW#' && $field['Default'] !== (string)$options['default']) { + $debugger->appendHTML("Config Error: Default value for field $f_name (".var_export($options['default'], true).") in config for prefix ".$config_link." differs from default value from field in database (".var_export($field['Default'], true).") !"); +// $debugger->dumpVars($field['Default'], $options['default'], 'STRICT'); + safeDefine('DBG_RAISE_ON_WARNINGS', 1); + } + + // check that all idfields have default values & are not_null!!! } + } } } + } - + function ProcessDependencies($prefix) { $config =& $this->configData[$prefix]; Index: branches/unlabeled/unlabeled-1.2.2/core/install/upgrades.sql =================================================================== diff -u -r7816 -r7829 --- branches/unlabeled/unlabeled-1.2.2/core/install/upgrades.sql (.../upgrades.sql) (revision 7816) +++ branches/unlabeled/unlabeled-1.2.2/core/install/upgrades.sql (.../upgrades.sql) (revision 7829) @@ -37,4 +37,13 @@ CHANGE CreatedOn CreatedOn INT NOT NULL DEFAULT '0', CHANGE dob dob INT(11) NULL DEFAULT NULL, CHANGE PassResetTime PassResetTime INT(11) UNSIGNED NULL DEFAULT NULL, - CHANGE PwRequestTime PwRequestTime INT(11) UNSIGNED NULL DEFAULT NULL; \ No newline at end of file + CHANGE PwRequestTime PwRequestTime INT(11) UNSIGNED NULL DEFAULT NULL; + +ALTER TABLE Modules CHANGE BuildDate BuildDate INT UNSIGNED NULL DEFAULT NULL; +ALTER TABLE Language + CHANGE Enabled Enabled INT(11) NOT NULL DEFAULT '1', + CHANGE InputDateFormat InputDateFormat VARCHAR(50) NOT NULL DEFAULT 'm/d/Y', + CHANGE InputTimeFormat InputTimeFormat VARCHAR(50) NOT NULL DEFAULT 'g:i:s A', + CHANGE DecimalPoint DecimalPoint CHAR(2) NOT NULL DEFAULT ''; + +ALTER TABLE Events CHANGE FromUserId FromUserId INT(11) NOT NULL DEFAULT '-1'; \ No newline at end of file Index: branches/unlabeled/unlabeled-1.4.2/core/units/user_groups/user_groups_config.php =================================================================== diff -u -r7652 -r7829 --- branches/unlabeled/unlabeled-1.4.2/core/units/user_groups/user_groups_config.php (.../user_groups_config.php) (revision 7652) +++ branches/unlabeled/unlabeled-1.4.2/core/units/user_groups/user_groups_config.php (.../user_groups_config.php) (revision 7829) @@ -48,8 +48,8 @@ ), 'Fields' => Array( - 'PortalUserId' => Array('type' => 'int'), - 'GroupId' => Array('type' => 'int', 'not_null' => 1, 'default' => 1), + 'PortalUserId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), + 'GroupId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'MembershipExpires' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''), 'PrimaryGroup' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1), 'ExpirationReminderSent' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), Index: branches/unlabeled/unlabeled-1.34.2/core/units/users/users_config.php =================================================================== diff -u -r7816 -r7829 --- branches/unlabeled/unlabeled-1.34.2/core/units/users/users_config.php (.../users_config.php) (revision 7816) +++ branches/unlabeled/unlabeled-1.34.2/core/units/users/users_config.php (.../users_config.php) (revision 7829) @@ -129,7 +129,7 @@ 'Fields' => Array ( - 'PortalUserId' => Array(), + 'PortalUserId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Login' => Array('type' => 'string', 'unique'=>Array('Login'), 'default' => '','required'=>1, 'error_msgs' => Array('unique'=>'!lu_user_already_exist!')), 'Password' => Array('type' => 'string', 'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5', 'verify_field' => 'VerifyPassword', 'skip_empty' => 1, 'default' => md5('') ), 'FirstName' => Array('type' => 'string','default' => ''), @@ -169,7 +169,7 @@ 'PassResetTime' => Array('type' => 'int','default' => null), 'PwResetConfirm' => Array('type' => 'string','default' => ''), 'PwRequestTime' => Array('type' => 'int','default' => null), - 'MinPwResetDelay' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array('300' => '5', '600' => '10', '900' => '15', '1800' => '30', '3600' => '60'), 'use_phrases' => 0, 'not_null' => '1', 'default' => 30), + 'MinPwResetDelay' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(300 => '5', 600 => '10', 900 => '15', 1800 => '30', 3600 => '60'), 'use_phrases' => 0, 'not_null' => '1', 'default' => 1800), ), 'VirtualFields' => Array( Index: branches/unlabeled/unlabeled-1.12.2/core/units/custom_fields/custom_fields_config.php =================================================================== diff -u -r7816 -r7829 --- branches/unlabeled/unlabeled-1.12.2/core/units/custom_fields/custom_fields_config.php (.../custom_fields_config.php) (revision 7816) +++ branches/unlabeled/unlabeled-1.12.2/core/units/custom_fields/custom_fields_config.php (.../custom_fields_config.php) (revision 7829) @@ -73,7 +73,7 @@ 'SubItems' => Array('confs-cf'), 'Fields' => Array( - 'CustomFieldId' => Array('type' => 'int','not_null' => '1','default' => ''), + 'CustomFieldId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Type' => Array('type' => 'int','not_null' => '1','default' => '0'), 'FieldName' => Array('required'=>'1', 'type' => 'string','not_null' => 1,'default' => ''), 'FieldLabel' => Array('type' => 'string', 'required' => 1, 'default' => ''), Index: branches/unlabeled/unlabeled-1.8.2/core/units/modules/modules_config.php =================================================================== diff -u -r7821 -r7829 --- branches/unlabeled/unlabeled-1.8.2/core/units/modules/modules_config.php (.../modules_config.php) (revision 7821) +++ branches/unlabeled/unlabeled-1.8.2/core/units/modules/modules_config.php (.../modules_config.php) (revision 7829) @@ -93,7 +93,7 @@ ), 'Fields' => Array( - 'Name' => Array('type' => 'string','not_null' => '1','default' => ''), + 'Name' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), 'Path' => Array('type' => 'string','not_null' => '1','default' => ''), 'Var' => Array('type' => 'string','not_null' => '1','default' => ''), 'Version' => Array('type' => 'string','not_null' => '1','default' => ''), Index: branches/unlabeled/unlabeled-1.9.4/core/units/custom_data/custom_data_config.php =================================================================== diff -u -r5451 -r7829 --- branches/unlabeled/unlabeled-1.9.4/core/units/custom_data/custom_data_config.php (.../custom_data_config.php) (revision 5451) +++ branches/unlabeled/unlabeled-1.9.4/core/units/custom_data/custom_data_config.php (.../custom_data_config.php) (revision 7829) @@ -74,7 +74,7 @@ 'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'), 'Fields' => Array( - 'CustomDataId' => Array(), + 'CustomDataId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'ResourceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), ), ); Index: branches/unlabeled/unlabeled-1.4.2/core/units/permissions/permissions_config.php =================================================================== diff -u -r7652 -r7829 --- branches/unlabeled/unlabeled-1.4.2/core/units/permissions/permissions_config.php (.../permissions_config.php) (revision 7652) +++ branches/unlabeled/unlabeled-1.4.2/core/units/permissions/permissions_config.php (.../permissions_config.php) (revision 7829) @@ -76,7 +76,7 @@ ) ), 'Fields' => Array( - 'PermissionId' => Array(), + 'PermissionId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Permission' => Array('type' => 'string','not_null' => '1','default' => ''), 'GroupId' => Array('type' => 'int','default' => '0'), 'PermissionValue' => Array('type' => 'int','not_null' => '1','default' => '0'), Index: branches/unlabeled/unlabeled-1.15.2/core/units/configuration/configuration_config.php =================================================================== diff -u -r5497 -r7829 --- branches/unlabeled/unlabeled-1.15.2/core/units/configuration/configuration_config.php (.../configuration_config.php) (revision 5497) +++ branches/unlabeled/unlabeled-1.15.2/core/units/configuration/configuration_config.php (.../configuration_config.php) (revision 7829) @@ -12,9 +12,10 @@ 1 => 'id', 2 => 'page', 3 => 'event', + 4 => 'mode', ), - 'IDField' => 'VariableName', + 'IDField' => 'VariableId', 'TitlePresets' => Array( 'default' => Array('tag_params' => Array('conf' => Array('per_page' => -1))), @@ -56,10 +57,11 @@ ), 'Fields' => Array( - 'VariableName' => Array('type' => 'string','not_null' => '1','default' => ''), - 'VariableValue' => array('type'=>'string', 'default'=>''), - 'ModuleOwner' => array('type'=>'string', 'default'=>'In-Portal'), - 'Section' => array('type'=>'string','not_null' => '1','default'=>''), + 'VariableId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'VariableName' => Array('type' => 'string','not_null' => '1','default' => ''), + 'VariableValue' => Array('type'=>'string', 'default'=>''), + 'ModuleOwner' => Array('type'=>'string', 'default'=>'In-Portal'), + 'Section' => Array('type'=>'string','not_null' => '1','default'=>''), ), 'VirtualFields' => Array( Index: branches/unlabeled/unlabeled-1.30.2/core/kernel/db/dbitem.php =================================================================== diff -u -r7725 -r7829 --- branches/unlabeled/unlabeled-1.30.2/core/kernel/db/dbitem.php (.../dbitem.php) (revision 7725) +++ branches/unlabeled/unlabeled-1.30.2/core/kernel/db/dbitem.php (.../dbitem.php) (revision 7829) @@ -323,7 +323,7 @@ { $skip = false; $skip = $skip || ( isset($this->VirtualFields[$field_name]) ); //skipping 'virtual' field - $skip = $skip || ( !getArrayValue($this->FieldValues, $field_name) && getArrayValue($this->Fields[$field_name], 'skip_empty') ); //skipping 'virtual' field + $skip = $skip || ( !getArrayValue($this->FieldValues, $field_name) && getArrayValue($this->Fields[$field_name], 'skip_empty') ); //skipping marked field with 'skip_empty' // $skip = $skip || ($field_name == $this->IDField && !$force_id); //skipping Primary Key // $table_name = preg_replace("/^(.*)\./", "$1", $field_name); @@ -675,38 +675,43 @@ $fields_sql = ''; $values_sql = ''; - foreach ($this->FieldValues as $field_name => $field_value) - { + foreach ($this->FieldValues as $field_name => $field_value) { if ($this->SkipField($field_name, $force_id)) continue; - - $fields_sql .= sprintf('`%s`, ',$field_name); //Adding field name to fields block of Insert statement - //Adding field' value to Values block of Insert statement, escaping it with ADODB' qstr - if (is_null( $this->FieldValues[$field_name] )) - { - if (isset($this->Fields[$field_name]['not_null']) && $this->Fields[$field_name]['not_null']) - { - $values_sql .= $this->Conn->qstr($this->Fields[$field_name]['default']).', '; + + //Adding field' value to Values block of Insert statement, escaping it with qstr + if (is_null( $this->FieldValues[$field_name] )) { + if (isset($this->Fields[$field_name]['not_null']) && $this->Fields[$field_name]['not_null']) { + if ($field_name == $this->IDField) { + $values_sql .= 'DEFAULT'; + } + else { + $values_sql .= $this->Conn->qstr($this->Fields[$field_name]['default'], 0); + } } - else - { - $values_sql .= 'NULL, '; + else { + $values_sql .= 'NULL'; } } - else - { - $values_sql .= sprintf('%s, ',$this->Conn->qstr($this->FieldValues[$field_name], 0)); + else { + $values_sql .= $this->Conn->qstr($this->FieldValues[$field_name], 0); } + + $fields_sql .= '`'.$field_name.'`, '; //Adding field name to fields block of Insert statement + $values_sql .= ', '; } //Cutting last commas and spaces $fields_sql = ereg_replace(", $", '', $fields_sql); $values_sql = ereg_replace(", $", '', $values_sql); $sql = sprintf('INSERT INTO %s (%s) VALUES (%s)', $this->TableName, $fields_sql, $values_sql); //Formatting query //Executing the query and checking the result - if($this->Conn->ChangeQuery($sql) === false) return false; + if ($this->Conn->ChangeQuery($sql) === false) return false; $insert_id = $this->Conn->getInsertID(); - if($insert_id == 0) $insert_id = $this->FieldValues[$this->IDField]; + if ($insert_id == 0) { + // insert into temp table (id is not auto-increment field) + $insert_id = $this->FieldValues[$this->IDField]; + } $this->setID($insert_id); if (!$system_create){ @@ -855,7 +860,7 @@ */ function GetID() { - return $this->ID; + return is_null($this->ID) ? $this->Fields[$this->IDField]['default'] : $this->ID; } /** @@ -866,7 +871,7 @@ */ function generateID() { - return 0; + return null; } /** Index: branches/unlabeled/unlabeled-1.4.2/core/install/install_schema.sql =================================================================== diff -u -r7816 -r7829 --- branches/unlabeled/unlabeled-1.4.2/core/install/install_schema.sql (.../install_schema.sql) (revision 7816) +++ branches/unlabeled/unlabeled-1.4.2/core/install/install_schema.sql (.../install_schema.sql) (revision 7829) @@ -87,7 +87,7 @@ EventId int(11) NOT NULL auto_increment, Event varchar(40) NOT NULL default '', Enabled int(11) NOT NULL default '1', - FromUserId int(11) NOT NULL default '0', + FromUserId int(11) NOT NULL default '-1', Module varchar(40) NOT NULL default '', Description varchar(255) NOT NULL default '', Type int(11) NOT NULL default '0', @@ -102,16 +102,16 @@ LanguageId int(11) NOT NULL auto_increment, PackName varchar(40) NOT NULL default '', LocalName varchar(40) NOT NULL default '', - Enabled int(11) NOT NULL default '0', + Enabled int(11) NOT NULL default '1', PrimaryLang int(11) NOT NULL default '0', IconURL varchar(255) default NULL, DateFormat varchar(50) NOT NULL default '', TimeFormat varchar(50) NOT NULL default '', - InputDateFormat varchar(50) NOT NULL default '', - InputTimeFormat varchar(50) NOT NULL default '', - DecimalPoint char(2) NOT NULL default '.', - ThousandSep tinytext NULL, - Charset varchar(20) NOT NULL default '', + InputDateFormat varchar(50) NOT NULL default 'm/d/Y', + InputTimeFormat varchar(50) NOT NULL default 'g:i:s A', + DecimalPoint char(2) NOT NULL default '', + ThousandSep tinytext, + `Charset` varchar(20) NOT NULL default '', UnitSystem tinyint(4) NOT NULL default '1', PRIMARY KEY (LanguageId) ); @@ -125,7 +125,7 @@ LoadOrder tinyint(4) NOT NULL default '0', TemplatePath varchar(255) NOT NULL default '', RootCat int(11) NOT NULL default '0', - BuildDate double NOT NULL default '0', + BuildDate int(10) unsigned default NULL, PRIMARY KEY (Name) ); Index: branches/unlabeled/unlabeled-1.3.2/core/units/email_messages/email_messages_config.php =================================================================== diff -u -r7812 -r7829 --- branches/unlabeled/unlabeled-1.3.2/core/units/email_messages/email_messages_config.php (.../email_messages_config.php) (revision 7812) +++ branches/unlabeled/unlabeled-1.3.2/core/units/email_messages/email_messages_config.php (.../email_messages_config.php) (revision 7829) @@ -54,7 +54,7 @@ ), 'Fields' => Array ( - 'EmailMessageId' => Array(), + 'EmailMessageId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Template' => Array('type' => 'string','default' => ''), 'ReplacementTags' => Array ('type' => 'string', 'not_null' => 1, 'default' => 'a:0:{}'), 'MessageType' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array('text'=>'la_Text','html'=>'la_Html'), 'not_null' => '1','default' => 'text'), Index: branches/unlabeled/unlabeled-1.55.2/core/units/categories/categories_config.php =================================================================== diff -u -r7816 -r7829 --- branches/unlabeled/unlabeled-1.55.2/core/units/categories/categories_config.php (.../categories_config.php) (revision 7816) +++ branches/unlabeled/unlabeled-1.55.2/core/units/categories/categories_config.php (.../categories_config.php) (revision 7829) @@ -220,7 +220,7 @@ 'Fields' => Array ( - 'CategoryId' => Array('type' => 'int','not_null' => 1,'default' => ''), + 'CategoryId' => Array('type' => 'int','not_null' => 1,'default' => 0), 'Type' => Array('type' => 'int','not_null' => 1,'default' => 0), 'ParentId' => Array('type' => 'int','not_null' => 1,'default' => 0), 'Name' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'required' => 1, 'default' => ''), Index: branches/unlabeled/unlabeled-1.7.2/core/units/email_events/email_events_config.php =================================================================== diff -u -r7661 -r7829 --- branches/unlabeled/unlabeled-1.7.2/core/units/email_events/email_events_config.php (.../email_events_config.php) (revision 7661) +++ branches/unlabeled/unlabeled-1.7.2/core/units/email_events/email_events_config.php (.../email_events_config.php) (revision 7829) @@ -57,7 +57,7 @@ ), 'Fields' => Array( - 'EventId' => Array(), + 'EventId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Event' => Array('type' => 'string','not_null' => '1','default' => ''), 'Enabled' => Array('type'=>'int', 'formatter'=>'kOptionsFormatter', 'options' => Array(1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Text_FrontOnly'), 'use_phrases' => 1, 'default' => 1, 'not_null' => 1), 'FromUserId' => Array('formatter' => 'kLEFTFormatter','options' => Array(-1=>'root'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'required'=>1, 'not_null' => 1, 'default' => -1), Index: branches/unlabeled/unlabeled-1.8.2/core/units/themes/themes_config.php =================================================================== diff -u -r6796 -r7829 --- branches/unlabeled/unlabeled-1.8.2/core/units/themes/themes_config.php (.../themes_config.php) (revision 6796) +++ branches/unlabeled/unlabeled-1.8.2/core/units/themes/themes_config.php (.../themes_config.php) (revision 7829) @@ -63,7 +63,7 @@ ) ), 'Fields' => Array( - 'ThemeId' => Array(), + 'ThemeId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Name' => Array('type' => 'string','not_null' => '1','default' => ''), 'Enabled' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1=>'la_Enabled', 0=>'la_Disabled'), 'use_phrases'=>1, 'not_null' => '1','default' => '1'), 'Description' => Array('type' => 'string','default' => ''),