Attached Files |
not_null_fix_core.patch [^] (39,757 bytes) 2010-09-22 04:12
[Show Content]
Index: install/install_schema.sql
===================================================================
--- install/install_schema.sql (revision 13951)
+++ install/install_schema.sql (working copy)
@@ -115,7 +115,7 @@
MessageType varchar(4) NOT NULL DEFAULT 'text',
Enabled int(11) NOT NULL DEFAULT '1',
FrontEndOnly tinyint(3) unsigned NOT NULL DEFAULT '0',
- Module varchar(40) NOT NULL DEFAULT '',
+ Module varchar(40) NOT NULL DEFAULT 'Core',
Description text,
`Type` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (EventId),
@@ -144,13 +144,13 @@
Priority int(11) NOT NULL DEFAULT '0',
IconURL varchar(255) DEFAULT NULL,
IconDisabledURL varchar(255) DEFAULT NULL,
- DateFormat varchar(50) NOT NULL DEFAULT '',
- TimeFormat varchar(50) NOT NULL DEFAULT '',
+ DateFormat varchar(50) NOT NULL DEFAULT 'm/d/Y',
+ TimeFormat varchar(50) NOT NULL DEFAULT 'g:i:s A',
InputDateFormat varchar(50) NOT NULL DEFAULT 'm/d/Y',
InputTimeFormat varchar(50) NOT NULL DEFAULT 'g:i:s A',
- DecimalPoint varchar(10) NOT NULL DEFAULT '',
+ DecimalPoint varchar(10) NOT NULL DEFAULT '.',
ThousandSep varchar(10) NOT NULL DEFAULT '',
- `Charset` varchar(20) NOT NULL DEFAULT '',
+ `Charset` varchar(20) NOT NULL DEFAULT 'utf-8',
UnitSystem tinyint(4) NOT NULL DEFAULT '1',
FilenameReplacements text,
Locale varchar(10) NOT NULL DEFAULT 'en-US',
@@ -420,14 +420,14 @@
`Status` tinyint(4) NOT NULL DEFAULT '1',
Priority int(11) NOT NULL DEFAULT '0',
MetaKeywords text,
- CachedDescendantCatsQty int(11) DEFAULT NULL,
+ CachedDescendantCatsQty int(11) NOT NULL DEFAULT '0',
CachedNavbar text,
l1_CachedNavbar text,
l2_CachedNavbar text,
l3_CachedNavbar text,
l4_CachedNavbar text,
l5_CachedNavbar text,
- CreatedById int(11) NOT NULL DEFAULT '0',
+ CreatedById int(11) DEFAULT NULL,
ResourceId int(11) DEFAULT NULL,
ParentPath text,
TreeLeft bigint(20) NOT NULL DEFAULT '0',
@@ -438,7 +438,7 @@
NewItem int(11) NOT NULL DEFAULT '2',
PopItem int(11) NOT NULL DEFAULT '2',
Modified int(11) DEFAULT NULL,
- ModifiedById int(11) NOT NULL DEFAULT '0',
+ ModifiedById int(11) DEFAULT NULL,
CachedTemplate varchar(255) NOT NULL DEFAULT '',
Template varchar(255) NOT NULL DEFAULT '#inherit#',
UseExternalUrl tinyint(3) unsigned NOT NULL DEFAULT '0',
@@ -792,10 +792,10 @@
ReviewId int(11) NOT NULL AUTO_INCREMENT,
CreatedOn int(10) unsigned DEFAULT NULL,
ReviewText longtext,
- Rating tinyint(3) unsigned DEFAULT NULL,
+ Rating tinyint(3) unsigned NOT NULL DEFAULT '0',
IPAddress varchar(255) NOT NULL DEFAULT '',
ItemId int(11) NOT NULL DEFAULT '0',
- CreatedById int(11) NOT NULL DEFAULT '-1',
+ CreatedById int(11) DEFAULT NULL,
ItemType tinyint(4) NOT NULL DEFAULT '0',
Priority int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '2',
@@ -835,7 +835,7 @@
Size int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '1',
CreatedOn int(11) unsigned DEFAULT NULL,
- CreatedById int(11) NOT NULL DEFAULT '-1',
+ CreatedById int(11) DEFAULT NULL,
MimeType varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (FileId),
KEY ResourceId (ResourceId),
Index: install/upgrades.sql
===================================================================
--- install/upgrades.sql (revision 13951)
+++ install/upgrades.sql (working copy)
@@ -1951,4 +1951,29 @@
ADD INDEX ( `Protected` );
UPDATE Category SET `Type` = IF(`Protected` = 1, 2, 1);
-UPDATE Category SET `Protected` = 1 WHERE ThemeId > 0;
\ No newline at end of file
+UPDATE Category SET `Protected` = 1 WHERE ThemeId > 0;
+
+ALTER TABLE Category CHANGE CachedDescendantCatsQty CachedDescendantCatsQty INT(11) NOT NULL DEFAULT '0';
+ALTER TABLE Events CHANGE `Module` `Module` VARCHAR(40) NOT NULL DEFAULT 'Core';
+
+ALTER TABLE Language
+ CHANGE DateFormat DateFormat VARCHAR(50) NOT NULL DEFAULT 'm/d/Y',
+ CHANGE TimeFormat TimeFormat VARCHAR(50) NOT NULL DEFAULT 'g:i:s A',
+ CHANGE DecimalPoint DecimalPoint VARCHAR(10) NOT NULL DEFAULT '.',
+ CHANGE Charset Charset VARCHAR(20) NOT NULL DEFAULT 'utf-8';
+
+ALTER TABLE ItemReview CHANGE Rating Rating TINYINT(3) UNSIGNED NOT NULL DEFAULT '0';
+UPDATE PortalUser SET tz = NULL;
+
+ALTER TABLE Category
+ CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL,
+ CHANGE ModifiedById ModifiedById INT(11) NULL DEFAULT NULL;
+UPDATE Category SET CreatedById = NULL WHERE CreatedById = 0;
+UPDATE Category SET ModifiedById = NULL WHERE ModifiedById = 0;
+
+ALTER TABLE ItemFiles CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
+
+ALTER TABLE Drafts CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
+UPDATE Drafts SET CreatedById = NULL WHERE CreatedById = 0;
+
+ALTER TABLE ItemReview CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
\ No newline at end of file
Index: kernel/utility/unit_config_reader.php
===================================================================
--- kernel/utility/unit_config_reader.php (revision 13936)
+++ kernel/utility/unit_config_reader.php (working copy)
@@ -637,7 +637,12 @@
'not_null_error2' => 'Field <strong>%s</strong> is described as NOT NULL in config, but <strong>does not have DEFAULT value</strong>',
'not_null_error3' => 'Field <strong>%s</strong> is described as <strong>NOT NULL in config</strong>, but is <strong>NULL in db</strong>',
'invalid_default' => '<strong>Default value</strong> for field %s<strong>%s</strong> not sync. to db (in config = %s, in db = %s)',
+ 'date_column_not_null_error' => 'Field <strong>%s</strong> must be NULL in config and database, since it contains date',
+ 'user_column_default_error' => 'Field <strong>%s</strong> must be have NULL as default value, since it holds user id',
'type_missing' => '<strong>Type definition</strong> for field <strong>%s</strong> missing in config',
+ 'virtual_type_missing' => '<strong>Type definition</strong> for virtual field <strong>%s</strong> missing in config',
+ 'virtual_default_missing' => 'Default value for virtual field <strong>%s</strong> not set in config',
+ 'virtual_not_null_error' => 'Virtual field <strong>%s</strong> cannot be not null, since it doesn\'t exist in database',
'invalid_calculated_field' => 'Calculated field <strong>%s</strong> is missing corresponding virtual field',
);
@@ -667,6 +672,7 @@
$default_missing = false;
$options = $config['Fields'][$f_name];
$not_null = isset($options['not_null']) && $options['not_null'];
+ $formatter = array_key_exists('formatter', $options) ? $options['formatter'] : false;
if (!array_key_exists('default', $options)) {
$config_errors[] = sprintf($error_messages['default_missing'], $f_name);
@@ -686,11 +692,24 @@
$config_errors[] = sprintf($error_messages['not_null_error3'], $f_name);
}
+ if (($formatter == 'kDateFormatter') && $not_null) {
+ $config_errors[] = sprintf($error_messages['date_column_not_null_error'], $f_name);
+ }
+
+ // columns, holding userid should have NULL as default value
+ if (array_key_exists('type', $options) && !$default_missing) {
+ // both type and default value set
+
+ if (preg_match('/ById$/', $f_name) && $options['default'] !== null) {
+ $config_errors[] = sprintf($error_messages['user_column_default_error'], $f_name);
+ }
+ }
+
if (!array_key_exists('type', $options)) {
$config_errors[] = sprintf($error_messages['type_missing'], $f_name);
}
- if (!$default_missing) {
+ if (!$default_missing && ($field['Type'] != 'text')) {
if ( is_null($db_default) && $not_null ) {
$db_default = $options['type'] == 'string' ? '' : 0;
}
@@ -706,6 +725,23 @@
}
}
+ // validate virtual fields
+ if ( array_key_exists('VirtualFields', $config) ) {
+ foreach ($config['VirtualFields'] as $f_name => $options) {
+ if (!array_key_exists('type', $options)) {
+ $config_errors[] = sprintf($error_messages['virtual_type_missing'], $f_name);
+ }
+
+ if (array_key_exists('not_null', $options)) {
+ $config_errors[] = sprintf($error_messages['virtual_not_null_error'], $f_name);
+ }
+
+ if (!array_key_exists('default', $options)) {
+ $config_errors[] = sprintf($error_messages['virtual_default_missing'], $f_name);
+ }
+ }
+ }
+
// validate calculated fields
if ( array_key_exists('CalculatedFields', $config) ) {
foreach ($config['CalculatedFields'] as $special => $calculated_fields) {
@@ -715,6 +751,8 @@
}
}
}
+
+ $config_errors = array_unique($config_errors);
}
if ($config_errors) {
Index: units/categories/categories_config.php
===================================================================
--- units/categories/categories_config.php (revision 13951)
+++ units/categories/categories_config.php (working copy)
@@ -324,9 +324,9 @@
'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1,'default' => 1),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
'MetaKeywords' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
- 'CachedDescendantCatsQty' => Array ('type' => 'int', 'default' => 0),
+ 'CachedDescendantCatsQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'CachedNavbar' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
- 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0),
+ 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
'ResourceId' => Array ('type' => 'int', 'default' => null),
'ParentPath' => Array ('type' => 'string', 'default' => null),
'TreeLeft' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
@@ -337,7 +337,7 @@
'NewItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'PopItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0),
+ 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
'CachedTemplate' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
Index: units/category_items/category_items_config.php
===================================================================
--- units/category_items/category_items_config.php (revision 13936)
+++ units/category_items/category_items_config.php (working copy)
@@ -65,9 +65,9 @@
),
'VirtualFields' => Array (
- 'CategoryName' => Array(),
- 'DummyId' => Array(),
- 'CategoryStatus' => Array(),
+ 'CategoryName' => Array ('type' => 'string', 'default' => ''),
+ 'DummyId' => Array ('type' => 'int', 'default' => 0),
+ 'CategoryStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'default' => 1),
),
'Grids' => Array (
Index: units/custom_data/custom_data_event_handler.php
===================================================================
--- units/custom_data/custom_data_event_handler.php (revision 13936)
+++ units/custom_data/custom_data_event_handler.php (working copy)
@@ -154,7 +154,7 @@
foreach ($custom_fields as $custom_id => $custom_params) {
$custom_name = $custom_params['FieldName'];
- $field_options = Array('type' => 'string', 'not_null' => 1, 'default' => $custom_params['DefaultValue']);
+ $field_options = Array('type' => 'string', 'default' => $custom_params['DefaultValue']);
// raises warnings during 4.3.9 -> 5.0.0 upgrade, no fatal sqls though
if ($custom_params['IsRequired']) {
Index: units/custom_fields/custom_fields_config.php
===================================================================
--- units/custom_fields/custom_fields_config.php (revision 13936)
+++ units/custom_fields/custom_fields_config.php (working copy)
@@ -139,9 +139,9 @@
),
// for ValueList field editing via "inp_edit_minput" control
- 'OptionKey' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'OptionTitle' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'Options' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'OptionKey' => Array ('type' => 'string', 'default' => ''),
+ 'OptionTitle' => Array ('type' => 'string', 'default' => ''),
+ 'Options' => Array ('type' => 'string', 'default' => ''),
),
Index: units/email_events/email_events_config.php
===================================================================
--- units/email_events/email_events_config.php (revision 13941)
+++ units/email_events/email_events_config.php (working copy)
@@ -197,13 +197,13 @@
'RecipientType' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'To', 2 => 'Cc', 3 => 'Bcc'),
- 'not_null' => 1, 'default' => 1
+ 'default' => 1
),
- 'RecipientName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'RecipientName' => Array ('type' => 'string', 'max_len' => 255, 'default' => ''),
'RecipientAddressType' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Email', 2 => 'la_opt_User', 3 => 'la_opt_Group'), 'use_phrases' => 1,
- 'not_null' => 1, 'error_field' => 'RecipientAddress', 'default' => 0
+ 'error_field' => 'RecipientAddress', 'default' => 0
),
'RecipientAddress' => Array (
'type' => 'string', 'max_len' => 255,
@@ -212,7 +212,7 @@
'invalid_user' => '!la_error_UserNotFound!',
'invalid_group' => '!la_error_GroupNotFound!',
),
- 'not_null' => 1, 'default' => ''
+ 'default' => ''
),
'Tag' => Array ('type' => 'string', 'default' => ''),
Index: units/files/files_config.php
===================================================================
--- units/files/files_config.php (revision 13941)
+++ units/files/files_config.php (working copy)
@@ -79,7 +79,7 @@
'not_null' => 1, 'default' => 1,
),
'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'CreatedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => USER_ROOT),
+ 'CreatedById' => Array ('type' => 'int', 'default' => NULL),
'MimeType' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
),
Index: units/forms/drafts/drafts_config.php
===================================================================
--- units/forms/drafts/drafts_config.php (revision 13936)
+++ units/forms/drafts/drafts_config.php (working copy)
@@ -56,7 +56,7 @@
'DraftId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'FormSubmissionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'CreatedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'CreatedById' => Array ('type' => 'int', 'default' => NULL),
'Message' => Array ('type' => 'string', 'default' => NULL),
),
);
\ No newline at end of file
Index: units/helpers/file_helper.php
===================================================================
--- units/helpers/file_helper.php (revision 13936)
+++ units/helpers/file_helper.php (working copy)
@@ -151,7 +151,6 @@
'type' => 'string',
'max_len' => 240,
'default' => '',
- 'not_null' => 1,
);
if ($is_image) {
@@ -222,7 +221,7 @@
*/
function _createCustomFields($prefix, $field_name, &$virtual_fields, $is_image)
{
- $virtual_fields['Delete' . $field_name] = Array ('type' => 'int', 'not_null' => 1, 'default' => 0);
+ $virtual_fields['Delete' . $field_name] = Array ('type' => 'int', 'default' => 0);
if ($is_image) {
$virtual_fields[$field_name . 'Alt'] = Array ('type' => 'string', 'default' => '');
Index: units/images/images_config.php
===================================================================
--- units/images/images_config.php (revision 13941)
+++ units/images/images_config.php (working copy)
@@ -100,7 +100,7 @@
'Sorting' => Array('Name' => 'asc'),
)
),
-
+
'Fields' => Array (
'ImageId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
@@ -126,7 +126,7 @@
'Enabled' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled',),
- 'default' => 0, 'not_null' => 1, 'use_phrases' => 1,
+ 'default' => 1, 'not_null' => 1, 'use_phrases' => 1,
),
'DefaultImg' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter',
@@ -158,8 +158,8 @@
),
'VirtualFields' => Array(
- 'Preview' => Array(),
- 'ImageUrl' => Array(),
+ 'Preview' => Array ('type' => 'string', 'default' => ''),
+ 'ImageUrl' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array(
Index: units/logs/change_logs/change_logs_config.php
===================================================================
--- units/logs/change_logs/change_logs_config.php (revision 13936)
+++ units/logs/change_logs/change_logs_config.php (working copy)
@@ -130,6 +130,13 @@
'MasterId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
),
+ 'VirtualFields' => Array (
+ 'UserLogin' => Array ('type' => 'string', 'default' => ''),
+ 'UserFirstName' => Array ('type' => 'string', 'default' => ''),
+ 'UserLastName' => Array ('type' => 'string', 'default' => ''),
+ 'UserEmail' => Array ('type' => 'string', 'default' => ''),
+ ),
+
'Grids' => Array (
'Default' => Array (
'Icons' => Array ('default' => 'icon16_item.png'),
@@ -139,6 +146,7 @@
'UserLogin' => Array ('title' => 'la_col_Username', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'UserFirstName' => Array ('title' => 'la_col_FirstName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
'UserLastName' => Array ('title' => 'la_col_LastName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
+ 'UserEmail' => Array ('title' => 'la_col_Email', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
'SessionLogId' => Array ('title' => 'la_col_SessionLogId', 'filter_block' => 'grid_range_filter', 'width' => 120, ),
'Action' => Array ('title' => 'la_col_Action', 'filter_block' => 'grid_options_filter', 'width' => 120, ),
'OccuredOn' => Array ('title' => 'la_col_OccuredOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
Index: units/logs/session_logs/session_logs_config.php
===================================================================
--- units/logs/session_logs/session_logs_config.php (revision 13936)
+++ units/logs/session_logs/session_logs_config.php (working copy)
@@ -103,6 +103,10 @@
'VirtualFields' => Array(
'Duration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'date_format' => '', 'time_format' => 'H:i:s', 'use_timezone' => false, 'default' => NULL),
+ 'UserLogin' => Array ('type' => 'string', 'default' => ''),
+ 'UserFirstName' => Array ('type' => 'string', 'default' => ''),
+ 'UserLastName' => Array ('type' => 'string', 'default' => ''),
+ 'UserEmail' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
@@ -114,6 +118,7 @@
'UserLogin' => Array ('title' => 'la_col_Username', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'UserFirstName' => Array ('title' => 'la_col_FirstName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
'UserLastName' => Array ('title' => 'la_col_LastName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
+ 'UserEmail' => Array ('title' => 'la_col_Email', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
'SessionStart' => Array ('title' => 'la_col_SessionStart', 'filter_block' => 'grid_date_range_filter', 'width' => 120, ),
'SessionEnd' => Array ('title' => 'la_col_SessionEnd', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Duration' => Array ('title' => 'la_col_Duration', 'filter_block' => 'grid_range_filter', 'width' => 100, ),
Index: units/phrases/phrases_config.php
===================================================================
--- units/phrases/phrases_config.php (revision 13941)
+++ units/phrases/phrases_config.php (working copy)
@@ -77,10 +77,10 @@
),
'FilterMenu' => Array (
- 'Groups' => Array (
+ 'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('translated', 'not_translated'), 'type' => HAVING_FILTER),
),
- 'Filters' => Array (
+ 'Filters' => Array (
'translated' => Array ('label' => 'la_PhraseTranslated', 'on_sql' => '', 'off_sql' => 'CurrentTranslation IS NULL'),
'not_translated' => Array ('label' => 'la_PhraseNotTranslated', 'on_sql' => '', 'off_sql' => 'CurrentTranslation IS NOT NULL'),
)
@@ -146,7 +146,7 @@
0 => 'la_No',
1 => 'la_Yes',
),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ 'use_phrases' => 1, 'default' => 0,
),
'DoNotEncode' => Array (
'type' => 'int',
@@ -155,7 +155,7 @@
0 => 'la_No',
1 => 'la_Yes',
),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ 'use_phrases' => 1, 'default' => 0,
),
'ExportPhrases' => Array ('type' => 'string', 'default' => ''),
'ExportEmailEvents' => Array ('type' => 'string', 'default' => ''),
Index: units/relationship/relationship_config.php
===================================================================
--- units/relationship/relationship_config.php (revision 13941)
+++ units/relationship/relationship_config.php (working copy)
@@ -84,8 +84,8 @@
'Priority' => Array('type'=>'int','not_null'=>1,'default'=>0),
),
'VirtualFields' => Array(
- 'ItemName' => Array(),
- 'ItemType' => Array(),
+ 'ItemName' => Array ('type' => 'string', 'default' => ''),
+ 'ItemType' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array(
Index: units/reviews/reviews_config.php
===================================================================
--- units/reviews/reviews_config.php (revision 13941)
+++ units/reviews/reviews_config.php (working copy)
@@ -122,7 +122,7 @@
4 => 'lu_Rating_4',
5 => 'lu_Rating_5'),
'use_phrases' => 1,
- 'min_value_inc' => 0, 'max_value_inc' => 5, 'default' => 0,
+ 'min_value_inc' => 0, 'max_value_inc' => 5, 'not_null' => 1, 'default' => 0,
),
'IPAddress' => Array (
'type' => 'string',
@@ -140,7 +140,7 @@
WHERE `%s` = \'%s\' ',
'left_key_field' => 'PortalUserId',
'left_title_field' => 'Login',
- 'required' => 1, 'not_null' => 1, 'default' => USER_ROOT,
+ 'required' => 1, 'default' => NULL,
'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
),
'ItemType' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
@@ -169,6 +169,9 @@
'CatalogItemName' => Array ('type' => 'string', 'default' => ''),
'CatalogItemId' => Array ('type' => 'int', 'default' => 0),
'CatalogItemCategory' => Array ('type' => 'int', 'default' => 0),
+
+ 'ItemName' => Array ('type' => 'string', 'default' => ''),
+ 'ProductId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array (
Index: units/selectors/selectors_config.php
===================================================================
--- units/selectors/selectors_config.php (revision 13936)
+++ units/selectors/selectors_config.php (working copy)
@@ -114,14 +114,14 @@
),
'VirtualFields' => Array(
- 'FontStyle' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','normal'=>'normal','italic'=>'italic','oblique'=>'oblique'), 'default'=>'' ),
- 'FontWeight' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','100'=>'100','200'=>'200','300'=>'300','normal'=>'normal','500'=>'500','600'=>'600','bold'=>'bold','800'=>'800','900'=>'900','lighter'=>'lighter','bolder'=>'bolder') ),
- 'StyleCursor' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','default'=>'default','auto'=>'auto','n-resize'=>'n-resize','ne-resize'=>'ne-resize','e-resize'=>'e-resize','se-resize'=>'se-resize','s-resize'=>'s-resize','sw-resize'=>'sw-resize','w-resize'=>'w-resize','nw-resize'=>'nw-resize','crosshair'=>'crosshair','pointer'=>'pointer','move'=>'move','text'=>'text','wait'=>'wait','help'=>'help','hand'=>'hand','all-scroll'=>'all-scroll','col-resize'=>'col-resize','row-resize'=>'row-resize','no-drop'=>'no-drop','not-allowed'=>'not-allowed','progress'=>'progress','vertical-text'=>'vertical-text','alias'=>'alias','cell'=>'cell','copy'=>'copy','count-down'=>'count-down','count-up'=>'count-up','count-up-down'=>'count-up-down','grab'=>'grab','grabbing'=>'grabbing','spinning'=>'spinning') ),
- 'StyleDisplay' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','none'=>'none','inline'=>'inline','block'=>'block','inline-block'=>'inline-block','list-item'=>'list-item','marker'=>'marker','compact'=>'compact','run-in'=>'run-in','table-header-group'=>'table-header-group','table-footer-group'=>'table-footer-group','table'=>'table','inline-table'=>'inline-table','table-caption'=>'table-caption','table-row'=>'table-row','table-row-group'=>'table-row-group','table-column'=>'table-column','table-column-group'=>'table-column-group') ),
- 'TextAlign' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','left'=>'left','right'=>'right','center'=>'center','justify'=>'justify') ),
- 'TextDecoration' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','none'=>'none','underline'=>'underline','overline'=>'overline','line-through'=>'line-through','blink'=>'blink') ),
- 'StyleVisibility' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','visible'=>'visible','hidden'=>'hidden','collapse'=>'collapse') ),
- 'StylePosition' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','static'=>'static','relative'=>'relative','absolute'=>'absolute','fixed'=>'fixed') ),
+ 'FontStyle' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','normal'=>'normal','italic'=>'italic','oblique'=>'oblique'), 'default'=>''),
+ 'FontWeight' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','100'=>'100','200'=>'200','300'=>'300','normal'=>'normal','500'=>'500','600'=>'600','bold'=>'bold','800'=>'800','900'=>'900','lighter'=>'lighter','bolder'=>'bolder'), 'default' => ''),
+ 'StyleCursor' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','default'=>'default','auto'=>'auto','n-resize'=>'n-resize','ne-resize'=>'ne-resize','e-resize'=>'e-resize','se-resize'=>'se-resize','s-resize'=>'s-resize','sw-resize'=>'sw-resize','w-resize'=>'w-resize','nw-resize'=>'nw-resize','crosshair'=>'crosshair','pointer'=>'pointer','move'=>'move','text'=>'text','wait'=>'wait','help'=>'help','hand'=>'hand','all-scroll'=>'all-scroll','col-resize'=>'col-resize','row-resize'=>'row-resize','no-drop'=>'no-drop','not-allowed'=>'not-allowed','progress'=>'progress','vertical-text'=>'vertical-text','alias'=>'alias','cell'=>'cell','copy'=>'copy','count-down'=>'count-down','count-up'=>'count-up','count-up-down'=>'count-up-down','grab'=>'grab','grabbing'=>'grabbing','spinning'=>'spinning'), 'default' => ''),
+ 'StyleDisplay' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','none'=>'none','inline'=>'inline','block'=>'block','inline-block'=>'inline-block','list-item'=>'list-item','marker'=>'marker','compact'=>'compact','run-in'=>'run-in','table-header-group'=>'table-header-group','table-footer-group'=>'table-footer-group','table'=>'table','inline-table'=>'inline-table','table-caption'=>'table-caption','table-row'=>'table-row','table-row-group'=>'table-row-group','table-column'=>'table-column','table-column-group'=>'table-column-group'), 'default' => ''),
+ 'TextAlign' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','left'=>'left','right'=>'right','center'=>'center','justify'=>'justify'), 'default' => ''),
+ 'TextDecoration' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','none'=>'none','underline'=>'underline','overline'=>'overline','line-through'=>'line-through','blink'=>'blink'), 'default' => ''),
+ 'StyleVisibility' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','visible'=>'visible','hidden'=>'hidden','collapse'=>'collapse'), 'default' => ''),
+ 'StylePosition' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','static'=>'static','relative'=>'relative','absolute'=>'absolute','fixed'=>'fixed'), 'default' => ''),
),
'Grids' => Array(
Index: units/structure/structure_config.php
===================================================================
--- units/structure/structure_config.php (revision 13951)
+++ units/structure/structure_config.php (working copy)
@@ -140,9 +140,9 @@
'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1,'default' => 1),
'Priority' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => array(), 'required' => 1, 'default' => 0),
'MetaKeywords' => Array('type' => 'string', 'default' => null),
- 'CachedDescendantCatsQty' => Array('type' => 'int', 'default' => 0),
+ 'CachedDescendantCatsQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'CachedNavbar' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
- 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0),
+ 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
'ResourceId' => Array('type' => 'int', 'default' => null),
'ParentPath' => Array('type' => 'string', 'default' => null),
'TreeLeft' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
@@ -153,7 +153,7 @@
'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0),
+ 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
'CachedTemplate' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
Index: units/user_groups/user_groups_config.php
===================================================================
--- units/user_groups/user_groups_config.php (revision 13936)
+++ units/user_groups/user_groups_config.php (working copy)
@@ -41,8 +41,8 @@
),
),
'VirtualFields' => Array (
- 'UserName' => Array('type' => 'string'),
- 'UserLogin' => Array('type' => 'string'),
+ 'UserName' => Array('type' => 'string', 'default' => ''),
+ 'UserLogin' => Array('type' => 'string', 'default' => ''),
),
'Grids' => Array(
'GroupUsers' => Array(
@@ -108,8 +108,8 @@
),
'VirtualFields' => Array (
- 'GroupName' => Array('type' => 'string'),
- 'GroupDescription' => Array('type' => 'string'),
+ 'GroupName' => Array('type' => 'string', 'default' => ''),
+ 'GroupDescription' => Array('type' => 'string', 'default' => ''),
),
Index: units/users/users_config.php
===================================================================
--- units/users/users_config.php (revision 13941)
+++ units/users/users_config.php (working copy)
@@ -379,7 +379,7 @@
'Status' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(1=>'la_Enabled', 0=>'la_Disabled', 2=>'la_Pending'), 'use_phrases'=>1, 'not_null' => '1','default' => 1),
'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'dob' => Array('type'=>'int', 'formatter' => 'kDateFormatter', 'default' => null),
- 'tz' => Array('type' => 'int','default' => 0),
+ 'tz' => Array('type' => 'int', 'default' => NULL),
'ip' => Array('type' => 'string','default' => null),
'IsBanned' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'PassResetTime' => Array('type' => 'int','default' => null),
@@ -413,7 +413,7 @@
'UserGroup' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %1$s FROM ' . TABLE_PREFIX . 'PortalGroup WHERE Enabled = 1 AND FrontRegistration = 1', 'option_key_field' => 'GroupId', 'option_title_field' => 'Name',
- 'not_null' => 1, 'default' => 0,
+ 'default' => 0,
),
),
Index: units/visits/visits_config.php
===================================================================
--- units/visits/visits_config.php (revision 13936)
+++ units/visits/visits_config.php (working copy)
@@ -138,13 +138,14 @@
),
'VirtualFields' => Array (
- 'UserName' => Array ('type' => 'string'),
- 'AffiliateUser' => Array ('type' => 'string'),
- 'AffiliatePortalUserId' => Array ('type' => 'int'),
- 'OrderTotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => '1','default' => '0.00', 'totals' => 'SUM'),
- 'OrderTotalAmountSum' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => '1','default' => '0.00'),
- 'OrderAffiliateCommission' => Array ('type' => 'double', 'formatter' => 'kFormatter','format' => '%.02f', 'not_null' => '1','default' => '0.0000', 'totals' => 'SUM'),
- 'OrderAffiliateCommissionSum' => Array ('type' => 'double', 'formatter' => 'kFormatter','format' => '%.02f', 'not_null' => '1','default' => '0.0000'),
+ 'UserName' => Array ('type' => 'string', 'default' => ''),
+ 'AffiliateUser' => Array ('type' => 'string', 'default' => ''),
+ 'AffiliatePortalUserId' => Array ('type' => 'int', 'default' => null),
+ 'OrderTotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00', 'totals' => 'SUM'),
+ 'OrderTotalAmountSum' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
+ 'OrderAffiliateCommission' => Array ('type' => 'double', 'formatter' => 'kFormatter','format' => '%.02f', 'default' => '0.0000', 'totals' => 'SUM'),
+ 'OrderAffiliateCommissionSum' => Array ('type' => 'double', 'formatter' => 'kFormatter','format' => '%.02f', 'default' => '0.0000'),
+ 'OrderNumber' => Array ('type' => 'string', 'default' => ''),
'OrderId' => Array ('type' => 'int', 'default' => '0'),
),
not_null_fix_modules.patch [^] (68,392 bytes) 2010-09-22 04:12
[Show Content]
Index: in-bulletin/install/install_schema.sql
===================================================================
--- in-bulletin/install/install_schema.sql (revision 13936)
+++ in-bulletin/install/install_schema.sql (working copy)
@@ -34,8 +34,8 @@
EditorsPick tinyint(4) NOT NULL DEFAULT '0',
`Status` tinyint(4) unsigned NOT NULL DEFAULT '2',
Priority int(11) NOT NULL DEFAULT '0',
- OwnerId int(11) NOT NULL DEFAULT '-1',
- ModifiedById int(11) NOT NULL DEFAULT '0',
+ OwnerId int(11) DEFAULT NULL,
+ ModifiedById int(11) DEFAULT NULL,
ResourceId int(11) DEFAULT NULL,
TopicType int(11) NOT NULL DEFAULT '1',
CreatedOn int(11) DEFAULT NULL,
@@ -167,7 +167,7 @@
CommentId int(11) NOT NULL AUTO_INCREMENT,
PollId int(11) NOT NULL DEFAULT '0',
AnswerId int(11) DEFAULT NULL,
- CreatedById int(11) NOT NULL DEFAULT '-2',
+ CreatedById int(11) DEFAULT NULL,
GuestName varchar(255) NOT NULL DEFAULT '',
GuestEmail varchar(255) NOT NULL DEFAULT '',
CommentBody text,
Index: in-bulletin/install/upgrades.sql
===================================================================
--- in-bulletin/install/upgrades.sql (revision 13936)
+++ in-bulletin/install/upgrades.sql (working copy)
@@ -199,4 +199,13 @@
# ===== v 5.1.0-RC1 =====
-# ===== v 5.1.0 =====
\ No newline at end of file
+# ===== v 5.1.0 =====
+
+# ===== v 5.1.1-B1 =====
+ALTER TABLE PollsComments CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
+
+ALTER TABLE Topic
+ CHANGE OwnerId OwnerId INT( 11 ) NULL DEFAULT NULL ,
+ CHANGE ModifiedById ModifiedById INT( 11 ) NULL DEFAULT NULL;
+
+UPDATE Topic SET ModifiedById = NULL WHERE ModifiedById = 0;
\ No newline at end of file
Index: in-bulletin/units/poll_comments/poll_comments_config.php
===================================================================
--- in-bulletin/units/poll_comments/poll_comments_config.php (revision 13936)
+++ in-bulletin/units/poll_comments/poll_comments_config.php (working copy)
@@ -64,7 +64,7 @@
'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),
'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' => USER_GUEST),
+ 'required' => 1, 'default' => NULL),
'GuestName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'GuestEmail' => Array('type' => 'string', 'max_len' => 255, 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'not_null' => '1', 'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!', 'unique'=>'!lu_email_already_exist!'),'required' => 0 ),
'CommentBody' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL, 'required' => 1),
Index: in-bulletin/units/posts/posts_config.php
===================================================================
--- in-bulletin/units/posts/posts_config.php (revision 13936)
+++ in-bulletin/units/posts/posts_config.php (working copy)
@@ -99,7 +99,7 @@
'DisableBBCodes' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0),
'DisableSmileys' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0),
'ShowSignatures' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 1),
-
+ 'UserName' => Array ('type' => 'string', 'default' => ''),
// for avatar image
'AltName' => Array('type' => 'string', 'default' => ''),
'SameImages' => Array('type' => 'string', 'default' => ''),
Index: in-bulletin/units/private_messages/private_messages_config.php
===================================================================
--- in-bulletin/units/private_messages/private_messages_config.php (revision 13936)
+++ in-bulletin/units/private_messages/private_messages_config.php (working copy)
@@ -96,7 +96,9 @@
'VirtualFields' => Array (
'FromName' => Array ('type' => 'string', 'default' => ''),
+ 'FromFullName' => Array ('type' => 'string', 'default' => ''),
'ToName' => Array ('type' => 'string', 'default' => ''),
+ 'ToFullName' => Array ('type' => 'string', 'default' => ''),
'Subject' => Array ('type' => 'string', 'default' => ''),
'Body' => Array ('type' => 'string', 'required' => 1, 'default' => ''),
'Options' => Array ('type' => 'string', 'default' => 0),
Index: in-bulletin/units/topics/topics_config.php
===================================================================
--- in-bulletin/units/topics/topics_config.php (revision 13937)
+++ in-bulletin/units/topics/topics_config.php (working copy)
@@ -243,7 +243,7 @@
),
'FilterMenu' => Array (
- 'Groups' => Array (
+ 'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => HAVING_FILTER),
@@ -390,7 +390,7 @@
'left_key_field' => 'PortalUserId',
'left_title_field' => 'Login',
'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
- 'required' => 1, 'not_null' => 1, 'default' => USER_ROOT,
+ 'required' => 1, 'default' => NULL,
),
'ModifiedById' => Array (
'type' => 'int',
@@ -401,7 +401,7 @@
'left_key_field' => 'PortalUserId',
'left_title_field' => 'Login',
'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
- 'required' => 1, 'not_null' => 1, 'default' => USER_ROOT,
+ 'required' => 1, 'default' => NULL,
),
'ResourceId' => Array ('type' => 'int', 'default' => null),
'TopicType' => Array (
@@ -462,8 +462,11 @@
'options' => Array (),
'default' => 0,
),
- 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'default' => ''),
+ 'CategoryFilename' => Array ('type' => 'string', 'default' => ''),
+ 'PrimaryCat' => Array ('type' => 'int', 'default' => 0),
'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
+ 'ParentPath' => Array ('type' => 'string', 'default' => ''),
'LastPoster' => Array ('type' => 'string', 'default' => ''),
'LastPosterId' => Array ('type' => 'int', 'default' => USER_GUEST),
Index: in-commerce/install/install_schema.sql
===================================================================
--- in-commerce/install/install_schema.sql (revision 13936)
+++ in-commerce/install/install_schema.sql (working copy)
@@ -171,7 +171,7 @@
ReturnTotal decimal(20,4) NOT NULL DEFAULT '0.0000',
CostTotal decimal(20,4) NOT NULL DEFAULT '0.0000',
OriginalAmount decimal(20,4) NOT NULL DEFAULT '0.0000',
- ShippingOption tinyint(4) DEFAULT NULL,
+ ShippingOption tinyint(4) NOT NULL DEFAULT '0',
ShippingInfo text,
CouponId int(11) DEFAULT NULL,
CouponDiscount decimal(20,4) NOT NULL DEFAULT '0.0000',
@@ -301,11 +301,11 @@
Modified int(10) unsigned DEFAULT NULL,
Expire int(10) unsigned DEFAULT NULL,
Hits double NOT NULL DEFAULT '0',
- CachedRating varchar(10) NOT NULL default '0',
+ CachedRating varchar(10) NOT NULL DEFAULT '0',
CachedVotesQty int(11) NOT NULL DEFAULT '0',
CachedReviewsQty int(11) NOT NULL DEFAULT '0',
- CreatedById int(11) NOT NULL DEFAULT '0',
- ModifiedById int(11) NOT NULL DEFAULT '0',
+ CreatedById int(11) DEFAULT NULL,
+ ModifiedById int(11) DEFAULT NULL,
Priority int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '2',
EditorsPick tinyint(4) NOT NULL DEFAULT '0',
@@ -444,7 +444,7 @@
IsPrimary tinyint(4) NOT NULL DEFAULT '0',
Priority smallint(6) NOT NULL DEFAULT '0',
AddedOn int(11) DEFAULT NULL,
- AddedById int(11) NOT NULL DEFAULT '0',
+ AddedById int(11) DEFAULT NULL,
MIMEType varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (FileId),
KEY ProductId (ProductId),
Index: in-commerce/install/upgrades.sql
===================================================================
--- in-commerce/install/upgrades.sql (revision 13936)
+++ in-commerce/install/upgrades.sql (working copy)
@@ -180,3 +180,15 @@
# ===== v 5.1.0 =====
ALTER TABLE Products CHANGE CachedRating CachedRating varchar(10) NOT NULL default '0';
+
+# ===== v 5.1.1-B1 =====
+ALTER TABLE Orders CHANGE ShippingOption ShippingOption TINYINT(4) NOT NULL DEFAULT '0';
+
+ALTER TABLE ProductFiles CHANGE AddedById AddedById INT(11) NULL DEFAULT NULL;
+UPDATE ProductFiles SET AddedById = NULL WHERE AddedById = 0;
+
+ALTER TABLE Products
+ CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL ,
+ CHANGE ModifiedById ModifiedById INT(11) NULL DEFAULT NULL;
+UPDATE Products SET CreatedById = NULL WHERE CreatedById = 0;
+UPDATE Products SET ModifiedById = NULL WHERE ModifiedById = 0;
\ No newline at end of file
Index: in-commerce/units/addresses/addresses_config.php
===================================================================
--- in-commerce/units/addresses/addresses_config.php (revision 13936)
+++ in-commerce/units/addresses/addresses_config.php (working copy)
@@ -110,7 +110,7 @@
),
'VirtualFields' => Array(
- 'ShortAddress' => Array('type'=>'string'),
+ 'ShortAddress' => Array('type'=>'string', 'default' => ''),
),
'Grids' => Array(),
Index: in-commerce/units/affiliate_payments/affiliate_payments_config.php
===================================================================
--- in-commerce/units/affiliate_payments/affiliate_payments_config.php (revision 13936)
+++ in-commerce/units/affiliate_payments/affiliate_payments_config.php (working copy)
@@ -118,8 +118,8 @@
),
'VirtualFields' => Array(
- 'Username' => Array('type' => 'string'),
- 'PortalUserId' => Array('type' => 'int'),
+ 'Username' => Array('type' => 'string', 'default' => ''),
+ 'PortalUserId' => Array('type' => 'int', 'default' => 0),
),
'Grids' => Array(
Index: in-commerce/units/affiliate_plans_items/affiliate_plans_items_config.php
===================================================================
--- in-commerce/units/affiliate_plans_items/affiliate_plans_items_config.php (revision 13936)
+++ in-commerce/units/affiliate_plans_items/affiliate_plans_items_config.php (working copy)
@@ -85,12 +85,19 @@
),
'VirtualFields' => Array(
- 'ProductId' => Array(),
- 'ItemName' => Array(),
- 'SKU' => Array(),
- 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f'),
- 'CreatedOn' => Array('formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'BackOrderDate' => Array('formatter' => 'kDateFormatter', 'default' => NULL),
+ 'ProductId' => Array('type' => 'int', 'default' => 0),
+ 'ItemName' => Array('type' => 'string', 'default' => ''),
+ 'SKU' => Array('type' => 'string', 'default' => ''),
+ 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0),
+ 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'BackOrderDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'default' => 2,
+ ),
+ 'CategoryId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array(
Index: in-commerce/units/affiliates/affiliates_config.php
===================================================================
--- in-commerce/units/affiliates/affiliates_config.php (revision 13936)
+++ in-commerce/units/affiliates/affiliates_config.php (working copy)
@@ -182,6 +182,7 @@
'VirtualFields' => Array(
'UserName' => Array('type'=>'string', 'default' => ''),
'PlanName' => Array('type'=>'string', 'default' => ''),
+ 'UserId' => Array('type'=>'int', 'default' => 0),
),
'Grids' => Array(
Index: in-commerce/units/coupon_items/coupon_items_config.php
===================================================================
--- in-commerce/units/coupon_items/coupon_items_config.php (revision 13936)
+++ in-commerce/units/coupon_items/coupon_items_config.php (working copy)
@@ -82,18 +82,25 @@
'Fields' => Array (
'CouponItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'CouponId' => Array('type' => 'int', 'default' => 0, ),
- 'ItemResourceId' => Array('type' => 'int', 'default' => 0, ),
+ 'CouponId' => Array('type' => 'int', 'default' => null, ),
+ 'ItemResourceId' => Array('type' => 'int', 'default' => null, ),
'ItemType' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder' ), 'default' => 1, ),
),
'VirtualFields' => Array(
- 'ProductId' => Array(),
- 'ItemName' => Array(),
- 'SKU' => Array(),
- 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f'),
- 'CreatedOn' => Array('formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'BackOrderDate' => Array('formatter' => 'kDateFormatter', 'default' => NULL),
+ 'ProductId' => Array('type' => 'int', 'default' => 0),
+ 'ItemName' => Array('type' => 'string', 'default' => ''),
+ 'SKU' => Array('type' => 'string', 'default' => ''),
+ 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0),
+ 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'BackOrderDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'default' => 2,
+ ),
+ 'CategoryId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array(
Index: in-commerce/units/discount_items/discount_items_config.php
===================================================================
--- in-commerce/units/discount_items/discount_items_config.php (revision 13936)
+++ in-commerce/units/discount_items/discount_items_config.php (working copy)
@@ -82,18 +82,25 @@
'Fields' => Array (
'DiscountItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'DiscountId' => Array('type' => 'int', 'default' => 0, ),
- 'ItemResourceId' => Array('type' => 'int', 'default' => 0, ),
+ 'DiscountId' => Array('type' => 'int', 'default' => null, ),
+ 'ItemResourceId' => Array('type' => 'int', 'default' => null, ),
'ItemType' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder' ), 'default' => 1, ),
),
'VirtualFields' => Array(
- 'ProductId' => Array(),
- 'ItemName' => Array(),
- 'SKU' => Array(),
- 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f'),
- 'CreatedOn' => Array('formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'BackOrderDate' => Array('formatter' => 'kDateFormatter', 'default' => NULL),
+ 'ProductId' => Array('type' => 'int', 'default' => 0),
+ 'ItemName' => Array('type' => 'string', 'default' => ''),
+ 'SKU' => Array('type' => 'string', 'default' => ''),
+ 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0),
+ 'CreatedOn' => Array('type' => 'int','formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'BackOrderDate' => Array('type' => 'int','formatter' => 'kDateFormatter', 'default' => NULL),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'default' => 2,
+ ),
+ 'CategoryId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array(
Index: in-commerce/units/files/files_config.php
===================================================================
--- in-commerce/units/files/files_config.php (revision 13938)
+++ in-commerce/units/files/files_config.php (working copy)
@@ -110,7 +110,7 @@
),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'AddedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'AddedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'AddedById' => Array ('type' => 'int', 'default' => NULL),
'MIMEType' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
),
Index: in-commerce/units/gateways/gateways_config.php
===================================================================
--- in-commerce/units/gateways/gateways_config.php (revision 13936)
+++ in-commerce/units/gateways/gateways_config.php (working copy)
@@ -58,15 +58,15 @@
'Fields' => Array (
'GWConfigFieldId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'SystemFieldName' => Array('type' => 'string', 'not_null' => 1, 'default' => 0, ),
- 'FieldName' => Array('type' => 'string', 'required' => true, 'max_len' => 100, 'not_null' => 1, 'default' => 0, ),
- 'ElementType' => Array('type' => 'string', 'not_null' => 1, 'default' => 0, ),
+ 'SystemFieldName' => Array('type' => 'string', 'not_null' => 1, 'default' => '', ),
+ 'FieldName' => Array('type' => 'string', 'required' => true, 'max_len' => 100, 'not_null' => 1, 'default' => '', ),
+ 'ElementType' => Array('type' => 'string', 'not_null' => 1, 'default' => 'text', ),
'ValueList' => Array('type' => 'string', 'default' => NULL),
'GatewayId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
),
'VirtualFields' => Array (
- 'Value' => Array(),
+ 'Value' => Array('type' => 'string', 'default' => ''),
),
'Grids' => Array(
Index: in-commerce/units/order_items/order_items_config.php
===================================================================
--- in-commerce/units/order_items/order_items_config.php (revision 13936)
+++ in-commerce/units/order_items/order_items_config.php (working copy)
@@ -123,10 +123,10 @@
'QuantityAvailable' => Array('type'=>'int','default'=>0),
'DiscountType' => Array('type'=>'string','default'=>''),
'DiscountId' => Array('type'=>'int','default'=>0),
- 'Name' => Array('formatter' => 'kMultiLanguage'),
+ 'Name' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => ''),
'ItemDiscount' => Array('type'=>'double','formatter'=>'kFormatter','format'=>'%01.2f','default'=>'0.00'),
'SKU' => Array('type' => 'string', 'default' => ''),
- 'MinQtyFreeShipping'=> Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'MinQtyFreeShipping'=> Array('type' => 'int', 'default' => 0,),
),
'Grids' => Array (
Index: in-commerce/units/orders/orders_config.php
===================================================================
--- in-commerce/units/orders/orders_config.php (revision 13938)
+++ in-commerce/units/orders/orders_config.php (working copy)
@@ -226,7 +226,7 @@
),
),
- 'TableName' => TABLE_PREFIX . 'Orders',
+ 'TableName' => TABLE_PREFIX . 'Orders',
'CalculatedFields' => Array (
'' => Array (
@@ -399,7 +399,7 @@
'ReturnTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
'CostTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
'OriginalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
- 'ShippingOption' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (0 => 'la_ship_all_together', 1 => 'la_ship_backorder_separately', 2 => 'la_ship_backorders_upon_avail'), 'default' =>0),
+ 'ShippingOption' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (0 => 'la_ship_all_together', 1 => 'la_ship_backorder_separately', 2 => 'la_ship_backorders_upon_avail'), 'not_null' => 1, 'default' =>0),
'ShippingGroupOption' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (0 => 'la_auto_group_shipments', 1 => 'la_manual_group_shipments'), 'default' =>0),
'GiftCertificateId' => Array ('type' => 'int', 'default' => null),
'GiftCertificateDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00',),
@@ -436,11 +436,15 @@
'VirtualFields' => Array (
'CustomerName' => Array ('type' => 'string', 'default' => '', 'filter_type' => 'like'),
- 'TotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
- 'AmountWithoutVAT' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
- 'SubtotalWithDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
- 'SubtotalWithoutDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
+ 'TotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
+ 'AmountWithoutVAT' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
+ 'SubtotalWithDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
+ 'SubtotalWithoutDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
'OrderNumber' => Array ('type' => 'string', 'default' => '', 'filter_type' => 'like'),
+ 'CouponCode' => Array ('type' => 'string', 'default' => ''),
+ 'CouponName' => Array ('type' => 'string', 'default' => ''),
+ 'GiftCertificateCode' => Array ('type' => 'string', 'default' => ''),
+ 'GiftCertificateRecipient' => Array ('type' => 'string', 'default' => ''),
// for ResetToUser
'UserTo' => Array ('type' => 'string', 'default' => ''),
@@ -456,16 +460,11 @@
'UserCountry' => Array ('type' => 'string', 'default' => ''),
// for Search
- 'Username' => Array ('type' => 'string', 'filter_type' => 'like'),
- 'OrderSearchId' => Array ('type' => 'int', 'filter_type' => 'equals', 'filter_field' => 'OrderId'),
- 'FromDateTime' => Array ('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_from', 'filter_field' => 'OrderDate' ),
- 'ToDateTime' => Array ('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_to', 'filter_field' => 'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ),
- 'FromAmount' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'filter_type' => 'range_from', 'filter_field' => 'TotalAmount'),
- 'ToAmount' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'filter_type' => 'range_to', 'filter_field' => 'TotalAmount'),
- 'HasBackOrders' => Array ('default' =>false),
- 'PaymentCVV2' => Array ('type' => 'string', 'default' =>false),
- 'AffiliateUser' => Array ('type' => 'string', 'filter_type' => 'like'),
- 'AffiliatePortalUserId' => Array ('type' => 'int'),
+ 'Username' => Array ('type' => 'string', 'filter_type' => 'like', 'default' => ''),
+ 'HasBackOrders' => Array ('type' => 'int', 'default' => 0),
+ 'PaymentCVV2' => Array ('type' => 'string', 'default' => ''),
+ 'AffiliateUser' => Array ('type' => 'string', 'filter_type' => 'like', 'default' => ''),
+ 'AffiliatePortalUserId' => Array ('type' => 'int', 'default' => 0),
// export related fields: begin
'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
@@ -478,18 +477,18 @@
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ 'use_phrases' => 1, 'default' => 1,
),
- 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
- 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
- 'ExportPresets' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
+ 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
+ 'ExportPresets' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
'ExportSavePreset' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ 'use_phrases' => 1, 'default' => 0,
),
- 'ExportPresetName' => Array ('type' => 'string'),
+ 'ExportPresetName' => Array ('type' => 'string', 'default' => ''),
// export related fields: end
),
'Grids' => Array (
Index: in-commerce/units/payment_type/payment_type_config.php
===================================================================
--- in-commerce/units/payment_type/payment_type_config.php (revision 13938)
+++ in-commerce/units/payment_type/payment_type_config.php (working copy)
@@ -97,7 +97,7 @@
'Sorting' => Array ('Name' => 'asc'),
)
),
-
+
'Fields' => Array (
'PaymentTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' =>true, 'max_len' => 100),
@@ -106,15 +106,15 @@
'AdminComments' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'Status' => Array (
'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0,
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'IsPrimary' => Array (
'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
'BuiltIn' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_BuiltIn', 0 => 'la_UserDefined' ), 'default' => 0, 'not_null' => 1 ),
@@ -128,18 +128,18 @@
),
'PlacedOrdersEdit' => Array (
'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
'ProcessingFee' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => 1, 'default' => '0.00'),
'PortalGroups' => Array ('type' => 'string', 'default' => null),
),
- /*
+
'VirtualFields' => Array (
- 'Qty' => 1,
+ 'Gateway' => Array ('type' => 'string', 'default' => ''),
),
- */
+
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
Index: in-commerce/units/pricing/pricing_config.php
===================================================================
--- in-commerce/units/pricing/pricing_config.php (revision 13936)
+++ in-commerce/units/pricing/pricing_config.php (working copy)
@@ -81,8 +81,8 @@
'Fields' => Array (
'PriceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'MinQty' => Array ('type' => 'int', 'default' => 0),
- 'MaxQty' => Array ('type' => 'int', 'default' => 0),
+ 'MinQty' => Array ('type' => 'int', 'default' => null),
+ 'MaxQty' => Array ('type' => 'int', 'default' => null),
'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0),
'Price' => Array ('type' => 'float', 'not_null' => 1, 'formatter' => 'kFormatter', 'min_value_inc' => 0, 'format' => '%.2f', 'default' => 0),
'Negotiated' => Array (
@@ -91,7 +91,7 @@
'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
'default' => NULL,
),
- 'Points' => Array ('type' => 'int', 'default' => 0),
+ 'Points' => Array ('type' => 'int', 'default' => null),
'AccessDuration'=> Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
'AccessUnit' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year'), 'not_null' => 1, 'default' => 0,),
'Description' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
Index: in-commerce/units/product_option_combinations/product_option_combinations_config.php
===================================================================
--- in-commerce/units/product_option_combinations/product_option_combinations_config.php (revision 13936)
+++ in-commerce/units/product_option_combinations/product_option_combinations_config.php (working copy)
@@ -69,8 +69,8 @@
'Weight' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'default' => 0, ),
'Availability' => Array (
'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1,
),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ),
@@ -91,7 +91,8 @@
),
),
'VirtualFields' => Array (
- 'FinalPrice' => Array ('formatter' => 'kCombPriceFormatter', 'format' => '%.2f'),
+ 'FinalPrice' => Array ('type' => 'float', 'formatter' => 'kCombPriceFormatter', 'format' => '%.2f', 'default' => NULL),
+ 'BasePrice' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
),
'Grids' => Array (
'Default' => Array (
Index: in-commerce/units/products/products_config.php
===================================================================
--- in-commerce/units/products/products_config.php (revision 13938)
+++ in-commerce/units/products/products_config.php (working copy)
@@ -360,7 +360,7 @@
),
'TableName' => TABLE_PREFIX . 'Products',
-
+
'CalculatedFields' => Array (
'' => Array (
'AltName' => 'img.AltName',
@@ -492,9 +492,9 @@
'Expire' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' =>null),
'Type' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (1=> 'la_product_tangible', 2=> 'la_product_subscription', 4=> 'la_product_downloadable', 3=> 'la_product_service'/*, 6=> 'la_gift_certificate', 5=> 'la_product_package'*/), 'not_null' => 1, 'default' => 1 ),
'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'ModifiedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'CreatedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ResourceId' => Array ('type' => 'int', 'default' => 0),
+ 'ModifiedById' => Array ('type' => 'int', 'default' => NULL),
+ 'CreatedById' => Array ('type' => 'int', 'default' => NULL),
+ 'ResourceId' => Array ('type' => 'int', 'default' => null),
'CachedReviewsQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
'InventoryStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Disabled', 1 => 'la_by_product', 2 => 'la_by_options'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'QtyInStock' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
@@ -539,13 +539,15 @@
),
'VirtualFields' => Array (
- 'Qty' => 1,
+ 'Qty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'regexp' => '/^[\d]+$/', 'default' => 0),
'Price' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
- 'IsHot' => Array ('type' => 'int'),
- 'IsNew' => Array ('type' => 'int'),
- 'IsPop' => Array ('type' => 'int'),
- 'Manufacturer' => Array (),
+ 'CategoryFilename' => Array ('type' => 'string', 'default' => ''),
+ 'PrimaryCat' => Array ('type' => 'int', 'default' => 0),
+ 'IsHot' => Array ('type' => 'int', 'default' => 0),
+ 'IsNew' => Array ('type' => 'int', 'default' => 0),
+ 'IsPop' => Array ('type' => 'int', 'default' => 0),
+ 'Manufacturer' => Array ('type' => 'string', 'default' => ''),
// export related fields: begin
'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
@@ -559,24 +561,24 @@
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ 'use_phrases' => 1, 'default' => 1,
),
- 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
- 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
+ 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
'CategoryFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
'CategorySeparator' => Array ('type' => 'string', 'default' => ':'),
'IsBaseCategory' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ 'use_phrases' => 1, 'default' => 0,
),
// export related fields: end
// import related fields: begin
'FieldTitles' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
'ImportSource' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
- 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/'),
+ 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/', 'default' => ''),
'ImportLocalFilename' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
'CheckDuplicatesMethod' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
'ReplaceDuplicates' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
@@ -588,13 +590,13 @@
'FullImage' => Array ('type' => 'string', 'default' => ''),
'ImageAlt' => Array ('type' => 'string', 'default' => ''),
- 'Filename' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'default' => ''),
'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
'ParentPath' => Array ('type' => 'string', 'default' => ''),
- 'FileSize' => Array ('type' => 'int', 'formatter' => 'kFilesizeFormatter', 'not_null' => 1, 'default' => 0),
- 'FilePath' => Array (),
- 'FileVersion' => Array (),
+ 'FileSize' => Array ('type' => 'int', 'formatter' => 'kFilesizeFormatter', 'default' => 0),
+ 'FilePath' => Array ('type' => 'string', 'default' => ''),
+ 'FileVersion' => Array ('type' => 'string', 'default' => ''),
// for primary image
'AltName' => Array ('type' => 'string', 'default' => ''),
Index: in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php
===================================================================
--- in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php (revision 13938)
+++ in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php (working copy)
@@ -76,7 +76,7 @@
'Sorting' => Array ('Name' => 'asc'),
)
),
-
+
'Fields' => Array (
'EngineId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
@@ -97,82 +97,96 @@
),
'VirtualFields' => Array (
- 'AccountLogin' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'AccountPassword' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'AccountLogin' => Array ('type' => 'string', 'default' => ''),
+ 'AccountPassword' => Array ('type' => 'string', 'default' => ''),
'UPSEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
- 'UPSAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'UPSAccount' => Array ('type' => 'string', 'default' => ''),
'UPSInvoiced' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ 'default' => 0
),
'FDXEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
- 'FDXAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'FDXAccount' => Array ('type' => 'string', 'default' => ''),
'FDXInvoiced' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ 'default' => 0
),
'DHLEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
- 'DHLAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'DHLAccount' => Array ('type' => 'string', 'default' => ''),
'DHLInvoiced' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ 'default' => 0
),
'USPEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
- 'USPAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'USPAccount' => Array ('type' => 'string', 'default' => ''),
'USPInvoiced' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ 'default' => 0
),
'ARBEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
- 'ARBAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ARBAccount' => Array ('type' => 'string', 'default' => ''),
'ARBInvoiced' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ 'default' => 0
),
'1DYEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
'2DYEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
'3DYEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
'GNDEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
'ShipMethod' => Array (
'type' => 'string',
@@ -181,6 +195,7 @@
'DRP' => 'Drop-Off At Carrier Location',
'PCK' => 'Schedule A Special Pickup',
'SCD' => 'Regularly Scheduled Pickup'),
+ 'default' => null
),
),
'Grids' => Array (
Index: in-link/install/install_schema.sql
===================================================================
--- in-link/install/install_schema.sql (revision 13936)
+++ in-link/install/install_schema.sql (working copy)
@@ -1,45 +1,45 @@
CREATE TABLE Link (
- LinkId int(11) NOT NULL auto_increment,
- Name varchar(255) NOT NULL default '',
- l1_Name varchar(255) NOT NULL default '',
- l2_Name varchar(255) NOT NULL default '',
- l3_Name varchar(255) NOT NULL default '',
- l4_Name varchar(255) NOT NULL default '',
- l5_Name varchar(255) NOT NULL default '',
- AutomaticFilename tinyint(3) unsigned NOT NULL default '1',
+ LinkId int(11) NOT NULL AUTO_INCREMENT,
+ `Name` varchar(255) NOT NULL DEFAULT '',
+ l1_Name varchar(255) NOT NULL DEFAULT '',
+ l2_Name varchar(255) NOT NULL DEFAULT '',
+ l3_Name varchar(255) NOT NULL DEFAULT '',
+ l4_Name varchar(255) NOT NULL DEFAULT '',
+ l5_Name varchar(255) NOT NULL DEFAULT '',
+ AutomaticFilename tinyint(3) unsigned NOT NULL DEFAULT '1',
Description text,
l1_Description text,
l2_Description text,
l3_Description text,
l4_Description text,
l5_Description text,
- MetaKeywords varchar(255) default NULL,
+ MetaKeywords varchar(255) DEFAULT NULL,
MetaDescription text,
- Url varchar(255) NOT NULL default '',
- CreatedOn int(10) unsigned default NULL,
- Modified int(10) unsigned default NULL,
- Expire int(10) unsigned default NULL,
- Hits double(20,6) NOT NULL default '0.000000',
- CachedRating varchar(10) NOT NULL default '0',
- CachedVotesQty int(11) NOT NULL default '0',
- CachedReviewsQty int(11) NOT NULL default '0',
- CreatedById int(11) NOT NULL default '-1',
- ModifiedById int(11) NOT NULL default '-1',
- Priority int(11) NOT NULL default '0',
- `Status` tinyint(4) NOT NULL default '2',
- EditorsPick tinyint(4) NOT NULL default '0',
- ResourceId int(11) default NULL,
- HotItem tinyint(4) NOT NULL default '2',
- PopItem tinyint(4) NOT NULL default '2',
- NewItem tinyint(4) NOT NULL default '2',
- OrgId int(11) default NULL,
- CustomTemplate varchar(255) NOT NULL default '',
- ReciprocalLinkFound tinyint(3) unsigned NOT NULL default '0',
- PRIMARY KEY (LinkId),
+ Url varchar(255) NOT NULL DEFAULT '',
+ CreatedOn int(10) unsigned DEFAULT NULL,
+ Modified int(10) unsigned DEFAULT NULL,
+ Expire int(10) unsigned DEFAULT NULL,
+ Hits double(20,6) NOT NULL DEFAULT '0.000000',
+ CachedRating varchar(10) NOT NULL DEFAULT '0',
+ CachedVotesQty int(11) NOT NULL DEFAULT '0',
+ CachedReviewsQty int(11) NOT NULL DEFAULT '0',
+ CreatedById int(11) DEFAULT NULL,
+ ModifiedById int(11) DEFAULT NULL,
+ Priority int(11) NOT NULL DEFAULT '0',
+ `Status` tinyint(4) NOT NULL DEFAULT '2',
+ EditorsPick tinyint(4) NOT NULL DEFAULT '0',
+ ResourceId int(11) DEFAULT NULL,
+ HotItem tinyint(4) NOT NULL DEFAULT '2',
+ PopItem tinyint(4) NOT NULL DEFAULT '2',
+ NewItem tinyint(4) NOT NULL DEFAULT '2',
+ OrgId int(11) DEFAULT NULL,
+ CustomTemplate varchar(255) NOT NULL DEFAULT '',
+ ReciprocalLinkFound tinyint(3) unsigned NOT NULL DEFAULT '0',
+ PRIMARY KEY (LinkId),
UNIQUE KEY ResourceId (ResourceId),
- KEY sorting (Priority,Name),
+ KEY sorting (Priority,`Name`),
KEY Hits (Hits),
- KEY Name (Name),
+ KEY `Name` (`Name`),
KEY l1_Name (l1_Name),
KEY l2_Name (l2_Name),
KEY l3_Name (l3_Name),
Index: in-link/install/upgrades.sql
===================================================================
--- in-link/install/upgrades.sql (revision 13936)
+++ in-link/install/upgrades.sql (working copy)
@@ -101,4 +101,9 @@
# ===== v 5.1.0-RC1 =====
-# ===== v 5.1.0 =====
\ No newline at end of file
+# ===== v 5.1.0 =====
+
+# ===== v 5.1.1-B1 =====
+ALTER TABLE Link
+ CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL ,
+ CHANGE ModifiedById ModifiedById INT(11) NULL DEFAULT NULL;
\ No newline at end of file
Index: in-link/units/link_validation/link_validation_config.php
===================================================================
--- in-link/units/link_validation/link_validation_config.php (revision 13939)
+++ in-link/units/link_validation/link_validation_config.php (working copy)
@@ -117,15 +117,15 @@
),
'VirtualFields' => Array (
- 'ForeignLinkId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'LinkName' => Array('type' => 'string', /*'formatter' => 'kMultiLanguage',*/ 'not_null' => 1, 'max_len' => 255, 'default' => ''),
- 'LinkUrl' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ForeignLinkId' => Array ('type' => 'int', 'default' => 0),
+ 'LinkName' => Array('type' => 'string', /*'formatter' => 'kMultiLanguage',*/ 'max_len' => 255, 'default' => ''),
+ 'LinkUrl' => Array ('type' => 'string', 'default' => ''),
'LinkCreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'LinkStatus' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
+ 'LinkStatus' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'default' => 2),
'LinkValidationStatus' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Text_Not_Validated', 1 => 'la_Text_Valid', 2 => 'la_Text_Invalid'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
+ 'default' => 0
),
// for category path drawing
Index: in-link/units/links/links_config.php
===================================================================
--- in-link/units/links/links_config.php (revision 13939)
+++ in-link/units/links/links_config.php (working copy)
@@ -377,7 +377,7 @@
),
'FilterMenu' => Array (
- 'Groups' => Array (
+ 'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => HAVING_FILTER),
@@ -463,8 +463,8 @@
'CachedRating' => Array ('type' => 'string', 'not_null' => 1, 'formatter' => 'kFormatter', 'default' => 0),
'CachedVotesQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'not_null' => 1, 'default' => 0),
'CachedReviewsQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => USER_ROOT),
- 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => USER_ROOT),
+ 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
+ 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Status' => Array (
'type' => 'int',
@@ -513,24 +513,24 @@
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ 'use_phrases' => 1, 'default' => 1,
),
- 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
- 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
+ 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
'CategoryFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
'CategorySeparator' => Array ('type' => 'string', 'error_field' => 'CategoryFormat', 'default' => ':'),
'IsBaseCategory' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ 'use_phrases' => 1, 'default' => 0,
),
// export related fields: end
// import related fields: begin
'FieldTitles' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
'ImportSource' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
- 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/'),
+ 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/', 'default' => ''),
'ImportLocalFilename' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
'CheckDuplicatesMethod' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
'ReplaceDuplicates' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
@@ -542,7 +542,9 @@
'FullImage' => Array ('type' => 'string', 'default' => ''),
'ImageAlt' => Array ('type' => 'string', 'default' => ''),
- 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'default' => ''),
+ 'CategoryFilename' => Array ('type' => 'string', 'default' => ''),
+ 'PrimaryCat' => Array ('type' => 'int', 'default' => 0),
'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
'ParentPath' => Array ('type' => 'string', 'default' => ''),
Index: in-link/units/listings/listings_config.php
===================================================================
--- in-link/units/listings/listings_config.php (revision 13939)
+++ in-link/units/listings/listings_config.php (working copy)
@@ -143,8 +143,8 @@
),
'VirtualFields' => Array (
- 'LinkName' => Array ('type' => 'string'),
- 'LinkOwner' => Array ('type' => 'string'),
+ 'LinkName' => Array ('type' => 'string', 'default' => ''),
+ 'LinkOwner' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
Index: in-news/install/install_schema.sql
===================================================================
--- in-news/install/install_schema.sql (revision 13936)
+++ in-news/install/install_schema.sql (working copy)
@@ -28,7 +28,7 @@
Hits double(20,6) NOT NULL DEFAULT '0.000000',
CachedRating varchar(10) DEFAULT '0',
CachedVotesQty int(11) NOT NULL DEFAULT '0',
- CreatedById int(11) NOT NULL DEFAULT '-1',
+ CreatedById int(11) DEFAULT NULL,
Priority int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '2',
EditorsPick tinyint(4) NOT NULL DEFAULT '0',
@@ -42,7 +42,7 @@
HotItem tinyint(4) NOT NULL DEFAULT '2',
Archived int(11) NOT NULL DEFAULT '0',
Modified int(11) DEFAULT NULL,
- ModifiedById int(11) NOT NULL DEFAULT '-1',
+ ModifiedById int(11) DEFAULT NULL,
OrgId int(11) DEFAULT NULL,
PRIMARY KEY (NewsId),
UNIQUE KEY ResourceId (ResourceId),
Index: in-news/install/upgrades.sql
===================================================================
--- in-news/install/upgrades.sql (revision 13936)
+++ in-news/install/upgrades.sql (working copy)
@@ -90,4 +90,9 @@
# ===== v 5.1.0-RC1 =====
-# ===== v 5.1.0 =====
\ No newline at end of file
+# ===== v 5.1.0 =====
+
+# ===== v 5.1.1-B1 =====
+ALTER TABLE News
+ CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL ,
+ CHANGE ModifiedById ModifiedById INT(11) NULL DEFAULT NULL;
\ No newline at end of file
Index: in-news/units/articles/articles_config.php
===================================================================
--- in-news/units/articles/articles_config.php (revision 13940)
+++ in-news/units/articles/articles_config.php (working copy)
@@ -285,7 +285,7 @@
),
'FilterMenu' => Array (
- 'Groups' => Array (
+ 'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => HAVING_FILTER),
@@ -395,7 +395,7 @@
'Hits' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
'CachedRating' => Array ('type' => 'string', 'default' => 0),
'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'required' => 1, 'default' => USER_ROOT),
+ 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'required' => 1, 'default' => NULL),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Status' => Array (
'type' => 'int',
@@ -429,7 +429,7 @@
'HotItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'Archived' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 2 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => USER_ROOT),
+ 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
'OrgId' => Array ('type' => 'int', 'default' => null),
'MetaKeywords' => Array ('type' => 'string', 'default' => null),
'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
@@ -443,7 +443,9 @@
'cust_RssOriginalURL' => Array ('type' => 'string', 'default' => ''),
'cust_RssArticleCRC' => Array ('type' => 'int', 'default' => 0),
- 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'default' => ''),
+ 'CategoryFilename' => Array ('type' => 'string', 'default' => ''),
+ 'PrimaryCat' => Array ('type' => 'int', 'default' => 0),
'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
'ParentPath' => Array ('type' => 'string', 'default' => ''),
@@ -469,24 +471,24 @@
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ 'use_phrases' => 1, 'default' => 1,
),
- 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
- 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
+ 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
'CategoryFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
'CategorySeparator' => Array ('type' => 'string', 'default' => ':'),
'IsBaseCategory' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ 'use_phrases' => 1, 'default' => 0,
),
// export related fields: end
// import related fields: begin
'FieldTitles' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
'ImportSource' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
- 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/'),
+ 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/', 'default' => ''),
'ImportLocalFilename' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
'CheckDuplicatesMethod' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
'ReplaceDuplicates' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
Index: in-news/units/articles/articles_event_handler.php
===================================================================
--- in-news/units/articles/articles_event_handler.php (revision 13936)
+++ in-news/units/articles/articles_event_handler.php (working copy)
@@ -477,12 +477,12 @@
{
$new_virtual_fields = Array(
'cust_RssSource' => Array('type' => 'string', 'default' => ''),
- 'cust_RssDefaultExpiration' => Array('type' => 'int', 'not_null' => 1, 'default' => ''),
+ 'cust_RssDefaultExpiration' => Array('type' => 'int', 'default' => ''),
'cust_RssDefaultExpirationType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month', 29030400 => 'la_opt_year'), 'default' => 60),
- 'cust_RssExpireInterval' => Array('type' => 'int', 'not_null' => 1, 'default' => ''),
+ 'cust_RssExpireInterval' => Array('type' => 'int', 'default' => ''),
'cust_RssExpireIntervalType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month'), 'default' => 60),
'cust_RssDeleteExpired' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'default' => 0),
- 'cust_RssUpdateInterval' => Array('type' => 'int', 'not_null' => 1, 'default' => ''),
+ 'cust_RssUpdateInterval' => Array('type' => 'int', 'default' => ''),
'cust_RssUpdateIntervalType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month'), 'default' => 60),
'cust_RssLastUpdated' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''),
'cust_RssLastExpired' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''),
NULL-Fix-ErrorsAfterValidation.jpg [^] (186,060 bytes) 2010-09-22 11:24

Null-Core-Dmitry.patch [^] (40,084 bytes) 2010-09-22 23:28
[Show Content]
Index: install/install_schema.sql
===================================================================
--- install/install_schema.sql (revision 13956)
+++ install/install_schema.sql (working copy)
@@ -115,7 +115,7 @@
MessageType varchar(4) NOT NULL DEFAULT 'text',
Enabled int(11) NOT NULL DEFAULT '1',
FrontEndOnly tinyint(3) unsigned NOT NULL DEFAULT '0',
- Module varchar(40) NOT NULL DEFAULT '',
+ Module varchar(40) NOT NULL DEFAULT 'Core',
Description text,
`Type` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (EventId),
@@ -144,13 +144,13 @@
Priority int(11) NOT NULL DEFAULT '0',
IconURL varchar(255) DEFAULT NULL,
IconDisabledURL varchar(255) DEFAULT NULL,
- DateFormat varchar(50) NOT NULL DEFAULT '',
- TimeFormat varchar(50) NOT NULL DEFAULT '',
+ DateFormat varchar(50) NOT NULL DEFAULT 'm/d/Y',
+ TimeFormat varchar(50) NOT NULL DEFAULT 'g:i:s A',
InputDateFormat varchar(50) NOT NULL DEFAULT 'm/d/Y',
InputTimeFormat varchar(50) NOT NULL DEFAULT 'g:i:s A',
- DecimalPoint varchar(10) NOT NULL DEFAULT '',
+ DecimalPoint varchar(10) NOT NULL DEFAULT '.',
ThousandSep varchar(10) NOT NULL DEFAULT '',
- `Charset` varchar(20) NOT NULL DEFAULT '',
+ `Charset` varchar(20) NOT NULL DEFAULT 'utf-8',
UnitSystem tinyint(4) NOT NULL DEFAULT '1',
FilenameReplacements text,
Locale varchar(10) NOT NULL DEFAULT 'en-US',
@@ -420,14 +420,14 @@
`Status` tinyint(4) NOT NULL DEFAULT '1',
Priority int(11) NOT NULL DEFAULT '0',
MetaKeywords text,
- CachedDescendantCatsQty int(11) DEFAULT NULL,
+ CachedDescendantCatsQty int(11) NOT NULL DEFAULT '0',
CachedNavbar text,
l1_CachedNavbar text,
l2_CachedNavbar text,
l3_CachedNavbar text,
l4_CachedNavbar text,
l5_CachedNavbar text,
- CreatedById int(11) NOT NULL DEFAULT '0',
+ CreatedById int(11) DEFAULT NULL,
ResourceId int(11) DEFAULT NULL,
ParentPath text,
TreeLeft bigint(20) NOT NULL DEFAULT '0',
@@ -438,7 +438,7 @@
NewItem int(11) NOT NULL DEFAULT '2',
PopItem int(11) NOT NULL DEFAULT '2',
Modified int(11) DEFAULT NULL,
- ModifiedById int(11) NOT NULL DEFAULT '0',
+ ModifiedById int(11) DEFAULT NULL,
CachedTemplate varchar(255) NOT NULL DEFAULT '',
Template varchar(255) NOT NULL DEFAULT '#inherit#',
UseExternalUrl tinyint(3) unsigned NOT NULL DEFAULT '0',
@@ -792,10 +792,10 @@
ReviewId int(11) NOT NULL AUTO_INCREMENT,
CreatedOn int(10) unsigned DEFAULT NULL,
ReviewText longtext,
- Rating tinyint(3) unsigned DEFAULT NULL,
+ Rating tinyint(3) unsigned NOT NULL DEFAULT '0',
IPAddress varchar(255) NOT NULL DEFAULT '',
ItemId int(11) NOT NULL DEFAULT '0',
- CreatedById int(11) NOT NULL DEFAULT '-1',
+ CreatedById int(11) DEFAULT NULL,
ItemType tinyint(4) NOT NULL DEFAULT '0',
Priority int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '2',
@@ -835,7 +835,7 @@
Size int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '1',
CreatedOn int(11) unsigned DEFAULT NULL,
- CreatedById int(11) NOT NULL DEFAULT '-1',
+ CreatedById int(11) DEFAULT NULL,
MimeType varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (FileId),
KEY ResourceId (ResourceId),
@@ -1151,7 +1151,7 @@
DraftId int(11) NOT NULL AUTO_INCREMENT,
FormSubmissionId int(10) unsigned NOT NULL DEFAULT '0',
CreatedOn int(10) unsigned DEFAULT NULL,
- CreatedById int(11) NOT NULL,
+ CreatedById int(11) DEFAULT NULL,
Message text,
PRIMARY KEY (DraftId),
KEY FormSubmissionId (FormSubmissionId),
Index: install/upgrades.sql
===================================================================
--- install/upgrades.sql (revision 13956)
+++ install/upgrades.sql (working copy)
@@ -1951,4 +1951,29 @@
ADD INDEX ( `Protected` );
UPDATE Category SET `Type` = IF(`Protected` = 1, 2, 1);
-UPDATE Category SET `Protected` = 1 WHERE ThemeId > 0;
\ No newline at end of file
+UPDATE Category SET `Protected` = 1 WHERE ThemeId > 0;
+
+ALTER TABLE Category CHANGE CachedDescendantCatsQty CachedDescendantCatsQty INT(11) NOT NULL DEFAULT '0';
+ALTER TABLE Events CHANGE `Module` `Module` VARCHAR(40) NOT NULL DEFAULT 'Core';
+
+ALTER TABLE Language
+ CHANGE DateFormat DateFormat VARCHAR(50) NOT NULL DEFAULT 'm/d/Y',
+ CHANGE TimeFormat TimeFormat VARCHAR(50) NOT NULL DEFAULT 'g:i:s A',
+ CHANGE DecimalPoint DecimalPoint VARCHAR(10) NOT NULL DEFAULT '.',
+ CHANGE Charset Charset VARCHAR(20) NOT NULL DEFAULT 'utf-8';
+
+ALTER TABLE ItemReview CHANGE Rating Rating TINYINT(3) UNSIGNED NOT NULL DEFAULT '0';
+UPDATE PortalUser SET tz = NULL;
+
+ALTER TABLE Category
+ CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL,
+ CHANGE ModifiedById ModifiedById INT(11) NULL DEFAULT NULL;
+UPDATE Category SET CreatedById = NULL WHERE CreatedById = 0;
+UPDATE Category SET ModifiedById = NULL WHERE ModifiedById = 0;
+
+ALTER TABLE ItemFiles CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
+
+ALTER TABLE Drafts CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
+UPDATE Drafts SET CreatedById = NULL WHERE CreatedById = 0;
+
+ALTER TABLE ItemReview CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
\ No newline at end of file
Index: kernel/utility/unit_config_reader.php
===================================================================
--- kernel/utility/unit_config_reader.php (revision 13956)
+++ kernel/utility/unit_config_reader.php (working copy)
@@ -640,7 +640,12 @@
'not_null_error2' => 'Field <strong>%s</strong> is described as NOT NULL in config, but <strong>does not have DEFAULT value</strong>',
'not_null_error3' => 'Field <strong>%s</strong> is described as <strong>NOT NULL in config</strong>, but is <strong>NULL in db</strong>',
'invalid_default' => '<strong>Default value</strong> for field %s<strong>%s</strong> not sync. to db (in config = %s, in db = %s)',
+ 'date_column_not_null_error' => 'Field <strong>%s</strong> must be NULL in config and database, since it contains date',
+ 'user_column_default_error' => 'Field <strong>%s</strong> must be have NULL as default value, since it holds user id',
'type_missing' => '<strong>Type definition</strong> for field <strong>%s</strong> missing in config',
+ 'virtual_type_missing' => '<strong>Type definition</strong> for virtual field <strong>%s</strong> missing in config',
+ 'virtual_default_missing' => 'Default value for virtual field <strong>%s</strong> not set in config',
+ 'virtual_not_null_error' => 'Virtual field <strong>%s</strong> cannot be not null, since it doesn\'t exist in database',
'invalid_calculated_field' => 'Calculated field <strong>%s</strong> is missing corresponding virtual field',
);
@@ -670,6 +675,7 @@
$default_missing = false;
$options = $config['Fields'][$f_name];
$not_null = isset($options['not_null']) && $options['not_null'];
+ $formatter = array_key_exists('formatter', $options) ? $options['formatter'] : false;
if (!array_key_exists('default', $options)) {
$config_errors[] = sprintf($error_messages['default_missing'], $f_name);
@@ -689,11 +695,24 @@
$config_errors[] = sprintf($error_messages['not_null_error3'], $f_name);
}
+ if (($formatter == 'kDateFormatter') && $not_null) {
+ $config_errors[] = sprintf($error_messages['date_column_not_null_error'], $f_name);
+ }
+
+ // columns, holding userid should have NULL as default value
+ if (array_key_exists('type', $options) && !$default_missing) {
+ // both type and default value set
+
+ if (preg_match('/ById$/', $f_name) && $options['default'] !== null) {
+ $config_errors[] = sprintf($error_messages['user_column_default_error'], $f_name);
+ }
+ }
+
if (!array_key_exists('type', $options)) {
$config_errors[] = sprintf($error_messages['type_missing'], $f_name);
}
- if (!$default_missing) {
+ if (!$default_missing && ($field['Type'] != 'text')) {
if ( is_null($db_default) && $not_null ) {
$db_default = $options['type'] == 'string' ? '' : 0;
}
@@ -709,6 +728,23 @@
}
}
+ // validate virtual fields
+ if ( array_key_exists('VirtualFields', $config) ) {
+ foreach ($config['VirtualFields'] as $f_name => $options) {
+ if (!array_key_exists('type', $options)) {
+ $config_errors[] = sprintf($error_messages['virtual_type_missing'], $f_name);
+ }
+
+ if (array_key_exists('not_null', $options)) {
+ $config_errors[] = sprintf($error_messages['virtual_not_null_error'], $f_name);
+ }
+
+ if (!array_key_exists('default', $options)) {
+ $config_errors[] = sprintf($error_messages['virtual_default_missing'], $f_name);
+ }
+ }
+ }
+
// validate calculated fields
if ( array_key_exists('CalculatedFields', $config) ) {
foreach ($config['CalculatedFields'] as $special => $calculated_fields) {
@@ -718,6 +754,8 @@
}
}
}
+
+ $config_errors = array_unique($config_errors);
}
if ($config_errors) {
Index: units/categories/categories_config.php
===================================================================
--- units/categories/categories_config.php (revision 13956)
+++ units/categories/categories_config.php (working copy)
@@ -324,9 +324,9 @@
'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1,'default' => 1),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
'MetaKeywords' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
- 'CachedDescendantCatsQty' => Array ('type' => 'int', 'default' => 0),
+ 'CachedDescendantCatsQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'CachedNavbar' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
- 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0),
+ 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
'ResourceId' => Array ('type' => 'int', 'default' => null),
'ParentPath' => Array ('type' => 'string', 'default' => null),
'TreeLeft' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
@@ -337,7 +337,7 @@
'NewItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'PopItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0),
+ 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
'CachedTemplate' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
Index: units/category_items/category_items_config.php
===================================================================
--- units/category_items/category_items_config.php (revision 13956)
+++ units/category_items/category_items_config.php (working copy)
@@ -65,9 +65,9 @@
),
'VirtualFields' => Array (
- 'CategoryName' => Array(),
- 'DummyId' => Array(),
- 'CategoryStatus' => Array(),
+ 'CategoryName' => Array ('type' => 'string', 'default' => ''),
+ 'DummyId' => Array ('type' => 'int', 'default' => 0),
+ 'CategoryStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'default' => 1),
),
'Grids' => Array (
Index: units/custom_data/custom_data_event_handler.php
===================================================================
--- units/custom_data/custom_data_event_handler.php (revision 13956)
+++ units/custom_data/custom_data_event_handler.php (working copy)
@@ -154,7 +154,7 @@
foreach ($custom_fields as $custom_id => $custom_params) {
$custom_name = $custom_params['FieldName'];
- $field_options = Array('type' => 'string', 'not_null' => 1, 'default' => $custom_params['DefaultValue']);
+ $field_options = Array('type' => 'string', 'default' => $custom_params['DefaultValue']);
// raises warnings during 4.3.9 -> 5.0.0 upgrade, no fatal sqls though
if ($custom_params['IsRequired']) {
Index: units/custom_fields/custom_fields_config.php
===================================================================
--- units/custom_fields/custom_fields_config.php (revision 13956)
+++ units/custom_fields/custom_fields_config.php (working copy)
@@ -139,9 +139,9 @@
),
// for ValueList field editing via "inp_edit_minput" control
- 'OptionKey' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'OptionTitle' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'Options' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'OptionKey' => Array ('type' => 'string', 'default' => ''),
+ 'OptionTitle' => Array ('type' => 'string', 'default' => ''),
+ 'Options' => Array ('type' => 'string', 'default' => ''),
),
Index: units/email_events/email_events_config.php
===================================================================
--- units/email_events/email_events_config.php (revision 13956)
+++ units/email_events/email_events_config.php (working copy)
@@ -197,13 +197,13 @@
'RecipientType' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'To', 2 => 'Cc', 3 => 'Bcc'),
- 'not_null' => 1, 'default' => 1
+ 'default' => 1
),
- 'RecipientName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'RecipientName' => Array ('type' => 'string', 'max_len' => 255, 'default' => ''),
'RecipientAddressType' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Email', 2 => 'la_opt_User', 3 => 'la_opt_Group'), 'use_phrases' => 1,
- 'not_null' => 1, 'error_field' => 'RecipientAddress', 'default' => 0
+ 'error_field' => 'RecipientAddress', 'default' => 0
),
'RecipientAddress' => Array (
'type' => 'string', 'max_len' => 255,
@@ -212,7 +212,7 @@
'invalid_user' => '!la_error_UserNotFound!',
'invalid_group' => '!la_error_GroupNotFound!',
),
- 'not_null' => 1, 'default' => ''
+ 'default' => ''
),
'Tag' => Array ('type' => 'string', 'default' => ''),
Index: units/files/files_config.php
===================================================================
--- units/files/files_config.php (revision 13956)
+++ units/files/files_config.php (working copy)
@@ -79,7 +79,7 @@
'not_null' => 1, 'default' => 1,
),
'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'CreatedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => USER_ROOT),
+ 'CreatedById' => Array ('type' => 'int', 'default' => NULL),
'MimeType' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
),
Index: units/forms/drafts/drafts_config.php
===================================================================
--- units/forms/drafts/drafts_config.php (revision 13956)
+++ units/forms/drafts/drafts_config.php (working copy)
@@ -56,7 +56,7 @@
'DraftId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'FormSubmissionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'CreatedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'CreatedById' => Array ('type' => 'int', 'default' => NULL),
'Message' => Array ('type' => 'string', 'default' => NULL),
),
);
\ No newline at end of file
Index: units/helpers/file_helper.php
===================================================================
--- units/helpers/file_helper.php (revision 13956)
+++ units/helpers/file_helper.php (working copy)
@@ -151,7 +151,6 @@
'type' => 'string',
'max_len' => 240,
'default' => '',
- 'not_null' => 1,
);
if ($is_image) {
@@ -222,7 +221,7 @@
*/
function _createCustomFields($prefix, $field_name, &$virtual_fields, $is_image)
{
- $virtual_fields['Delete' . $field_name] = Array ('type' => 'int', 'not_null' => 1, 'default' => 0);
+ $virtual_fields['Delete' . $field_name] = Array ('type' => 'int', 'default' => 0);
if ($is_image) {
$virtual_fields[$field_name . 'Alt'] = Array ('type' => 'string', 'default' => '');
Index: units/images/images_config.php
===================================================================
--- units/images/images_config.php (revision 13956)
+++ units/images/images_config.php (working copy)
@@ -100,7 +100,7 @@
'Sorting' => Array('Name' => 'asc'),
)
),
-
+
'Fields' => Array (
'ImageId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
@@ -126,7 +126,7 @@
'Enabled' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled',),
- 'default' => 0, 'not_null' => 1, 'use_phrases' => 1,
+ 'default' => 1, 'not_null' => 1, 'use_phrases' => 1,
),
'DefaultImg' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter',
@@ -158,8 +158,8 @@
),
'VirtualFields' => Array(
- 'Preview' => Array(),
- 'ImageUrl' => Array(),
+ 'Preview' => Array ('type' => 'string', 'default' => ''),
+ 'ImageUrl' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array(
Index: units/logs/change_logs/change_logs_config.php
===================================================================
--- units/logs/change_logs/change_logs_config.php (revision 13956)
+++ units/logs/change_logs/change_logs_config.php (working copy)
@@ -130,6 +130,13 @@
'MasterId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
),
+ 'VirtualFields' => Array (
+ 'UserLogin' => Array ('type' => 'string', 'default' => ''),
+ 'UserFirstName' => Array ('type' => 'string', 'default' => ''),
+ 'UserLastName' => Array ('type' => 'string', 'default' => ''),
+ 'UserEmail' => Array ('type' => 'string', 'default' => ''),
+ ),
+
'Grids' => Array (
'Default' => Array (
'Icons' => Array ('default' => 'icon16_item.png'),
@@ -139,6 +146,7 @@
'UserLogin' => Array ('title' => 'la_col_Username', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'UserFirstName' => Array ('title' => 'la_col_FirstName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
'UserLastName' => Array ('title' => 'la_col_LastName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
+ 'UserEmail' => Array ('title' => 'la_col_Email', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
'SessionLogId' => Array ('title' => 'la_col_SessionLogId', 'filter_block' => 'grid_range_filter', 'width' => 120, ),
'Action' => Array ('title' => 'la_col_Action', 'filter_block' => 'grid_options_filter', 'width' => 120, ),
'OccuredOn' => Array ('title' => 'la_col_OccuredOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
Index: units/logs/session_logs/session_logs_config.php
===================================================================
--- units/logs/session_logs/session_logs_config.php (revision 13956)
+++ units/logs/session_logs/session_logs_config.php (working copy)
@@ -103,6 +103,10 @@
'VirtualFields' => Array(
'Duration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'date_format' => '', 'time_format' => 'H:i:s', 'use_timezone' => false, 'default' => NULL),
+ 'UserLogin' => Array ('type' => 'string', 'default' => ''),
+ 'UserFirstName' => Array ('type' => 'string', 'default' => ''),
+ 'UserLastName' => Array ('type' => 'string', 'default' => ''),
+ 'UserEmail' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
@@ -114,6 +118,7 @@
'UserLogin' => Array ('title' => 'la_col_Username', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'UserFirstName' => Array ('title' => 'la_col_FirstName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
'UserLastName' => Array ('title' => 'la_col_LastName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
+ 'UserEmail' => Array ('title' => 'la_col_Email', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
'SessionStart' => Array ('title' => 'la_col_SessionStart', 'filter_block' => 'grid_date_range_filter', 'width' => 120, ),
'SessionEnd' => Array ('title' => 'la_col_SessionEnd', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Duration' => Array ('title' => 'la_col_Duration', 'filter_block' => 'grid_range_filter', 'width' => 100, ),
Index: units/phrases/phrases_config.php
===================================================================
--- units/phrases/phrases_config.php (revision 13956)
+++ units/phrases/phrases_config.php (working copy)
@@ -77,10 +77,10 @@
),
'FilterMenu' => Array (
- 'Groups' => Array (
+ 'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('translated', 'not_translated'), 'type' => HAVING_FILTER),
),
- 'Filters' => Array (
+ 'Filters' => Array (
'translated' => Array ('label' => 'la_PhraseTranslated', 'on_sql' => '', 'off_sql' => 'CurrentTranslation IS NULL'),
'not_translated' => Array ('label' => 'la_PhraseNotTranslated', 'on_sql' => '', 'off_sql' => 'CurrentTranslation IS NOT NULL'),
)
@@ -146,7 +146,7 @@
0 => 'la_No',
1 => 'la_Yes',
),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ 'use_phrases' => 1, 'default' => 0,
),
'DoNotEncode' => Array (
'type' => 'int',
@@ -155,7 +155,7 @@
0 => 'la_No',
1 => 'la_Yes',
),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ 'use_phrases' => 1, 'default' => 0,
),
'ExportPhrases' => Array ('type' => 'string', 'default' => ''),
'ExportEmailEvents' => Array ('type' => 'string', 'default' => ''),
Index: units/relationship/relationship_config.php
===================================================================
--- units/relationship/relationship_config.php (revision 13956)
+++ units/relationship/relationship_config.php (working copy)
@@ -84,8 +84,8 @@
'Priority' => Array('type'=>'int','not_null'=>1,'default'=>0),
),
'VirtualFields' => Array(
- 'ItemName' => Array(),
- 'ItemType' => Array(),
+ 'ItemName' => Array ('type' => 'string', 'default' => ''),
+ 'ItemType' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array(
Index: units/reviews/reviews_config.php
===================================================================
--- units/reviews/reviews_config.php (revision 13956)
+++ units/reviews/reviews_config.php (working copy)
@@ -122,7 +122,7 @@
4 => 'lu_Rating_4',
5 => 'lu_Rating_5'),
'use_phrases' => 1,
- 'min_value_inc' => 0, 'max_value_inc' => 5, 'default' => 0,
+ 'min_value_inc' => 0, 'max_value_inc' => 5, 'not_null' => 1, 'default' => 0,
),
'IPAddress' => Array (
'type' => 'string',
@@ -140,7 +140,7 @@
WHERE `%s` = \'%s\' ',
'left_key_field' => 'PortalUserId',
'left_title_field' => 'Login',
- 'required' => 1, 'not_null' => 1, 'default' => USER_ROOT,
+ 'required' => 1, 'default' => NULL,
'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
),
'ItemType' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
@@ -169,6 +169,9 @@
'CatalogItemName' => Array ('type' => 'string', 'default' => ''),
'CatalogItemId' => Array ('type' => 'int', 'default' => 0),
'CatalogItemCategory' => Array ('type' => 'int', 'default' => 0),
+
+ 'ItemName' => Array ('type' => 'string', 'default' => ''),
+ 'ProductId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array (
Index: units/selectors/selectors_config.php
===================================================================
--- units/selectors/selectors_config.php (revision 13956)
+++ units/selectors/selectors_config.php (working copy)
@@ -114,14 +114,14 @@
),
'VirtualFields' => Array(
- 'FontStyle' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','normal'=>'normal','italic'=>'italic','oblique'=>'oblique'), 'default'=>'' ),
- 'FontWeight' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','100'=>'100','200'=>'200','300'=>'300','normal'=>'normal','500'=>'500','600'=>'600','bold'=>'bold','800'=>'800','900'=>'900','lighter'=>'lighter','bolder'=>'bolder') ),
- 'StyleCursor' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','default'=>'default','auto'=>'auto','n-resize'=>'n-resize','ne-resize'=>'ne-resize','e-resize'=>'e-resize','se-resize'=>'se-resize','s-resize'=>'s-resize','sw-resize'=>'sw-resize','w-resize'=>'w-resize','nw-resize'=>'nw-resize','crosshair'=>'crosshair','pointer'=>'pointer','move'=>'move','text'=>'text','wait'=>'wait','help'=>'help','hand'=>'hand','all-scroll'=>'all-scroll','col-resize'=>'col-resize','row-resize'=>'row-resize','no-drop'=>'no-drop','not-allowed'=>'not-allowed','progress'=>'progress','vertical-text'=>'vertical-text','alias'=>'alias','cell'=>'cell','copy'=>'copy','count-down'=>'count-down','count-up'=>'count-up','count-up-down'=>'count-up-down','grab'=>'grab','grabbing'=>'grabbing','spinning'=>'spinning') ),
- 'StyleDisplay' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','none'=>'none','inline'=>'inline','block'=>'block','inline-block'=>'inline-block','list-item'=>'list-item','marker'=>'marker','compact'=>'compact','run-in'=>'run-in','table-header-group'=>'table-header-group','table-footer-group'=>'table-footer-group','table'=>'table','inline-table'=>'inline-table','table-caption'=>'table-caption','table-row'=>'table-row','table-row-group'=>'table-row-group','table-column'=>'table-column','table-column-group'=>'table-column-group') ),
- 'TextAlign' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','left'=>'left','right'=>'right','center'=>'center','justify'=>'justify') ),
- 'TextDecoration' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','none'=>'none','underline'=>'underline','overline'=>'overline','line-through'=>'line-through','blink'=>'blink') ),
- 'StyleVisibility' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','visible'=>'visible','hidden'=>'hidden','collapse'=>'collapse') ),
- 'StylePosition' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','static'=>'static','relative'=>'relative','absolute'=>'absolute','fixed'=>'fixed') ),
+ 'FontStyle' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','normal'=>'normal','italic'=>'italic','oblique'=>'oblique'), 'default'=>''),
+ 'FontWeight' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','100'=>'100','200'=>'200','300'=>'300','normal'=>'normal','500'=>'500','600'=>'600','bold'=>'bold','800'=>'800','900'=>'900','lighter'=>'lighter','bolder'=>'bolder'), 'default' => ''),
+ 'StyleCursor' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','default'=>'default','auto'=>'auto','n-resize'=>'n-resize','ne-resize'=>'ne-resize','e-resize'=>'e-resize','se-resize'=>'se-resize','s-resize'=>'s-resize','sw-resize'=>'sw-resize','w-resize'=>'w-resize','nw-resize'=>'nw-resize','crosshair'=>'crosshair','pointer'=>'pointer','move'=>'move','text'=>'text','wait'=>'wait','help'=>'help','hand'=>'hand','all-scroll'=>'all-scroll','col-resize'=>'col-resize','row-resize'=>'row-resize','no-drop'=>'no-drop','not-allowed'=>'not-allowed','progress'=>'progress','vertical-text'=>'vertical-text','alias'=>'alias','cell'=>'cell','copy'=>'copy','count-down'=>'count-down','count-up'=>'count-up','count-up-down'=>'count-up-down','grab'=>'grab','grabbing'=>'grabbing','spinning'=>'spinning'), 'default' => ''),
+ 'StyleDisplay' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','none'=>'none','inline'=>'inline','block'=>'block','inline-block'=>'inline-block','list-item'=>'list-item','marker'=>'marker','compact'=>'compact','run-in'=>'run-in','table-header-group'=>'table-header-group','table-footer-group'=>'table-footer-group','table'=>'table','inline-table'=>'inline-table','table-caption'=>'table-caption','table-row'=>'table-row','table-row-group'=>'table-row-group','table-column'=>'table-column','table-column-group'=>'table-column-group'), 'default' => ''),
+ 'TextAlign' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','left'=>'left','right'=>'right','center'=>'center','justify'=>'justify'), 'default' => ''),
+ 'TextDecoration' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','none'=>'none','underline'=>'underline','overline'=>'overline','line-through'=>'line-through','blink'=>'blink'), 'default' => ''),
+ 'StyleVisibility' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','visible'=>'visible','hidden'=>'hidden','collapse'=>'collapse'), 'default' => ''),
+ 'StylePosition' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','static'=>'static','relative'=>'relative','absolute'=>'absolute','fixed'=>'fixed'), 'default' => ''),
),
'Grids' => Array(
Index: units/structure/structure_config.php
===================================================================
--- units/structure/structure_config.php (revision 13956)
+++ units/structure/structure_config.php (working copy)
@@ -140,9 +140,9 @@
'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1,'default' => 1),
'Priority' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => array(), 'required' => 1, 'default' => 0),
'MetaKeywords' => Array('type' => 'string', 'default' => null),
- 'CachedDescendantCatsQty' => Array('type' => 'int', 'default' => 0),
+ 'CachedDescendantCatsQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'CachedNavbar' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
- 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0),
+ 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
'ResourceId' => Array('type' => 'int', 'default' => null),
'ParentPath' => Array('type' => 'string', 'default' => null),
'TreeLeft' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
@@ -153,7 +153,7 @@
'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0),
+ 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
'CachedTemplate' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
Index: units/user_groups/user_groups_config.php
===================================================================
--- units/user_groups/user_groups_config.php (revision 13956)
+++ units/user_groups/user_groups_config.php (working copy)
@@ -41,8 +41,8 @@
),
),
'VirtualFields' => Array (
- 'UserName' => Array('type' => 'string'),
- 'UserLogin' => Array('type' => 'string'),
+ 'UserName' => Array('type' => 'string', 'default' => ''),
+ 'UserLogin' => Array('type' => 'string', 'default' => ''),
),
'Grids' => Array(
'GroupUsers' => Array(
@@ -108,8 +108,8 @@
),
'VirtualFields' => Array (
- 'GroupName' => Array('type' => 'string'),
- 'GroupDescription' => Array('type' => 'string'),
+ 'GroupName' => Array('type' => 'string', 'default' => ''),
+ 'GroupDescription' => Array('type' => 'string', 'default' => ''),
),
Index: units/users/users_config.php
===================================================================
--- units/users/users_config.php (revision 13956)
+++ units/users/users_config.php (working copy)
@@ -379,7 +379,7 @@
'Status' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(1=>'la_Enabled', 0=>'la_Disabled', 2=>'la_Pending'), 'use_phrases'=>1, 'not_null' => '1','default' => 1),
'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'dob' => Array('type'=>'int', 'formatter' => 'kDateFormatter', 'default' => null),
- 'tz' => Array('type' => 'int','default' => 0),
+ 'tz' => Array('type' => 'int', 'default' => NULL),
'ip' => Array('type' => 'string','default' => null),
'IsBanned' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'PassResetTime' => Array('type' => 'int','default' => null),
@@ -413,7 +413,7 @@
'UserGroup' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %1$s FROM ' . TABLE_PREFIX . 'PortalGroup WHERE Enabled = 1 AND FrontRegistration = 1', 'option_key_field' => 'GroupId', 'option_title_field' => 'Name',
- 'not_null' => 1, 'default' => 0,
+ 'default' => 0,
),
),
Index: units/visits/visits_config.php
===================================================================
--- units/visits/visits_config.php (revision 13956)
+++ units/visits/visits_config.php (working copy)
@@ -138,13 +138,14 @@
),
'VirtualFields' => Array (
- 'UserName' => Array ('type' => 'string'),
- 'AffiliateUser' => Array ('type' => 'string'),
- 'AffiliatePortalUserId' => Array ('type' => 'int'),
- 'OrderTotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => '1','default' => '0.00', 'totals' => 'SUM'),
- 'OrderTotalAmountSum' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => '1','default' => '0.00'),
- 'OrderAffiliateCommission' => Array ('type' => 'double', 'formatter' => 'kFormatter','format' => '%.02f', 'not_null' => '1','default' => '0.0000', 'totals' => 'SUM'),
- 'OrderAffiliateCommissionSum' => Array ('type' => 'double', 'formatter' => 'kFormatter','format' => '%.02f', 'not_null' => '1','default' => '0.0000'),
+ 'UserName' => Array ('type' => 'string', 'default' => ''),
+ 'AffiliateUser' => Array ('type' => 'string', 'default' => ''),
+ 'AffiliatePortalUserId' => Array ('type' => 'int', 'default' => null),
+ 'OrderTotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00', 'totals' => 'SUM'),
+ 'OrderTotalAmountSum' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
+ 'OrderAffiliateCommission' => Array ('type' => 'double', 'formatter' => 'kFormatter','format' => '%.02f', 'default' => '0.0000', 'totals' => 'SUM'),
+ 'OrderAffiliateCommissionSum' => Array ('type' => 'double', 'formatter' => 'kFormatter','format' => '%.02f', 'default' => '0.0000'),
+ 'OrderNumber' => Array ('type' => 'string', 'default' => ''),
'OrderId' => Array ('type' => 'int', 'default' => '0'),
),
Null-Modules-Dmitry.patch [^] (70,891 bytes) 2010-09-22 23:29
[Show Content]
Index: in-auction/install/install_schema.sql
===================================================================
--- in-auction/install/install_schema.sql (revision 13954)
+++ in-auction/install/install_schema.sql (working copy)
@@ -250,7 +250,7 @@
ListingType tinyint(1) NOT NULL DEFAULT '1',
ContinueUntilQty int(11) NOT NULL DEFAULT '0',
LastProcessed int(11) DEFAULT NULL,
- `Status` tinyint(1) NOT NULL DEFAULT '1',
+ `Status` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (ScheduleId),
KEY LastProcessed (LastProcessed)
);
Index: in-auction/install/upgrades.sql
===================================================================
--- in-auction/install/upgrades.sql (revision 13954)
+++ in-auction/install/upgrades.sql (working copy)
@@ -62,4 +62,7 @@
# ===== v 5.1.0-RC1 =====
-# ===== v 5.1.0 =====
\ No newline at end of file
+# ===== v 5.1.0 =====
+
+# ===== v 5.1.1-B1 =====
+ALTER TABLE eBaySchedules CHANGE `Status` `Status` tinyint(1) NOT NULL DEFAULT '0';
Index: in-auction/units/listing/listing_config.php
===================================================================
--- in-auction/units/listing/listing_config.php (revision 13954)
+++ in-auction/units/listing/listing_config.php (working copy)
@@ -245,7 +245,7 @@
),
'VirtualFields' => Array(
- 'ProductsProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ProductsProductId' => Array ('type' => 'int', 'default' => 0),
'ListingTitle' => Array ('type' => 'string', 'default' => null),
'SKU' => Array ('type' => 'string', 'default' => ''),
'ListingDuration' => Array (
Index: in-auction/units/sections/ebay_eh.php
===================================================================
--- in-auction/units/sections/ebay_eh.php (revision 13954)
+++ in-auction/units/sections/ebay_eh.php (working copy)
@@ -96,8 +96,6 @@
$this->Application->setUnitOption($event->MasterEvent->Prefix, 'ItemSQLs', $a_ItemSQLs);
-
-
$a_base_fields = $this->Application->getUnitOption('l-ebay', 'Fields');
$a_fields_to_join = Array(
@@ -120,6 +118,8 @@
foreach ($a_fields_to_join AS $field)
{
$a_virtual_fields['Last'.$field] = $a_base_fields[$field];
+ // not_null should not be set for virtual fields
+ unset($a_virtual_fields['Last'.$field]['not_null']);
$a_calculated_fields['']['Last'.$field] = 'ebl.'.$field;
$a_calculated_fields['showall']['Last'.$field] = 'ebl.'.$field;
}
Index: in-bulletin/install/install_schema.sql
===================================================================
--- in-bulletin/install/install_schema.sql (revision 13954)
+++ in-bulletin/install/install_schema.sql (working copy)
@@ -34,8 +34,8 @@
EditorsPick tinyint(4) NOT NULL DEFAULT '0',
`Status` tinyint(4) unsigned NOT NULL DEFAULT '2',
Priority int(11) NOT NULL DEFAULT '0',
- OwnerId int(11) NOT NULL DEFAULT '-1',
- ModifiedById int(11) NOT NULL DEFAULT '0',
+ OwnerId int(11) DEFAULT NULL,
+ ModifiedById int(11) DEFAULT NULL,
ResourceId int(11) DEFAULT NULL,
TopicType int(11) NOT NULL DEFAULT '1',
CreatedOn int(11) DEFAULT NULL,
@@ -167,7 +167,7 @@
CommentId int(11) NOT NULL AUTO_INCREMENT,
PollId int(11) NOT NULL DEFAULT '0',
AnswerId int(11) DEFAULT NULL,
- CreatedById int(11) NOT NULL DEFAULT '-2',
+ CreatedById int(11) DEFAULT NULL,
GuestName varchar(255) NOT NULL DEFAULT '',
GuestEmail varchar(255) NOT NULL DEFAULT '',
CommentBody text,
Index: in-bulletin/install/upgrades.sql
===================================================================
--- in-bulletin/install/upgrades.sql (revision 13954)
+++ in-bulletin/install/upgrades.sql (working copy)
@@ -199,4 +199,13 @@
# ===== v 5.1.0-RC1 =====
-# ===== v 5.1.0 =====
\ No newline at end of file
+# ===== v 5.1.0 =====
+
+# ===== v 5.1.1-B1 =====
+ALTER TABLE PollsComments CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
+
+ALTER TABLE Topic
+ CHANGE OwnerId OwnerId INT( 11 ) NULL DEFAULT NULL ,
+ CHANGE ModifiedById ModifiedById INT( 11 ) NULL DEFAULT NULL;
+
+UPDATE Topic SET ModifiedById = NULL WHERE ModifiedById = 0;
\ No newline at end of file
Index: in-bulletin/units/poll_comments/poll_comments_config.php
===================================================================
--- in-bulletin/units/poll_comments/poll_comments_config.php (revision 13954)
+++ in-bulletin/units/poll_comments/poll_comments_config.php (working copy)
@@ -64,7 +64,7 @@
'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),
'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' => USER_GUEST),
+ 'required' => 1, 'default' => NULL),
'GuestName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'GuestEmail' => Array('type' => 'string', 'max_len' => 255, 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'not_null' => '1', 'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!', 'unique'=>'!lu_email_already_exist!'),'required' => 0 ),
'CommentBody' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL, 'required' => 1),
Index: in-bulletin/units/posts/posts_config.php
===================================================================
--- in-bulletin/units/posts/posts_config.php (revision 13954)
+++ in-bulletin/units/posts/posts_config.php (working copy)
@@ -99,7 +99,7 @@
'DisableBBCodes' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0),
'DisableSmileys' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0),
'ShowSignatures' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 1),
-
+ 'UserName' => Array ('type' => 'string', 'default' => ''),
// for avatar image
'AltName' => Array('type' => 'string', 'default' => ''),
'SameImages' => Array('type' => 'string', 'default' => ''),
Index: in-bulletin/units/private_messages/private_messages_config.php
===================================================================
--- in-bulletin/units/private_messages/private_messages_config.php (revision 13954)
+++ in-bulletin/units/private_messages/private_messages_config.php (working copy)
@@ -96,7 +96,9 @@
'VirtualFields' => Array (
'FromName' => Array ('type' => 'string', 'default' => ''),
+ 'FromFullName' => Array ('type' => 'string', 'default' => ''),
'ToName' => Array ('type' => 'string', 'default' => ''),
+ 'ToFullName' => Array ('type' => 'string', 'default' => ''),
'Subject' => Array ('type' => 'string', 'default' => ''),
'Body' => Array ('type' => 'string', 'required' => 1, 'default' => ''),
'Options' => Array ('type' => 'string', 'default' => 0),
Index: in-bulletin/units/topics/topics_config.php
===================================================================
--- in-bulletin/units/topics/topics_config.php (revision 13954)
+++ in-bulletin/units/topics/topics_config.php (working copy)
@@ -243,7 +243,7 @@
),
'FilterMenu' => Array (
- 'Groups' => Array (
+ 'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => HAVING_FILTER),
@@ -390,7 +390,7 @@
'left_key_field' => 'PortalUserId',
'left_title_field' => 'Login',
'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
- 'required' => 1, 'not_null' => 1, 'default' => USER_ROOT,
+ 'required' => 1, 'default' => NULL,
),
'ModifiedById' => Array (
'type' => 'int',
@@ -401,7 +401,7 @@
'left_key_field' => 'PortalUserId',
'left_title_field' => 'Login',
'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
- 'required' => 1, 'not_null' => 1, 'default' => USER_ROOT,
+ 'required' => 1, 'default' => NULL,
),
'ResourceId' => Array ('type' => 'int', 'default' => null),
'TopicType' => Array (
@@ -462,8 +462,11 @@
'options' => Array (),
'default' => 0,
),
- 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'default' => ''),
+ 'CategoryFilename' => Array ('type' => 'string', 'default' => ''),
+ 'PrimaryCat' => Array ('type' => 'int', 'default' => 0),
'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
+ 'ParentPath' => Array ('type' => 'string', 'default' => ''),
'LastPoster' => Array ('type' => 'string', 'default' => ''),
'LastPosterId' => Array ('type' => 'int', 'default' => USER_GUEST),
Index: in-commerce/install/install_schema.sql
===================================================================
--- in-commerce/install/install_schema.sql (revision 13954)
+++ in-commerce/install/install_schema.sql (working copy)
@@ -171,7 +171,7 @@
ReturnTotal decimal(20,4) NOT NULL DEFAULT '0.0000',
CostTotal decimal(20,4) NOT NULL DEFAULT '0.0000',
OriginalAmount decimal(20,4) NOT NULL DEFAULT '0.0000',
- ShippingOption tinyint(4) DEFAULT NULL,
+ ShippingOption tinyint(4) NOT NULL DEFAULT '0',
ShippingInfo text,
CouponId int(11) DEFAULT NULL,
CouponDiscount decimal(20,4) NOT NULL DEFAULT '0.0000',
@@ -301,11 +301,11 @@
Modified int(10) unsigned DEFAULT NULL,
Expire int(10) unsigned DEFAULT NULL,
Hits double NOT NULL DEFAULT '0',
- CachedRating varchar(10) NOT NULL default '0',
+ CachedRating varchar(10) NOT NULL DEFAULT '0',
CachedVotesQty int(11) NOT NULL DEFAULT '0',
CachedReviewsQty int(11) NOT NULL DEFAULT '0',
- CreatedById int(11) NOT NULL DEFAULT '0',
- ModifiedById int(11) NOT NULL DEFAULT '0',
+ CreatedById int(11) DEFAULT NULL,
+ ModifiedById int(11) DEFAULT NULL,
Priority int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '2',
EditorsPick tinyint(4) NOT NULL DEFAULT '0',
@@ -444,7 +444,7 @@
IsPrimary tinyint(4) NOT NULL DEFAULT '0',
Priority smallint(6) NOT NULL DEFAULT '0',
AddedOn int(11) DEFAULT NULL,
- AddedById int(11) NOT NULL DEFAULT '0',
+ AddedById int(11) DEFAULT NULL,
MIMEType varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (FileId),
KEY ProductId (ProductId),
Index: in-commerce/install/upgrades.sql
===================================================================
--- in-commerce/install/upgrades.sql (revision 13954)
+++ in-commerce/install/upgrades.sql (working copy)
@@ -180,3 +180,15 @@
# ===== v 5.1.0 =====
ALTER TABLE Products CHANGE CachedRating CachedRating varchar(10) NOT NULL default '0';
+
+# ===== v 5.1.1-B1 =====
+ALTER TABLE Orders CHANGE ShippingOption ShippingOption TINYINT(4) NOT NULL DEFAULT '0';
+
+ALTER TABLE ProductFiles CHANGE AddedById AddedById INT(11) NULL DEFAULT NULL;
+UPDATE ProductFiles SET AddedById = NULL WHERE AddedById = 0;
+
+ALTER TABLE Products
+ CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL ,
+ CHANGE ModifiedById ModifiedById INT(11) NULL DEFAULT NULL;
+UPDATE Products SET CreatedById = NULL WHERE CreatedById = 0;
+UPDATE Products SET ModifiedById = NULL WHERE ModifiedById = 0;
Index: in-commerce/units/addresses/addresses_config.php
===================================================================
--- in-commerce/units/addresses/addresses_config.php (revision 13954)
+++ in-commerce/units/addresses/addresses_config.php (working copy)
@@ -110,7 +110,7 @@
),
'VirtualFields' => Array(
- 'ShortAddress' => Array('type'=>'string'),
+ 'ShortAddress' => Array('type'=>'string', 'default' => ''),
),
'Grids' => Array(),
Index: in-commerce/units/affiliate_payments/affiliate_payments_config.php
===================================================================
--- in-commerce/units/affiliate_payments/affiliate_payments_config.php (revision 13954)
+++ in-commerce/units/affiliate_payments/affiliate_payments_config.php (working copy)
@@ -118,8 +118,8 @@
),
'VirtualFields' => Array(
- 'Username' => Array('type' => 'string'),
- 'PortalUserId' => Array('type' => 'int'),
+ 'Username' => Array('type' => 'string', 'default' => ''),
+ 'PortalUserId' => Array('type' => 'int', 'default' => 0),
),
'Grids' => Array(
Index: in-commerce/units/affiliate_plans_items/affiliate_plans_items_config.php
===================================================================
--- in-commerce/units/affiliate_plans_items/affiliate_plans_items_config.php (revision 13954)
+++ in-commerce/units/affiliate_plans_items/affiliate_plans_items_config.php (working copy)
@@ -85,12 +85,19 @@
),
'VirtualFields' => Array(
- 'ProductId' => Array(),
- 'ItemName' => Array(),
- 'SKU' => Array(),
- 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f'),
- 'CreatedOn' => Array('formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'BackOrderDate' => Array('formatter' => 'kDateFormatter', 'default' => NULL),
+ 'ProductId' => Array('type' => 'int', 'default' => 0),
+ 'ItemName' => Array('type' => 'string', 'default' => ''),
+ 'SKU' => Array('type' => 'string', 'default' => ''),
+ 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0),
+ 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'BackOrderDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'default' => 2,
+ ),
+ 'CategoryId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array(
Index: in-commerce/units/affiliates/affiliates_config.php
===================================================================
--- in-commerce/units/affiliates/affiliates_config.php (revision 13954)
+++ in-commerce/units/affiliates/affiliates_config.php (working copy)
@@ -182,6 +182,7 @@
'VirtualFields' => Array(
'UserName' => Array('type'=>'string', 'default' => ''),
'PlanName' => Array('type'=>'string', 'default' => ''),
+ 'UserId' => Array('type'=>'int', 'default' => 0),
),
'Grids' => Array(
Index: in-commerce/units/coupon_items/coupon_items_config.php
===================================================================
--- in-commerce/units/coupon_items/coupon_items_config.php (revision 13954)
+++ in-commerce/units/coupon_items/coupon_items_config.php (working copy)
@@ -82,18 +82,25 @@
'Fields' => Array (
'CouponItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'CouponId' => Array('type' => 'int', 'default' => 0, ),
- 'ItemResourceId' => Array('type' => 'int', 'default' => 0, ),
+ 'CouponId' => Array('type' => 'int', 'default' => null, ),
+ 'ItemResourceId' => Array('type' => 'int', 'default' => null, ),
'ItemType' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder' ), 'default' => 1, ),
),
'VirtualFields' => Array(
- 'ProductId' => Array(),
- 'ItemName' => Array(),
- 'SKU' => Array(),
- 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f'),
- 'CreatedOn' => Array('formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'BackOrderDate' => Array('formatter' => 'kDateFormatter', 'default' => NULL),
+ 'ProductId' => Array('type' => 'int', 'default' => 0),
+ 'ItemName' => Array('type' => 'string', 'default' => ''),
+ 'SKU' => Array('type' => 'string', 'default' => ''),
+ 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0),
+ 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'BackOrderDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'default' => 2,
+ ),
+ 'CategoryId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array(
Index: in-commerce/units/discount_items/discount_items_config.php
===================================================================
--- in-commerce/units/discount_items/discount_items_config.php (revision 13954)
+++ in-commerce/units/discount_items/discount_items_config.php (working copy)
@@ -82,18 +82,25 @@
'Fields' => Array (
'DiscountItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'DiscountId' => Array('type' => 'int', 'default' => 0, ),
- 'ItemResourceId' => Array('type' => 'int', 'default' => 0, ),
+ 'DiscountId' => Array('type' => 'int', 'default' => null, ),
+ 'ItemResourceId' => Array('type' => 'int', 'default' => null, ),
'ItemType' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder' ), 'default' => 1, ),
),
'VirtualFields' => Array(
- 'ProductId' => Array(),
- 'ItemName' => Array(),
- 'SKU' => Array(),
- 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f'),
- 'CreatedOn' => Array('formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'BackOrderDate' => Array('formatter' => 'kDateFormatter', 'default' => NULL),
+ 'ProductId' => Array('type' => 'int', 'default' => 0),
+ 'ItemName' => Array('type' => 'string', 'default' => ''),
+ 'SKU' => Array('type' => 'string', 'default' => ''),
+ 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0),
+ 'CreatedOn' => Array('type' => 'int','formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'BackOrderDate' => Array('type' => 'int','formatter' => 'kDateFormatter', 'default' => NULL),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'default' => 2,
+ ),
+ 'CategoryId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array(
Index: in-commerce/units/files/files_config.php
===================================================================
--- in-commerce/units/files/files_config.php (revision 13954)
+++ in-commerce/units/files/files_config.php (working copy)
@@ -110,7 +110,7 @@
),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'AddedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'AddedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'AddedById' => Array ('type' => 'int', 'default' => NULL),
'MIMEType' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
),
Index: in-commerce/units/gateways/gateways_config.php
===================================================================
--- in-commerce/units/gateways/gateways_config.php (revision 13954)
+++ in-commerce/units/gateways/gateways_config.php (working copy)
@@ -58,15 +58,15 @@
'Fields' => Array (
'GWConfigFieldId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'SystemFieldName' => Array('type' => 'string', 'not_null' => 1, 'default' => 0, ),
- 'FieldName' => Array('type' => 'string', 'required' => true, 'max_len' => 100, 'not_null' => 1, 'default' => 0, ),
- 'ElementType' => Array('type' => 'string', 'not_null' => 1, 'default' => 0, ),
+ 'SystemFieldName' => Array('type' => 'string', 'not_null' => 1, 'default' => '', ),
+ 'FieldName' => Array('type' => 'string', 'required' => true, 'max_len' => 100, 'not_null' => 1, 'default' => '', ),
+ 'ElementType' => Array('type' => 'string', 'not_null' => 1, 'default' => 'text', ),
'ValueList' => Array('type' => 'string', 'default' => NULL),
'GatewayId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
),
'VirtualFields' => Array (
- 'Value' => Array(),
+ 'Value' => Array('type' => 'string', 'default' => ''),
),
'Grids' => Array(
Index: in-commerce/units/order_items/order_items_config.php
===================================================================
--- in-commerce/units/order_items/order_items_config.php (revision 13954)
+++ in-commerce/units/order_items/order_items_config.php (working copy)
@@ -123,10 +123,10 @@
'QuantityAvailable' => Array('type'=>'int','default'=>0),
'DiscountType' => Array('type'=>'string','default'=>''),
'DiscountId' => Array('type'=>'int','default'=>0),
- 'Name' => Array('formatter' => 'kMultiLanguage'),
+ 'Name' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => ''),
'ItemDiscount' => Array('type'=>'double','formatter'=>'kFormatter','format'=>'%01.2f','default'=>'0.00'),
'SKU' => Array('type' => 'string', 'default' => ''),
- 'MinQtyFreeShipping'=> Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'MinQtyFreeShipping'=> Array('type' => 'int', 'default' => 0,),
),
'Grids' => Array (
Index: in-commerce/units/orders/orders_config.php
===================================================================
--- in-commerce/units/orders/orders_config.php (revision 13954)
+++ in-commerce/units/orders/orders_config.php (working copy)
@@ -226,7 +226,7 @@
),
),
- 'TableName' => TABLE_PREFIX . 'Orders',
+ 'TableName' => TABLE_PREFIX . 'Orders',
'CalculatedFields' => Array (
'' => Array (
@@ -399,7 +399,7 @@
'ReturnTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
'CostTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
'OriginalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
- 'ShippingOption' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (0 => 'la_ship_all_together', 1 => 'la_ship_backorder_separately', 2 => 'la_ship_backorders_upon_avail'), 'default' =>0),
+ 'ShippingOption' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (0 => 'la_ship_all_together', 1 => 'la_ship_backorder_separately', 2 => 'la_ship_backorders_upon_avail'), 'not_null' => 1, 'default' =>0),
'ShippingGroupOption' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (0 => 'la_auto_group_shipments', 1 => 'la_manual_group_shipments'), 'default' =>0),
'GiftCertificateId' => Array ('type' => 'int', 'default' => null),
'GiftCertificateDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00',),
@@ -436,11 +436,15 @@
'VirtualFields' => Array (
'CustomerName' => Array ('type' => 'string', 'default' => '', 'filter_type' => 'like'),
- 'TotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
- 'AmountWithoutVAT' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
- 'SubtotalWithDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
- 'SubtotalWithoutDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
+ 'TotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
+ 'AmountWithoutVAT' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
+ 'SubtotalWithDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
+ 'SubtotalWithoutDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
'OrderNumber' => Array ('type' => 'string', 'default' => '', 'filter_type' => 'like'),
+ 'CouponCode' => Array ('type' => 'string', 'default' => ''),
+ 'CouponName' => Array ('type' => 'string', 'default' => ''),
+ 'GiftCertificateCode' => Array ('type' => 'string', 'default' => ''),
+ 'GiftCertificateRecipient' => Array ('type' => 'string', 'default' => ''),
// for ResetToUser
'UserTo' => Array ('type' => 'string', 'default' => ''),
@@ -456,16 +460,11 @@
'UserCountry' => Array ('type' => 'string', 'default' => ''),
// for Search
- 'Username' => Array ('type' => 'string', 'filter_type' => 'like'),
- 'OrderSearchId' => Array ('type' => 'int', 'filter_type' => 'equals', 'filter_field' => 'OrderId'),
- 'FromDateTime' => Array ('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_from', 'filter_field' => 'OrderDate' ),
- 'ToDateTime' => Array ('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_to', 'filter_field' => 'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ),
- 'FromAmount' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'filter_type' => 'range_from', 'filter_field' => 'TotalAmount'),
- 'ToAmount' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'filter_type' => 'range_to', 'filter_field' => 'TotalAmount'),
- 'HasBackOrders' => Array ('default' =>false),
- 'PaymentCVV2' => Array ('type' => 'string', 'default' =>false),
- 'AffiliateUser' => Array ('type' => 'string', 'filter_type' => 'like'),
- 'AffiliatePortalUserId' => Array ('type' => 'int'),
+ 'Username' => Array ('type' => 'string', 'filter_type' => 'like', 'default' => ''),
+ 'HasBackOrders' => Array ('type' => 'int', 'default' => 0),
+ 'PaymentCVV2' => Array ('type' => 'string', 'default' => ''),
+ 'AffiliateUser' => Array ('type' => 'string', 'filter_type' => 'like', 'default' => ''),
+ 'AffiliatePortalUserId' => Array ('type' => 'int', 'default' => 0),
// export related fields: begin
'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
@@ -478,18 +477,18 @@
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ 'use_phrases' => 1, 'default' => 1,
),
- 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
- 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
- 'ExportPresets' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
+ 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
+ 'ExportPresets' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
'ExportSavePreset' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ 'use_phrases' => 1, 'default' => 0,
),
- 'ExportPresetName' => Array ('type' => 'string'),
+ 'ExportPresetName' => Array ('type' => 'string', 'default' => ''),
// export related fields: end
),
'Grids' => Array (
Index: in-commerce/units/payment_type/payment_type_config.php
===================================================================
--- in-commerce/units/payment_type/payment_type_config.php (revision 13954)
+++ in-commerce/units/payment_type/payment_type_config.php (working copy)
@@ -97,7 +97,7 @@
'Sorting' => Array ('Name' => 'asc'),
)
),
-
+
'Fields' => Array (
'PaymentTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' =>true, 'max_len' => 100),
@@ -106,15 +106,15 @@
'AdminComments' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'Status' => Array (
'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0,
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'IsPrimary' => Array (
'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
'BuiltIn' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_BuiltIn', 0 => 'la_UserDefined' ), 'default' => 0, 'not_null' => 1 ),
@@ -128,18 +128,18 @@
),
'PlacedOrdersEdit' => Array (
'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
'ProcessingFee' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => 1, 'default' => '0.00'),
'PortalGroups' => Array ('type' => 'string', 'default' => null),
),
- /*
+
'VirtualFields' => Array (
- 'Qty' => 1,
+ 'Gateway' => Array ('type' => 'string', 'default' => ''),
),
- */
+
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
Index: in-commerce/units/pricing/pricing_config.php
===================================================================
--- in-commerce/units/pricing/pricing_config.php (revision 13954)
+++ in-commerce/units/pricing/pricing_config.php (working copy)
@@ -81,8 +81,8 @@
'Fields' => Array (
'PriceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'MinQty' => Array ('type' => 'int', 'default' => 0),
- 'MaxQty' => Array ('type' => 'int', 'default' => 0),
+ 'MinQty' => Array ('type' => 'int', 'default' => null),
+ 'MaxQty' => Array ('type' => 'int', 'default' => null),
'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0),
'Price' => Array ('type' => 'float', 'not_null' => 1, 'formatter' => 'kFormatter', 'min_value_inc' => 0, 'format' => '%.2f', 'default' => 0),
'Negotiated' => Array (
@@ -91,7 +91,7 @@
'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
'default' => NULL,
),
- 'Points' => Array ('type' => 'int', 'default' => 0),
+ 'Points' => Array ('type' => 'int', 'default' => null),
'AccessDuration'=> Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
'AccessUnit' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year'), 'not_null' => 1, 'default' => 0,),
'Description' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
Index: in-commerce/units/product_option_combinations/product_option_combinations_config.php
===================================================================
--- in-commerce/units/product_option_combinations/product_option_combinations_config.php (revision 13954)
+++ in-commerce/units/product_option_combinations/product_option_combinations_config.php (working copy)
@@ -69,8 +69,8 @@
'Weight' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'default' => 0, ),
'Availability' => Array (
'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1,
),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ),
@@ -91,7 +91,8 @@
),
),
'VirtualFields' => Array (
- 'FinalPrice' => Array ('formatter' => 'kCombPriceFormatter', 'format' => '%.2f'),
+ 'FinalPrice' => Array ('type' => 'float', 'formatter' => 'kCombPriceFormatter', 'format' => '%.2f', 'default' => NULL),
+ 'BasePrice' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
),
'Grids' => Array (
'Default' => Array (
Index: in-commerce/units/products/products_config.php
===================================================================
--- in-commerce/units/products/products_config.php (revision 13954)
+++ in-commerce/units/products/products_config.php (working copy)
@@ -360,7 +360,7 @@
),
'TableName' => TABLE_PREFIX . 'Products',
-
+
'CalculatedFields' => Array (
'' => Array (
'AltName' => 'img.AltName',
@@ -492,9 +492,9 @@
'Expire' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' =>null),
'Type' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (1=> 'la_product_tangible', 2=> 'la_product_subscription', 4=> 'la_product_downloadable', 3=> 'la_product_service'/*, 6=> 'la_gift_certificate', 5=> 'la_product_package'*/), 'not_null' => 1, 'default' => 1 ),
'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'ModifiedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'CreatedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ResourceId' => Array ('type' => 'int', 'default' => 0),
+ 'ModifiedById' => Array ('type' => 'int', 'default' => NULL),
+ 'CreatedById' => Array ('type' => 'int', 'default' => NULL),
+ 'ResourceId' => Array ('type' => 'int', 'default' => null),
'CachedReviewsQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
'InventoryStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Disabled', 1 => 'la_by_product', 2 => 'la_by_options'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'QtyInStock' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
@@ -539,13 +539,15 @@
),
'VirtualFields' => Array (
- 'Qty' => 1,
+ 'Qty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'regexp' => '/^[\d]+$/', 'default' => 0),
'Price' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
- 'IsHot' => Array ('type' => 'int'),
- 'IsNew' => Array ('type' => 'int'),
- 'IsPop' => Array ('type' => 'int'),
- 'Manufacturer' => Array (),
+ 'CategoryFilename' => Array ('type' => 'string', 'default' => ''),
+ 'PrimaryCat' => Array ('type' => 'int', 'default' => 0),
+ 'IsHot' => Array ('type' => 'int', 'default' => 0),
+ 'IsNew' => Array ('type' => 'int', 'default' => 0),
+ 'IsPop' => Array ('type' => 'int', 'default' => 0),
+ 'Manufacturer' => Array ('type' => 'string', 'default' => ''),
// export related fields: begin
'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
@@ -559,24 +561,24 @@
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ 'use_phrases' => 1, 'default' => 1,
),
- 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
- 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
+ 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
'CategoryFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
'CategorySeparator' => Array ('type' => 'string', 'default' => ':'),
'IsBaseCategory' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ 'use_phrases' => 1, 'default' => 0,
),
// export related fields: end
// import related fields: begin
'FieldTitles' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
'ImportSource' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
- 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/'),
+ 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/', 'default' => ''),
'ImportLocalFilename' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
'CheckDuplicatesMethod' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
'ReplaceDuplicates' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
@@ -588,13 +590,13 @@
'FullImage' => Array ('type' => 'string', 'default' => ''),
'ImageAlt' => Array ('type' => 'string', 'default' => ''),
- 'Filename' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'default' => ''),
'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
'ParentPath' => Array ('type' => 'string', 'default' => ''),
- 'FileSize' => Array ('type' => 'int', 'formatter' => 'kFilesizeFormatter', 'not_null' => 1, 'default' => 0),
- 'FilePath' => Array (),
- 'FileVersion' => Array (),
+ 'FileSize' => Array ('type' => 'int', 'formatter' => 'kFilesizeFormatter', 'default' => 0),
+ 'FilePath' => Array ('type' => 'string', 'default' => ''),
+ 'FileVersion' => Array ('type' => 'string', 'default' => ''),
// for primary image
'AltName' => Array ('type' => 'string', 'default' => ''),
Index: in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php
===================================================================
--- in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php (revision 13954)
+++ in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php (working copy)
@@ -76,7 +76,7 @@
'Sorting' => Array ('Name' => 'asc'),
)
),
-
+
'Fields' => Array (
'EngineId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
@@ -97,82 +97,96 @@
),
'VirtualFields' => Array (
- 'AccountLogin' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'AccountPassword' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'AccountLogin' => Array ('type' => 'string', 'default' => ''),
+ 'AccountPassword' => Array ('type' => 'string', 'default' => ''),
'UPSEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
- 'UPSAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'UPSAccount' => Array ('type' => 'string', 'default' => ''),
'UPSInvoiced' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ 'default' => 0
),
'FDXEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
- 'FDXAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'FDXAccount' => Array ('type' => 'string', 'default' => ''),
'FDXInvoiced' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ 'default' => 0
),
'DHLEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
- 'DHLAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'DHLAccount' => Array ('type' => 'string', 'default' => ''),
'DHLInvoiced' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ 'default' => 0
),
'USPEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
- 'USPAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'USPAccount' => Array ('type' => 'string', 'default' => ''),
'USPInvoiced' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ 'default' => 0
),
'ARBEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
- 'ARBAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ARBAccount' => Array ('type' => 'string', 'default' => ''),
'ARBInvoiced' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ 'default' => 0
),
'1DYEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
'2DYEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
'3DYEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
'GNDEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ 'default' => 0
),
'ShipMethod' => Array (
'type' => 'string',
@@ -181,6 +195,7 @@
'DRP' => 'Drop-Off At Carrier Location',
'PCK' => 'Schedule A Special Pickup',
'SCD' => 'Regularly Scheduled Pickup'),
+ 'default' => null
),
),
'Grids' => Array (
Index: in-link/install/install_schema.sql
===================================================================
--- in-link/install/install_schema.sql (revision 13954)
+++ in-link/install/install_schema.sql (working copy)
@@ -1,45 +1,45 @@
CREATE TABLE Link (
- LinkId int(11) NOT NULL auto_increment,
- Name varchar(255) NOT NULL default '',
- l1_Name varchar(255) NOT NULL default '',
- l2_Name varchar(255) NOT NULL default '',
- l3_Name varchar(255) NOT NULL default '',
- l4_Name varchar(255) NOT NULL default '',
- l5_Name varchar(255) NOT NULL default '',
- AutomaticFilename tinyint(3) unsigned NOT NULL default '1',
+ LinkId int(11) NOT NULL AUTO_INCREMENT,
+ `Name` varchar(255) NOT NULL DEFAULT '',
+ l1_Name varchar(255) NOT NULL DEFAULT '',
+ l2_Name varchar(255) NOT NULL DEFAULT '',
+ l3_Name varchar(255) NOT NULL DEFAULT '',
+ l4_Name varchar(255) NOT NULL DEFAULT '',
+ l5_Name varchar(255) NOT NULL DEFAULT '',
+ AutomaticFilename tinyint(3) unsigned NOT NULL DEFAULT '1',
Description text,
l1_Description text,
l2_Description text,
l3_Description text,
l4_Description text,
l5_Description text,
- MetaKeywords varchar(255) default NULL,
+ MetaKeywords varchar(255) DEFAULT NULL,
MetaDescription text,
- Url varchar(255) NOT NULL default '',
- CreatedOn int(10) unsigned default NULL,
- Modified int(10) unsigned default NULL,
- Expire int(10) unsigned default NULL,
- Hits double(20,6) NOT NULL default '0.000000',
- CachedRating varchar(10) NOT NULL default '0',
- CachedVotesQty int(11) NOT NULL default '0',
- CachedReviewsQty int(11) NOT NULL default '0',
- CreatedById int(11) NOT NULL default '-1',
- ModifiedById int(11) NOT NULL default '-1',
- Priority int(11) NOT NULL default '0',
- `Status` tinyint(4) NOT NULL default '2',
- EditorsPick tinyint(4) NOT NULL default '0',
- ResourceId int(11) default NULL,
- HotItem tinyint(4) NOT NULL default '2',
- PopItem tinyint(4) NOT NULL default '2',
- NewItem tinyint(4) NOT NULL default '2',
- OrgId int(11) default NULL,
- CustomTemplate varchar(255) NOT NULL default '',
- ReciprocalLinkFound tinyint(3) unsigned NOT NULL default '0',
- PRIMARY KEY (LinkId),
+ Url varchar(255) NOT NULL DEFAULT '',
+ CreatedOn int(10) unsigned DEFAULT NULL,
+ Modified int(10) unsigned DEFAULT NULL,
+ Expire int(10) unsigned DEFAULT NULL,
+ Hits double(20,6) NOT NULL DEFAULT '0.000000',
+ CachedRating varchar(10) NOT NULL DEFAULT '0',
+ CachedVotesQty int(11) NOT NULL DEFAULT '0',
+ CachedReviewsQty int(11) NOT NULL DEFAULT '0',
+ CreatedById int(11) DEFAULT NULL,
+ ModifiedById int(11) DEFAULT NULL,
+ Priority int(11) NOT NULL DEFAULT '0',
+ `Status` tinyint(4) NOT NULL DEFAULT '2',
+ EditorsPick tinyint(4) NOT NULL DEFAULT '0',
+ ResourceId int(11) DEFAULT NULL,
+ HotItem tinyint(4) NOT NULL DEFAULT '2',
+ PopItem tinyint(4) NOT NULL DEFAULT '2',
+ NewItem tinyint(4) NOT NULL DEFAULT '2',
+ OrgId int(11) DEFAULT NULL,
+ CustomTemplate varchar(255) NOT NULL DEFAULT '',
+ ReciprocalLinkFound tinyint(3) unsigned NOT NULL DEFAULT '0',
+ PRIMARY KEY (LinkId),
UNIQUE KEY ResourceId (ResourceId),
- KEY sorting (Priority,Name),
+ KEY sorting (Priority,`Name`),
KEY Hits (Hits),
- KEY Name (Name),
+ KEY `Name` (`Name`),
KEY l1_Name (l1_Name),
KEY l2_Name (l2_Name),
KEY l3_Name (l3_Name),
Index: in-link/install/upgrades.sql
===================================================================
--- in-link/install/upgrades.sql (revision 13954)
+++ in-link/install/upgrades.sql (working copy)
@@ -101,4 +101,9 @@
# ===== v 5.1.0-RC1 =====
-# ===== v 5.1.0 =====
\ No newline at end of file
+# ===== v 5.1.0 =====
+
+# ===== v 5.1.1-B1 =====
+ALTER TABLE Link
+ CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL ,
+ CHANGE ModifiedById ModifiedById INT(11) NULL DEFAULT NULL;
\ No newline at end of file
Index: in-link/units/link_validation/link_validation_config.php
===================================================================
--- in-link/units/link_validation/link_validation_config.php (revision 13954)
+++ in-link/units/link_validation/link_validation_config.php (working copy)
@@ -117,15 +117,15 @@
),
'VirtualFields' => Array (
- 'ForeignLinkId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'LinkName' => Array('type' => 'string', /*'formatter' => 'kMultiLanguage',*/ 'not_null' => 1, 'max_len' => 255, 'default' => ''),
- 'LinkUrl' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ForeignLinkId' => Array ('type' => 'int', 'default' => 0),
+ 'LinkName' => Array('type' => 'string', /*'formatter' => 'kMultiLanguage',*/ 'max_len' => 255, 'default' => ''),
+ 'LinkUrl' => Array ('type' => 'string', 'default' => ''),
'LinkCreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'LinkStatus' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
+ 'LinkStatus' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'default' => 2),
'LinkValidationStatus' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Text_Not_Validated', 1 => 'la_Text_Valid', 2 => 'la_Text_Invalid'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
+ 'default' => 0
),
// for category path drawing
Index: in-link/units/links/links_config.php
===================================================================
--- in-link/units/links/links_config.php (revision 13954)
+++ in-link/units/links/links_config.php (working copy)
@@ -377,7 +377,7 @@
),
'FilterMenu' => Array (
- 'Groups' => Array (
+ 'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => HAVING_FILTER),
@@ -463,8 +463,8 @@
'CachedRating' => Array ('type' => 'string', 'not_null' => 1, 'formatter' => 'kFormatter', 'default' => 0),
'CachedVotesQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'not_null' => 1, 'default' => 0),
'CachedReviewsQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => USER_ROOT),
- 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => USER_ROOT),
+ 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
+ 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Status' => Array (
'type' => 'int',
@@ -513,24 +513,24 @@
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ 'use_phrases' => 1, 'default' => 1,
),
- 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
- 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
+ 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
'CategoryFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
'CategorySeparator' => Array ('type' => 'string', 'error_field' => 'CategoryFormat', 'default' => ':'),
'IsBaseCategory' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ 'use_phrases' => 1, 'default' => 0,
),
// export related fields: end
// import related fields: begin
'FieldTitles' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
'ImportSource' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
- 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/'),
+ 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/', 'default' => ''),
'ImportLocalFilename' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
'CheckDuplicatesMethod' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
'ReplaceDuplicates' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
@@ -542,7 +542,9 @@
'FullImage' => Array ('type' => 'string', 'default' => ''),
'ImageAlt' => Array ('type' => 'string', 'default' => ''),
- 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'default' => ''),
+ 'CategoryFilename' => Array ('type' => 'string', 'default' => ''),
+ 'PrimaryCat' => Array ('type' => 'int', 'default' => 0),
'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
'ParentPath' => Array ('type' => 'string', 'default' => ''),
Index: in-link/units/listings/listings_config.php
===================================================================
--- in-link/units/listings/listings_config.php (revision 13954)
+++ in-link/units/listings/listings_config.php (working copy)
@@ -143,8 +143,8 @@
),
'VirtualFields' => Array (
- 'LinkName' => Array ('type' => 'string'),
- 'LinkOwner' => Array ('type' => 'string'),
+ 'LinkName' => Array ('type' => 'string', 'default' => ''),
+ 'LinkOwner' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
Index: in-news/install/install_schema.sql
===================================================================
--- in-news/install/install_schema.sql (revision 13954)
+++ in-news/install/install_schema.sql (working copy)
@@ -28,7 +28,7 @@
Hits double(20,6) NOT NULL DEFAULT '0.000000',
CachedRating varchar(10) DEFAULT '0',
CachedVotesQty int(11) NOT NULL DEFAULT '0',
- CreatedById int(11) NOT NULL DEFAULT '-1',
+ CreatedById int(11) DEFAULT NULL,
Priority int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '2',
EditorsPick tinyint(4) NOT NULL DEFAULT '0',
@@ -42,7 +42,7 @@
HotItem tinyint(4) NOT NULL DEFAULT '2',
Archived int(11) NOT NULL DEFAULT '0',
Modified int(11) DEFAULT NULL,
- ModifiedById int(11) NOT NULL DEFAULT '-1',
+ ModifiedById int(11) DEFAULT NULL,
OrgId int(11) DEFAULT NULL,
PRIMARY KEY (NewsId),
UNIQUE KEY ResourceId (ResourceId),
Index: in-news/install/upgrades.sql
===================================================================
--- in-news/install/upgrades.sql (revision 13954)
+++ in-news/install/upgrades.sql (working copy)
@@ -90,4 +90,9 @@
# ===== v 5.1.0-RC1 =====
-# ===== v 5.1.0 =====
\ No newline at end of file
+# ===== v 5.1.0 =====
+
+# ===== v 5.1.1-B1 =====
+ALTER TABLE News
+ CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL ,
+ CHANGE ModifiedById ModifiedById INT(11) NULL DEFAULT NULL;
\ No newline at end of file
Index: in-news/units/articles/articles_config.php
===================================================================
--- in-news/units/articles/articles_config.php (revision 13954)
+++ in-news/units/articles/articles_config.php (working copy)
@@ -285,7 +285,7 @@
),
'FilterMenu' => Array (
- 'Groups' => Array (
+ 'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => HAVING_FILTER),
@@ -395,7 +395,7 @@
'Hits' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
'CachedRating' => Array ('type' => 'string', 'default' => 0),
'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'required' => 1, 'default' => USER_ROOT),
+ 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'required' => 1, 'default' => NULL),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Status' => Array (
'type' => 'int',
@@ -429,7 +429,7 @@
'HotItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'Archived' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 2 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => USER_ROOT),
+ 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
'OrgId' => Array ('type' => 'int', 'default' => null),
'MetaKeywords' => Array ('type' => 'string', 'default' => null),
'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
@@ -443,7 +443,9 @@
'cust_RssOriginalURL' => Array ('type' => 'string', 'default' => ''),
'cust_RssArticleCRC' => Array ('type' => 'int', 'default' => 0),
- 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'default' => ''),
+ 'CategoryFilename' => Array ('type' => 'string', 'default' => ''),
+ 'PrimaryCat' => Array ('type' => 'int', 'default' => 0),
'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
'ParentPath' => Array ('type' => 'string', 'default' => ''),
@@ -469,24 +471,24 @@
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ 'use_phrases' => 1, 'default' => 1,
),
- 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
- 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
+ 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
'CategoryFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
'CategorySeparator' => Array ('type' => 'string', 'default' => ':'),
'IsBaseCategory' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ 'use_phrases' => 1, 'default' => 0,
),
// export related fields: end
// import related fields: begin
'FieldTitles' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
'ImportSource' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
- 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/'),
+ 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/', 'default' => ''),
'ImportLocalFilename' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
'CheckDuplicatesMethod' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
'ReplaceDuplicates' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
Index: in-news/units/articles/articles_event_handler.php
===================================================================
--- in-news/units/articles/articles_event_handler.php (revision 13954)
+++ in-news/units/articles/articles_event_handler.php (working copy)
@@ -477,12 +477,12 @@
{
$new_virtual_fields = Array(
'cust_RssSource' => Array('type' => 'string', 'default' => ''),
- 'cust_RssDefaultExpiration' => Array('type' => 'int', 'not_null' => 1, 'default' => ''),
+ 'cust_RssDefaultExpiration' => Array('type' => 'int', 'default' => ''),
'cust_RssDefaultExpirationType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month', 29030400 => 'la_opt_year'), 'default' => 60),
- 'cust_RssExpireInterval' => Array('type' => 'int', 'not_null' => 1, 'default' => ''),
+ 'cust_RssExpireInterval' => Array('type' => 'int', 'default' => ''),
'cust_RssExpireIntervalType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month'), 'default' => 60),
'cust_RssDeleteExpired' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'default' => 0),
- 'cust_RssUpdateInterval' => Array('type' => 'int', 'not_null' => 1, 'default' => ''),
+ 'cust_RssUpdateInterval' => Array('type' => 'int', 'default' => ''),
'cust_RssUpdateIntervalType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month'), 'default' => 60),
'cust_RssLastUpdated' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''),
'cust_RssLastExpired' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''),
|