Index: branches/unlabeled/unlabeled-1.4.4/core/units/reviews/reviews_config.php =================================================================== diff -u -r5728 -r6219 --- branches/unlabeled/unlabeled-1.4.4/core/units/reviews/reviews_config.php (.../reviews_config.php) (revision 5728) +++ branches/unlabeled/unlabeled-1.4.4/core/units/reviews/reviews_config.php (.../reviews_config.php) (revision 6219) @@ -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#'), @@ -97,14 +102,14 @@ 'CreatedById' => Array('formatter'=>'kLEFTFormatter','options'=>Array(-1=>'root',-2=>'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'=>-1), 'ItemType' => Array('type'=>'int','not_null'=>1,'default'=>0), 'Priority' => Array('type'=>'int','not_null'=>1,'default'=>0), - 'Status' => Array('formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(1=>'la_Active',2=>'la_Pending',0=>'la_Disabled'),'not_null'=>1,'default'=>0 ), + 'Status' => Array('formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(1=>'la_Active',2=>'la_Pending',0=>'la_Disabled'),'not_null'=>1,'default'=>2 ), 'TextFormat' => Array('type'=>'int','not_null'=>1,'default'=>0), 'Module' => Array('type'=>'string','not_null'=>1,'default'=>''), ), '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' ), ), - + ), ), ); Index: branches/unlabeled/unlabeled-1.4.34/core/units/stylesheets/stylesheets_config.php =================================================================== diff -u -r5725 -r6219 --- branches/unlabeled/unlabeled-1.4.34/core/units/stylesheets/stylesheets_config.php (.../stylesheets_config.php) (revision 5725) +++ branches/unlabeled/unlabeled-1.4.34/core/units/stylesheets/stylesheets_config.php (.../stylesheets_config.php) (revision 6219) @@ -69,7 +69,7 @@ 'label' => 'la_tab_Stylesheets', 'url' => Array('t' => 'stylesheets/stylesheets_list', 'pass' => 'm'), 'permissions' => Array('view', 'add', 'edit', 'delete'), - 'priority' => 3, + 'priority' => 4, 'type' => stTREE, ), Index: branches/unlabeled/unlabeled-1.9.4/core/admin_templates/groups/permissions_selector.tpl =================================================================== diff -u -r5728 -r6219 --- branches/unlabeled/unlabeled-1.9.4/core/admin_templates/groups/permissions_selector.tpl (.../permissions_selector.tpl) (revision 5728) +++ branches/unlabeled/unlabeled-1.9.4/core/admin_templates/groups/permissions_selector.tpl (.../permissions_selector.tpl) (revision 6219) @@ -16,7 +16,7 @@ a_toolbar = new ToolBar(); a_toolbar.AddButton( new ToolBarButton('select', '', function() { set_hidden_field('advanced_save', 1); - submit_event('g-perm','OnSavePermissions'); + submit_event('g-perm','OnGroupSavePermissions'); } ) ); a_toolbar.AddButton( new ToolBarButton('cancel', '', function() { Index: branches/unlabeled/unlabeled-1.3.4/core/units/images/image_tag_processor.php =================================================================== diff -u -r5728 -r6219 --- branches/unlabeled/unlabeled-1.3.4/core/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 5728) +++ branches/unlabeled/unlabeled-1.3.4/core/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 6219) @@ -5,6 +5,7 @@ function Image($params) { $params['img_path'] = $this->ImageSrc($params); + if ($params['img_path'] === false) return ; $params['img_size'] = $this->ImageSize($params); if (!$params['img_size']){ $params['img_size'] = ' width="'.getArrayValue($params, 'DefaultWidth').'"'; @@ -114,7 +115,8 @@ if ( $object->GetDBField('LocalImage') && !file_exists(FULL_PATH.'/'.$object->GetDBField('LocalPath')) ) $ret = ''; } - return ($ret && $ret != PROTOCOL.SERVER_NAME.BASE_PATH && $ret != PROTOCOL.SERVER_NAME.BASE_PATH.'/') ? $ret : PROTOCOL.SERVER_NAME.BASE_PATH.THEMES_PATH.'/'.$this->SelectParam($params, 'default_image,DefaultImage'); + $default_image = $this->SelectParam($params, 'default_image,DefaultImage'); + return ($ret && $ret != PROTOCOL.SERVER_NAME.BASE_PATH && $ret != PROTOCOL.SERVER_NAME.BASE_PATH.'/') ? $ret : ($default_image ? PROTOCOL.SERVER_NAME.BASE_PATH.THEMES_PATH.'/'.$default_image : false); } function GetFullPath($path) @@ -147,6 +149,7 @@ { $img_path = $this->GetFullPath( getArrayValue($params, 'img_path') ); + if (!file_exists($img_path)) return false; $image_info = @getimagesize($img_path); // if( !($img_path && file_exists($img_path) && isset($image_info) ) ) Index: branches/unlabeled/unlabeled-1.4.4/core/units/reviews/reviews_tag_processor.php =================================================================== diff -u -r5728 -r6219 --- branches/unlabeled/unlabeled-1.4.4/core/units/reviews/reviews_tag_processor.php (.../reviews_tag_processor.php) (revision 5728) +++ branches/unlabeled/unlabeled-1.4.4/core/units/reviews/reviews_tag_processor.php (.../reviews_tag_processor.php) (revision 6219) @@ -2,8 +2,6 @@ class ReviewsTagProcessor extends kDBTagProcessor { - - /** * Returns a link for editing product * @@ -24,7 +22,7 @@ $item_prefix.'_event' => 'OnEdit', $item_prefix.'_id' => $item_id, 'pass' => 'all,'.$item_prefix - ), 'index4.php'); + ), 'index.php'); } /** Index: branches/unlabeled/unlabeled-1.5.2/core/admin_templates/incs/custom_blocks.tpl =================================================================== diff -u -r5725 -r6219 --- branches/unlabeled/unlabeled-1.5.2/core/admin_templates/incs/custom_blocks.tpl (.../custom_blocks.tpl) (revision 5725) +++ branches/unlabeled/unlabeled-1.5.2/core/admin_templates/incs/custom_blocks.tpl (.../custom_blocks.tpl) (revision 6219) @@ -9,18 +9,18 @@ - + "> - " type="checkbox" id="_cb_" name="_cb_" class="" onclick="update_checkbox(this, document.getElementById(''))"> + " type="checkbox" id="_cb_" name="_cb_" onclick="update_checkbox(this, document.getElementById(''))"> @@ -32,23 +32,55 @@ - + + + + + + + + " id="" value="" size="" datepickerIcon="admin/images/ddarrow.gif"> () + + " value=""> + + + + + + + + + " id="" value="" size="" datepickerIcon="admin/images/ddarrow.gif"> () + +  " id="" value="" size=""> () + + - + + + + " > -   +   + + + @@ -58,6 +90,11 @@ + + + + +