Index: branches/5.1.x/install/install_schema.sql =================================================================== diff -u -N -r13096 -r13961 --- branches/5.1.x/install/install_schema.sql (.../install_schema.sql) (revision 13096) +++ branches/5.1.x/install/install_schema.sql (.../install_schema.sql) (revision 13961) @@ -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: branches/5.1.x/install/upgrades.sql =================================================================== diff -u -N -r13822 -r13961 --- branches/5.1.x/install/upgrades.sql (.../upgrades.sql) (revision 13822) +++ branches/5.1.x/install/upgrades.sql (.../upgrades.sql) (revision 13961) @@ -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: branches/5.1.x/units/articles/articles_config.php =================================================================== diff -u -N -r13940 -r13961 --- branches/5.1.x/units/articles/articles_config.php (.../articles_config.php) (revision 13940) +++ branches/5.1.x/units/articles/articles_config.php (.../articles_config.php) (revision 13961) @@ -1,6 +1,6 @@ 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: branches/5.1.x/units/articles/articles_event_handler.php =================================================================== diff -u -N -r13580 -r13961 --- branches/5.1.x/units/articles/articles_event_handler.php (.../articles_event_handler.php) (revision 13580) +++ branches/5.1.x/units/articles/articles_event_handler.php (.../articles_event_handler.php) (revision 13961) @@ -1,6 +1,6 @@ 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' => ''),