Index: branches/RC/core/units/admin/admin_tag_processor.php =================================================================== diff -u -N -r11693 -r11705 --- branches/RC/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 11693) +++ branches/RC/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 11705) @@ -487,7 +487,7 @@ unset($params['selection_mode']); } - if (isset($params['tab_prefixes'])) { // {all, none, } $pass_through['tp'] = $params['tab_prefixes']; unset($params['tab_prefixes']); } Index: branches/RC/core/admin_templates/catalog/advanced_view.tpl =================================================================== diff -u -N -r11693 -r11705 --- branches/RC/core/admin_templates/catalog/advanced_view.tpl (.../advanced_view.tpl) (revision 11693) +++ branches/RC/core/admin_templates/catalog/advanced_view.tpl (.../advanced_view.tpl) (revision 11705) @@ -39,7 +39,7 @@ var a_toolbar = new ToolBar(); - + a_toolbar.AddButton( new ToolBarButton('edit', '', edit) ); Index: branches/RC/core/units/general/cat_dbitem.php =================================================================== diff -u -N -r11368 -r11705 --- branches/RC/core/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 11368) +++ branches/RC/core/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 11705) @@ -174,24 +174,26 @@ // $this->NameCopy(); if (!isset($cat_id)) $cat_id = $this->Application->GetVar('m_cat_id'); // check if the product already exists in destination cat - $query = 'SELECT PrimaryCat FROM '.TABLE_PREFIX.'CategoryItems - WHERE CategoryId = '.$cat_id.' AND ItemResourceId = '.$this->GetDBField('ResourceId'); + $sql = 'SELECT PrimaryCat + FROM '.TABLE_PREFIX.'CategoryItems + WHERE CategoryId = '.$cat_id.' AND ItemResourceId = '.$this->GetDBField('ResourceId'); // if it's not found is_primary will be FALSE, if it's found but not primary it will be int 0 - $is_primary = $this->Conn->GetOne($query); + $is_primary = $this->Conn->GetOne($sql); $exists = $is_primary !== false; if ($exists) { // if the Product already exists in destination category if ($is_primary) return; // do nothing when we paste to primary // if it's not primary - delete it from destination category, // as we will move it from current primary below - $query = 'DELETE FROM '.TABLE_PREFIX.'CategoryItems - WHERE ItemResourceId = '.$this->GetDBField('ResourceId').' AND CategoryId = '.$cat_id; - $this->Conn->Query($query); + $sql = 'DELETE FROM '.TABLE_PREFIX.'CategoryItems + WHERE ItemResourceId = '.$this->GetDBField('ResourceId').' AND CategoryId = '.$cat_id; + $this->Conn->Query($sql); } - $query = 'UPDATE '.TABLE_PREFIX.'CategoryItems SET CategoryId = '.$cat_id. - ' WHERE ItemResourceId = '.$this->GetDBField('ResourceId').' AND PrimaryCat = 1'; - $this->Conn->Query($query); + $sql = 'UPDATE '.TABLE_PREFIX.'CategoryItems + SET CategoryId = '.$cat_id.' + WHERE ItemResourceId = '.$this->GetDBField('ResourceId').' AND PrimaryCat = 1'; + $this->Conn->Query($sql); $this->Update(); } Index: branches/RC/core/units/categories/categories_config.php =================================================================== diff -u -N -r11704 -r11705 --- branches/RC/core/units/categories/categories_config.php (.../categories_config.php) (revision 11704) +++ branches/RC/core/units/categories/categories_config.php (.../categories_config.php) (revision 11705) @@ -91,7 +91,7 @@ ), 'advanced_view' => Array ( 'prefixes' => Array (), 'format' => "!la_title_AdvancedView!", - 'toolbar_buttons' => Array ('select', 'cancel', 'new_cat', 'edit', 'delete', 'approve', 'decline', 'view'), + 'toolbar_buttons' => Array ('select', 'cancel', 'new_cat', 'new_link', 'new_article', /*'new_topic',*/ 'new_item', 'edit', 'delete', 'approve', 'decline', 'view'), ), 'reviews' => Array ('prefixes' => Array (), 'format' => "!la_title_Reviews!"), 'review_edit' => Array ('prefixes' => Array (), 'format' => "!la_title_Editing_Review!"), Index: branches/RC/core/admin_templates/incs/grid_blocks.tpl =================================================================== diff -u -N -r11703 -r11705 --- branches/RC/core/admin_templates/incs/grid_blocks.tpl (.../grid_blocks.tpl) (revision 11703) +++ branches/RC/core/admin_templates/incs/grid_blocks.tpl (.../grid_blocks.tpl) (revision 11705) @@ -723,10 +723,6 @@ ] - /*GridScrollers[''].SetFooter( - ['-', '-', '125', '-'] - )*/ - Index: branches/RC/core/admin_templates/js/template_manager.js =================================================================== diff -u -N -r11690 -r11705 --- branches/RC/core/admin_templates/js/template_manager.js (.../template_manager.js) (revision 11690) +++ branches/RC/core/admin_templates/js/template_manager.js (.../template_manager.js) (revision 11705) @@ -23,7 +23,9 @@ $('a', $extra_toolbar).each( function() { - var $editing_mode = $(this).attr('href').replace('#', ''); + // cut from end, because IE7 adds base_href to beginning of href + var $editing_mode = $(this).attr('href'); + $editing_mode = $editing_mode.substr($editing_mode.length - 1, 1); $(this).attr('href', $template_manager.browseUrl.replace('#EDITING_MODE#', $editing_mode)); Index: branches/RC/core/units/structure/structure_config.php =================================================================== diff -u -N -r11682 -r11705 --- branches/RC/core/units/structure/structure_config.php (.../structure_config.php) (revision 11682) +++ branches/RC/core/units/structure/structure_config.php (.../structure_config.php) (revision 11705) @@ -173,7 +173,7 @@ 'Fields' => Array( 'CategoryId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'filter_width' => '20' ), 'Name' => Array( 'title'=>'la_col_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter'), - 'Modified_formatted' => Array( 'title'=>'la_col_Modified', 'sort_field' => 'Modified', 'filter_block' => 'grid_date_range_filter' ), + 'Modified' => Array( 'title'=>'la_col_Modified', 'filter_block' => 'grid_date_range_filter' ), 'Template' => Array( 'title'=>'la_col_TemplateType', 'filter_block' => 'grid_options_filter' ), 'IsMenu' => Array( 'title'=>'la_col_Visible', 'filter_block' => 'grid_options_filter' ), 'Path' => Array( 'title'=>'la_col_Path', 'data_block' => 'page_entercat_td', 'filter_block' => 'grid_like_filter' ), @@ -187,7 +187,7 @@ 'Fields' => Array( 'CategoryId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'filter_width' => '20' ), 'Name' => Array( 'title'=>'la_col_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter'), - 'Modified_formatted' => Array( 'title'=>'la_col_Modified', 'sort_field' => 'Modified', 'filter_block' => 'grid_date_range_filter' ), + 'Modified' => Array( 'title'=>'la_col_Modified', 'filter_block' => 'grid_date_range_filter' ), 'Template' => Array( 'title'=>'la_col_TemplateType', 'filter_block' => 'grid_options_filter' ), 'IsMenu' => Array( 'title'=>'la_col_Visible', 'filter_block' => 'grid_options_filter' ), 'Path' => Array( 'title'=>'la_col_Path', 'data_block' => 'page_entercat_td', 'filter_block' => 'grid_like_filter' ), @@ -201,7 +201,7 @@ 'CategoryId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'filter_width' => '20' ), 'Name' => Array( 'title'=>'la_col_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter' ), 'Path' => Array( 'title'=>'la_col_Path', 'data_block'=>'page_path_td', 'sort_field' => 'CachedNavbar', 'filter_block' => 'grid_like_filter' ), - 'Modified_formatted' => Array( 'title'=>'la_col_Modified', 'sort_field' => 'Modified', 'filter_block' => 'grid_date_range_filter' ), + 'Modified' => Array( 'title'=>'la_col_Modified', 'filter_block' => 'grid_date_range_filter' ), 'Template' => Array( 'title'=>'la_col_TemplateType', 'filter_block' => 'grid_options_filter', 'hidden' => true ), 'IsMenu' => Array( 'title'=>'la_col_Visible', 'filter_block' => 'grid_options_filter' ), 'IsSystem' => Array( 'title'=>'la_col_System', 'filter_block' => 'grid_options_filter', 'use_phrases'=>1 ), Index: branches/RC/core/kernel/utility/formatters/date_formatter.php =================================================================== diff -u -N -r10530 -r11705 --- branches/RC/core/kernel/utility/formatters/date_formatter.php (.../date_formatter.php) (revision 10530) +++ branches/RC/core/kernel/utility/formatters/date_formatter.php (.../date_formatter.php) (revision 11705) @@ -124,13 +124,13 @@ if ( !isset($object->CalculatedFields) || !is_array($object->CalculatedFields) ) { $object->CalculatedFields = Array(); } - $object->CalculatedFields[$field_name.'_formatted'] = 'FROM_UNIXTIME('.'`%1$s`.'.$field_name.' + '.$this->Application->TimeZoneAdjustment().', \''.$this->SQLFormat($field_options['format']).'\')'; +// $object->CalculatedFields[$field_name.'_formatted'] = 'FROM_UNIXTIME('.'`%1$s`.'.$field_name.' + '.$this->Application->TimeZoneAdjustment().', \''.$this->SQLFormat($field_options['format']).'\')'; $object->CalculatedFields[$field_name.'_date'] = '%1$s.'.$field_name; $object->CalculatedFields[$field_name.'_time'] = '%1$s.'.$field_name; - $opts['format'] = $field_options['format']; - $opts['required'] = 0; - unset($opts['master_field']); - $add_fields[$field_name.'_formatted'] = $opts; +// $opts['format'] = $field_options['format']; +// $opts['required'] = 0; +// unset($opts['master_field']); +// $add_fields[$field_name.'_formatted'] = $opts; } $add_fields = array_merge_recursive2($add_fields, $object->VirtualFields); Index: branches/RC/core/install/upgrades.php =================================================================== diff -u -N -r11623 -r11705 --- branches/RC/core/install/upgrades.php (.../upgrades.php) (revision 11623) +++ branches/RC/core/install/upgrades.php (.../upgrades.php) (revision 11705) @@ -871,6 +871,22 @@ } } + /** + * 1. Set root category not to generate filename automatically and hide it from catalog + * 2. Hide root category of In-Edit and set it's fields + * + * @param int $category_id + */ + function _resetRootCategory($category_id) + { + $fields_hash = Array ( + 'l1_Name' => 'Content', 'Filename' => 'Content', 'AutomaticFilename' => 0, + 'l1_Description' => 'Content', 'Status' => 4, + ); + + $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'Category', 'CategoryId = ' . $category_id); + } + function _createProjCMSTables() { // 0. make sure, that Content category exists @@ -882,6 +898,8 @@ $this->Conn->Query($sql); unset($this->Application->ModuleInfo['Proj-CMS']); + $this->_resetRootCategory($root_category); + // unhide all structure categories $sql = 'UPDATE ' . TABLE_PREFIX . 'Category SET Status = 1 @@ -896,13 +914,7 @@ $this->Conn->Query($sql); unset($this->Application->ModuleInfo['In-Edit']); - // hide root category of In-Edit and set it's fields - $fields_hash = Array ( - 'l1_Name' => 'Content', 'Filename' => 'Content', 'AutomaticFilename' => 0, - 'l1_Description' => 'Content', 'Status' => 4, - ); - - $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'Category', 'CategoryId = ' . $root_category); + $this->_resetRootCategory($root_category); } }