Index: trunk/core/units/reviews/reviews_config.php =================================================================== diff -u -N -r5206 -r5219 --- trunk/core/units/reviews/reviews_config.php (.../reviews_config.php) (revision 5206) +++ trunk/core/units/reviews/reviews_config.php (.../reviews_config.php) (revision 5219) @@ -1,43 +1,48 @@ 'rev', - + 'Clones' => Array( - - 'l-rev' => Array('ParentPrefix' => 'l'), - 'n-rev' => Array('ParentPrefix' => 'n'), - 'bb-rev'=> Array('ParentPrefix' => 'bb'), + 'l-rev' => Array( + 'ParentPrefix' => 'l', + ), + 'n-rev' => Array( + 'ParentPrefix' => 'n', + ), + 'bb-rev'=> Array( + 'ParentPrefix' => 'bb', + ), /*'p-rev' => Array('ParentPrefix' => 'p'),*/ ), - + 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), 'EventHandlerClass' => Array('class'=>'ReviewsEventHandler','file'=>'reviews_event_handler.php','build_event'=>'OnBuild'), 'TagProcessorClass' => Array('class'=>'ReviewsTagProcessor','file'=>'reviews_tag_processor.php','build_event'=>'OnBuild'), 'AutoLoad' => true, - + 'QueryString' => Array( 1 => 'id', 2 => 'page', 3 => 'event', ), - - + + 'ParentPrefix' => 'p', // replace all usage of rev to "p-rev" and then remove this param from here and Prefix too - + 'IDField' => 'ReviewId', 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events 'TableName' => TABLE_PREFIX.'ItemReview', 'ParentTableKey' => 'ResourceId', // linked field in master table 'ForeignKey' => 'ItemId', // linked field in subtable - + 'AutoDelete' => true, 'AutoClone' => true, - + 'TitlePresets' => Array( 'reviews_edit' => Array('format' => "!la_title_Editing_Review!"), - ), + ), 'FilterMenu' => Array( 'Groups' => Array( Array('mode' => 'AND', 'filters' => Array('show_active','show_pending','show_disabled'), 'type' => WHERE_FILTER), @@ -48,7 +53,7 @@ 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ), ) ), - + 'CalculatedFields' => Array( '' => Array( 'ReviewedBy' => 'IF( ISNULL(pu.Login), IF (%1$s.CreatedById = -1, \'root\', IF (%1$s.CreatedById = -2, \'Guest\', \'n/a\')), pu.Login )', @@ -63,31 +68,31 @@ 'ItemName' => 'pr.l1_Name', 'ProductId' => 'pr.ProductId', ), - + ), - - // key - special, value - list select sql + + // key - special, value - list select sql 'ListSQLs' => Array( ''=>'SELECT %1$s.* %2$s FROM %1$s LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = %1$s.CreatedById', - + 'products' => ' SELECT %1$s.* %2$s FROM %1$s, '.TABLE_PREFIX.'Products pr LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = %1$s.CreatedById', - + 'product' => ' SELECT %1$s.* %2$s FROM %1$s, '.TABLE_PREFIX.'Products pr LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = %1$s.CreatedById', ), 'ItemSQLs' => Array( ''=> 'SELECT * FROM %s'), - - 'ListSortings' => Array( + + 'ListSortings' => Array( '' => Array( 'ForcedSorting' => Array('Priority' => 'desc'), 'Sorting' => Array('CreatedOn' => 'desc'), ) - ), - + ), + 'Fields' => Array( 'ReviewId' => Array('type'=>'int'), 'CreatedOn' => Array('formatter'=>'kDateFormatter','not_null'=>1,'default'=>'#NOW#'), @@ -104,7 +109,7 @@ 'VirtualFields' => Array( 'ReviewedBy' => Array(), ), - + 'Grids' => Array( 'Default' => Array( 'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_review.gif',2=>'icon16_review_pending.gif',0=>'icon16_review_disabled.gif'), 'Fields' => Array( @@ -113,17 +118,17 @@ 'CreatedOn_formatted' => Array( 'title'=>'la_col_CreatedOn', 'sort_field' => 'CreatedOn' ), 'Status' => Array( 'title'=>'la_col_Status' ), ), - + ), - + 'ReviewsSection' => Array( 'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_review.gif',2=>'icon16_review_pending.gif',0=>'icon16_review_disabled.gif'), 'Fields' => Array( 'ReviewText' => Array( 'title'=>'la_col_ReviewText', 'data_block' => 'grid_checkbox_namelink_td'), 'ReviewedBy' => Array( 'title'=>'la_col_ReviewedBy' ), 'CreatedOn_formatted' => Array( 'title'=>'la_col_CreatedOn', 'sort_field' => 'CreatedOn' ), 'Status' => Array( 'title'=>'la_col_Status' ), ), - + ), ), );