Index: trunk/themes/default2007/platform/elements/pagination.tpl =================================================================== diff -u -N -r8496 -r8586 --- trunk/themes/default2007/platform/elements/pagination.tpl (.../pagination.tpl) (revision 8496) +++ trunk/themes/default2007/platform/elements/pagination.tpl (.../pagination.tpl) (revision 8586) @@ -24,9 +24,9 @@ :  - - Index: trunk/core/kernel/utility/debugger.php =================================================================== diff -u -N -r8438 -r8586 --- trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 8438) +++ trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 8586) @@ -1072,12 +1072,14 @@ // we have sql & error count in toolbar, don't duplicate here $info = Array( 'Script Runtime' => 'PROFILE:script_runtime', + 'SQL\'s Runtime' => 'PROFILE_T:sql', ); } else { // toolbar not visible, then show sql & error count too $info = Array ( 'Script Runtime' => 'PROFILE:script_runtime', + 'SQL\'s Runtime' => 'PROFILE_T:sql', '-' => 'SEP:-', 'Notice / Warning' => 'PROFILE_TC:error_handling', 'SQLs Count' => 'PROFILE_TC:sql', @@ -1102,6 +1104,11 @@ $ret .= ''.$record_cell.$title.':'.$record_cell.''.$this->ProfilerTotalCount[$record_data].''; break; + case 'PROFILE_T': // profile total + $record_cell = ''; + $ret .= ''.$record_cell.$title.':'.$record_cell.''.sprintf('%.5f', $this->ProfilerTotals[$record_data]).' s'; + break; + case 'SEP': $ret .= ''; break; Index: trunk/core/units/general/cat_dbitem.php =================================================================== diff -u -N -r8546 -r8586 --- trunk/core/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 8546) +++ trunk/core/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 8586) @@ -466,6 +466,39 @@ // original item is not changed here, because it is already enabled (thrus pending copy is visible to item's owner or admin with permission) return true; } + + function RegisterHit() + { + $already_viewed = $this->Application->RecallVar($this->getPrefixSpecial().'_already_viewed'); + $already_viewed = $already_viewed ? unserialize($already_viewed) : Array (); + + $id = $this->GetID(); + if (!in_array($id, $already_viewed)) { + $property_map = $this->Application->getUnitOption($this->Prefix, 'ItemPropertyMappings'); + if (!$property_map) { + return ; + } + $hits_field = $property_map['ClickField']; + $new_hits = $this->GetDBField($hits_field) + 1; + + $sql = 'SELECT MAX('.$hits_field.') + FROM '.$this->TableName.' + WHERE FLOOR('.$hits_field.') = '.$new_hits; + $max_hits = $this->Conn->GetOne($sql); + if ($max_hits) { + $new_hits = $max_hits + 0.000001; + } + + $fields_hash = Array ( + $hits_field => $new_hits, + ); + $this->Conn->doUpdate($fields_hash, $this->TableName, $this->IDField.' = '.$id); + + array_push($already_viewed, $id); + $this->Application->StoreVar($this->getPrefixSpecial().'_already_viewed', serialize($already_viewed)); + } + } + } ?> \ No newline at end of file Index: trunk/core/units/categories/categories_config.php =================================================================== diff -u -N -r8562 -r8586 --- trunk/core/units/categories/categories_config.php (.../categories_config.php) (revision 8562) +++ trunk/core/units/categories/categories_config.php (.../categories_config.php) (revision 8586) @@ -23,8 +23,8 @@ 'DoSpecial' => '*', 'DoEvent' => 'OnDefineCustomFields', ), - ), - + ), + 'AutoLoad' => true, 'CatalogItem' => true, 'AdminTemplatePath' => 'categories', @@ -183,7 +183,7 @@ 'parent' => 'in-portal:site', 'icon' => 'settings_custom', 'label' => 'la_tab_ConfigCustom', - 'url' => Array('t' => 'in-portal/custom_fields/custom_fields_list', 'cf_type' => 1, 'pass_section' => true, 'pass' => 'm,cf'), + 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 1, 'pass_section' => true, 'pass' => 'm,cf'), 'permissions' => Array('view', 'add', 'edit', 'delete'), 'priority' => 7, 'type' => stTREE, Index: trunk/core/units/sections/sections_config.php =================================================================== diff -u -N -r8397 -r8586 --- trunk/core/units/sections/sections_config.php (.../sections_config.php) (revision 8397) +++ trunk/core/units/sections/sections_config.php (.../sections_config.php) (revision 8586) @@ -94,7 +94,7 @@ 'parent' => 'in-portal:site', 'icon' => 'in-portal:settings_custom', 'label' => 'la_tab_ConfigCustom', - 'url' => Array('t' => 'in-portal/custom_fields/custom_fields_list', 'cf_type' => 1, 'pass_section' => true, 'pass' => 'm,cf'), + 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 1, 'pass_section' => true, 'pass' => 'm,cf'), 'permissions' => Array('view', 'add', 'edit', 'delete'), 'priority' => 7, 'type' => stTREE, @@ -132,7 +132,7 @@ 'show_mode' => smDEBUG, 'type' => stTREE, ), - + 'in-portal:user_groups' => Array( 'parent' => 'in-portal:users', 'icon' => 'in-portal:usergroups', @@ -144,7 +144,7 @@ ), - + 'in-portal:configure_users' => Array( 'parent' => 'in-portal:users', 'icon' => 'in-portal:users_settings', Index: trunk/themes/default2007/platform/inc/script.js =================================================================== diff -u -N -r8546 -r8586 --- trunk/themes/default2007/platform/inc/script.js (.../script.js) (revision 8546) +++ trunk/themes/default2007/platform/inc/script.js (.../script.js) (revision 8586) @@ -1,4 +1,7 @@ -function update_checkbox(cb, cb_hidden) -{ +function update_checkbox(cb, cb_hidden) { cb_hidden.value = cb.checked ? 1 : 0; +} + +function redirect($url) { + window.location.href = $url; } \ No newline at end of file Index: trunk/kernel/units/sections/sections_config.php =================================================================== diff -u -N -r8397 -r8586 --- trunk/kernel/units/sections/sections_config.php (.../sections_config.php) (revision 8397) +++ trunk/kernel/units/sections/sections_config.php (.../sections_config.php) (revision 8586) @@ -94,7 +94,7 @@ 'parent' => 'in-portal:site', 'icon' => 'in-portal:settings_custom', 'label' => 'la_tab_ConfigCustom', - 'url' => Array('t' => 'in-portal/custom_fields/custom_fields_list', 'cf_type' => 1, 'pass_section' => true, 'pass' => 'm,cf'), + 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 1, 'pass_section' => true, 'pass' => 'm,cf'), 'permissions' => Array('view', 'add', 'edit', 'delete'), 'priority' => 7, 'type' => stTREE, @@ -132,7 +132,7 @@ 'show_mode' => smDEBUG, 'type' => stTREE, ), - + 'in-portal:user_groups' => Array( 'parent' => 'in-portal:users', 'icon' => 'in-portal:usergroups', @@ -144,7 +144,7 @@ ), - + 'in-portal:configure_users' => Array( 'parent' => 'in-portal:users', 'icon' => 'in-portal:users_settings',