Index: branches/5.2.x/admin_templates/articles/relations_edit.tpl =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/admin_templates/articles/relations_edit.tpl (.../relations_edit.tpl) (revision 13843) +++ branches/5.2.x/admin_templates/articles/relations_edit.tpl (.../relations_edit.tpl) (revision 14091) @@ -31,17 +31,17 @@
- + - - - - - + + + + +
Index: branches/5.2.x/admin_templates/articles/articles_edit.tpl =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/admin_templates/articles/articles_edit.tpl (.../articles_edit.tpl) (revision 13843) +++ branches/5.2.x/admin_templates/articles/articles_edit.tpl (.../articles_edit.tpl) (revision 14091) @@ -61,67 +61,53 @@ - - - + + + - + - - - - - - - - - - - + + + - - - - - - + + + - + - - - - - - - - - - + + + + + + + + + + - - + + - - - + + + " /> Index: branches/5.2.x/admin_templates/articles/file_edit.tpl =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/admin_templates/articles/file_edit.tpl (.../file_edit.tpl) (revision 13843) +++ branches/5.2.x/admin_templates/articles/file_edit.tpl (.../file_edit.tpl) (revision 14091) @@ -29,7 +29,7 @@
-
- - -
+
+ +
- -
+ +
- + Index: branches/5.2.x/admin_templates/articles/articles_relations.tpl =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/admin_templates/articles/articles_relations.tpl (.../articles_relations.tpl) (revision 13843) +++ branches/5.2.x/admin_templates/articles/articles_relations.tpl (.../articles_relations.tpl) (revision 14091) @@ -92,7 +92,7 @@
- + Index: branches/5.2.x/admin_templates/articles/articles_files.tpl =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/admin_templates/articles/articles_files.tpl (.../articles_files.tpl) (revision 13843) +++ branches/5.2.x/admin_templates/articles/articles_files.tpl (.../articles_files.tpl) (revision 14091) @@ -78,7 +78,7 @@ - + Index: branches/5.2.x/admin_templates/articles/review_edit.tpl =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/admin_templates/articles/review_edit.tpl (.../review_edit.tpl) (revision 13843) +++ branches/5.2.x/admin_templates/articles/review_edit.tpl (.../review_edit.tpl) (revision 14091) @@ -42,16 +42,16 @@
- + - - - - - - - + + + + + + +
Index: branches/5.2.x/admin_templates/articles/articles_reviews.tpl =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/admin_templates/articles/articles_reviews.tpl (.../articles_reviews.tpl) (revision 13843) +++ branches/5.2.x/admin_templates/articles/articles_reviews.tpl (.../articles_reviews.tpl) (revision 14091) @@ -106,7 +106,7 @@ - + Index: branches/5.2.x/admin_templates/articles/images_edit.tpl =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/admin_templates/articles/images_edit.tpl (.../images_edit.tpl) (revision 13843) +++ branches/5.2.x/admin_templates/articles/images_edit.tpl (.../images_edit.tpl) (revision 14091) @@ -31,22 +31,22 @@
- + - + - - + + - - - + + + - + - - + +
Index: branches/5.2.x/install/upgrades.sql =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/install/upgrades.sql (.../upgrades.sql) (revision 13843) +++ branches/5.2.x/install/upgrades.sql (.../upgrades.sql) (revision 14091) @@ -90,4 +90,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 News + CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL , + CHANGE ModifiedById ModifiedById INT(11) NULL DEFAULT NULL; + +# ===== v 5.1.1-RC1 ===== + +# ===== v 5.1.1 ===== \ No newline at end of file Index: branches/5.2.x/admin_templates/import.tpl =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/admin_templates/import.tpl (.../import.tpl) (revision 13843) +++ branches/5.2.x/admin_templates/import.tpl (.../import.tpl) (revision 14091) @@ -90,10 +90,8 @@
- - - - + + - - + - - + - - + @@ -178,22 +173,19 @@ - - + - - + - - + - - +
@@ -124,17 +122,15 @@
@@ -166,8 +162,7 @@
', 'ImportCategory', null, 'OnSaveSettings');">
@@ -218,8 +210,7 @@
Index: branches/5.2.x/admin_templates/category_properties.tpl =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/admin_templates/category_properties.tpl (.../category_properties.tpl) (revision 13843) +++ branches/5.2.x/admin_templates/category_properties.tpl (.../category_properties.tpl) (revision 14091) @@ -1,32 +1,28 @@ - - - - - " id="" value="" tabindex="" size="" maxlength="" class="" onblur=""> + + + " id="" value="" tabindex="" size="" maxlength="" class="" onblur=""> - - - - - + + + - + - - - + + + - - - - + + + + Index: branches/5.2.x/admin_templates/articles/articles_images.tpl =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/admin_templates/articles/articles_images.tpl (.../articles_images.tpl) (revision 13843) +++ branches/5.2.x/admin_templates/articles/articles_images.tpl (.../articles_images.tpl) (revision 14091) @@ -99,7 +99,7 @@ - + Index: branches/5.2.x/admin_templates/articles/articles_categories.tpl =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/admin_templates/articles/articles_categories.tpl (.../articles_categories.tpl) (revision 13843) +++ branches/5.2.x/admin_templates/articles/articles_categories.tpl (.../articles_categories.tpl) (revision 14091) @@ -73,7 +73,7 @@ - + Index: branches/5.2.x/install/upgrades.php =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/install/upgrades.php (.../upgrades.php) (revision 13843) +++ branches/5.2.x/install/upgrades.php (.../upgrades.php) (revision 14091) @@ -1,6 +1,6 @@ Array ('Core' => '5.1.0-B1'), '5.1.0-RC1' => Array ('Core' => '5.1.0-RC1'), '5.1.0' => Array ('Core' => '5.1.0'), + '5.1.1-B1' => Array ('Core' => '5.1.1-B1'), + '5.1.1-RC1' => Array ('Core' => '5.1.1-RC1'), + '5.1.1' => Array ('Core' => '5.1.1'), ); } Index: branches/5.2.x/install/install_schema.sql =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/install/install_schema.sql (.../install_schema.sql) (revision 13843) +++ branches/5.2.x/install/install_schema.sql (.../install_schema.sql) (revision 14091) @@ -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.2.x/admin_templates/export_finish.tpl =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/admin_templates/export_finish.tpl (.../export_finish.tpl) (revision 13843) +++ branches/5.2.x/admin_templates/export_finish.tpl (.../export_finish.tpl) (revision 14091) @@ -23,7 +23,7 @@
- + Index: branches/5.2.x/admin_templates/export.tpl =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/admin_templates/export.tpl (.../export.tpl) (revision 13843) +++ branches/5.2.x/admin_templates/export.tpl (.../export.tpl) (revision 14091) @@ -34,7 +34,7 @@
- + @@ -44,8 +44,7 @@ - - + - - + - - + - - + Index: branches/5.2.x/units/articles/articles_config.php =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/units/articles/articles_config.php (.../articles_config.php) (revision 13843) +++ branches/5.2.x/units/articles/articles_config.php (.../articles_config.php) (revision 14091) @@ -1,6 +1,6 @@ Array ( - 'Groups' => Array ( - Array ('mode' => 'AND', 'filters' => Array ('show_active', 'show_pending', 'show_disabled'), 'type' => WHERE_FILTER), - 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), - Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => WHERE_FILTER), - ), - 'Filters' => Array ( - 'show_active' => Array ('label' => 'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ), - 'show_pending' => Array ('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ), - 'show_disabled' => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ), - 's1' => Array (), - 'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ), - 'show_hot' => Array ('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ), - 'show_pop' => Array ('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ), - 'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ), - ) - ), + '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), + Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => WHERE_FILTER), + ), + 'Filters' => Array ( + 'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ), + 'show_hot' => Array ('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ), + 'show_pop' => Array ('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ), + 'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ), + ), + ), 'CatalogSelectorName' => 'newslist', @@ -400,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', @@ -434,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), @@ -448,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' => ''), @@ -474,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.2.x/units/articles/articles_event_handler.php =================================================================== diff -u -r13843 -r14091 --- branches/5.2.x/units/articles/articles_event_handler.php (.../articles_event_handler.php) (revision 13843) +++ branches/5.2.x/units/articles/articles_event_handler.php (.../articles_event_handler.php) (revision 14091) @@ -1,6 +1,6 @@ Attributes) ? $node->Attributes['TYPE'] : false; + if ( !isset($content_type) ) { + $content_type = $node->GetAttribute('TYPE'); } switch ($content_type) { @@ -325,11 +325,11 @@ break; case 'html': - $data = unhtmlentities($node->firstChild->Data); // $node->Data + $data = unhtmlentities( $node->GetXML(true) ); // $node->firstChild->Data // $node->Data break; default: - $data = $node->firstChild->Data; // $node->Data; also for 'text' + $data = $node->GetXML(true); // $node->firstChild->Data; // $node->Data; also for 'text' break; } @@ -361,15 +361,15 @@ do { if ($sub_node->Name == 'LINK') { - if ($sub_node->Attributes['REL'] == 'alternate') { - $data[$sub_node->Name] = $sub_node->Attributes['HREF']; + if ($sub_node->GetAttribute('REL') === false || $sub_node->GetAttribute('REL') == 'alternate') { + $data[$sub_node->Name] = $sub_node->GetAttribute('HREF'); } } elseif ($sub_node->Name == 'CONTENT' || $sub_node->Name == 'SUMMARY' || $sub_node->Name == 'TITLE') { $data[$sub_node->Name] = $this->getNodeContent($sub_node); } else { - $data[$sub_node->Name] = $sub_node->firstChild->Data; // $sub_node->Data + $data[$sub_node->Name] = $sub_node->GetXML(true); // firstChild->Data; // $sub_node->Data } } while ( ($sub_node =& $sub_node->NextSibling()) ); @@ -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' => ''),
@@ -77,11 +76,9 @@
@@ -112,8 +109,7 @@