Index: branches/5.0.x/units/articles/articles_event_handler.php =================================================================== diff -u -N -r12920 -r13288 --- branches/5.0.x/units/articles/articles_event_handler.php (.../articles_event_handler.php) (revision 12920) +++ branches/5.0.x/units/articles/articles_event_handler.php (.../articles_event_handler.php) (revision 13288) @@ -1,6 +1,6 @@ MasterEvent->Prefix == 'rev') { + $clones = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Clones'); + $subitem_prefix = $event->Prefix . '-' . $event->MasterEvent->Prefix; + + $clones[$subitem_prefix]['ConfigMapping'] = Array ( + 'PerPage' => 'Perpage_NewsReviews', + 'ShortListPerPage' => 'Perpage_NewsReviews_Short', + 'DefaultSorting1Field' => 'News_SortReviews', + 'DefaultSorting2Field' => 'News_SortReviews2', + 'DefaultSorting1Dir' => 'News_SortReviewsOrder', + 'DefaultSorting2Dir' => 'News_SortReviewsOrder2', + + 'ReviewDelayInterval' => 'News_ReviewDelay_Interval', + 'ReviewDelayValue' => 'News_ReviewDelay_Value', + ); + + $this->Application->setUnitOption($event->MasterEvent->Prefix, 'Clones', $clones); + } + } } \ No newline at end of file Index: branches/5.0.x/units/articles/articles_config.php =================================================================== diff -u -N -r13265 -r13288 --- branches/5.0.x/units/articles/articles_config.php (.../articles_config.php) (revision 13265) +++ branches/5.0.x/units/articles/articles_config.php (.../articles_config.php) (revision 13288) @@ -1,6 +1,6 @@ '', 'HookToSpecial' => '*', 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => '#file', + 'DoPrefix' => 'cdata', 'DoSpecial' => '*', - 'DoEvent' => 'OnDefineFiles', + 'DoEvent' => 'OnDefineCustomFields', ), Array ( 'Mode' => hBEFORE, 'Conditional' => false, - 'HookToPrefix' => '', + 'HookToPrefix' => '#file', 'HookToSpecial' => '*', 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => 'cdata', + 'DoPrefix' => '', 'DoSpecial' => '*', - 'DoEvent' => 'OnDefineCustomFields', + 'DoEvent' => 'OnCloneSubItem', ), + + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'rev', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), + + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'fav', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), + + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'rel', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), + + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'img', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), + + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'ci', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), ), 'CatalogItem' => true, @@ -339,8 +394,8 @@ 'NewsId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), 'Title' => Array ('type' => 'string', /*'formatter' => 'kMultiLanguage', */'not_null' => 1, 'required' => 1, 'default' => '', 'max_len' => 255), 'AutomaticFilename' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, ), @@ -423,8 +478,8 @@ 'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1), 'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2), 'IncludeFieldTitles' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, ), @@ -433,8 +488,8 @@ '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', + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0, ),