Index: trunk/admin/install.php =================================================================== diff -u -r7391 -r7635 --- trunk/admin/install.php (.../install.php) (revision 7391) +++ trunk/admin/install.php (.../install.php) (revision 7635) @@ -1216,7 +1216,8 @@ // run core install script K4_RunSQL('/core/install/install_schema.sql'); K4_RunSQL('/core/install/install_data.sql'); - + K4_SetModuleVersion('Core'); + // run in-portal install script $filename = $pathtoroot.$admin."/install/inportal_schema.sql"; RunSchemaFile($ado,$filename); Index: trunk/core/admin_templates/regional/languages_list.tpl =================================================================== diff -u -r7391 -r7635 --- trunk/core/admin_templates/regional/languages_list.tpl (.../languages_list.tpl) (revision 7391) +++ trunk/core/admin_templates/regional/languages_list.tpl (.../languages_list.tpl) (revision 7635) @@ -31,18 +31,18 @@ a_toolbar.AddButton( new ToolBarSeparator('sep1') ); - a_toolbar.AddButton( new ToolBarButton('primary_language', '', function() { + a_toolbar.AddButton( new ToolBarButton('primary_language', '::', function() { submit_event('lang','OnSetPrimary'); } ) ); - a_toolbar.AddButton( new ToolBarButton('import_language', '', function() { + a_toolbar.AddButton( new ToolBarButton('import_language', '::', function() { redirect(''); } ) ); - a_toolbar.AddButton( new ToolBarButton('export_language', '', function() { + a_toolbar.AddButton( new ToolBarButton('export_language', '::', function() { submit_event('lang','OnExportLanguage'); } ) ); Index: trunk/core/kernel/db/dbitem.php =================================================================== diff -u -r6835 -r7635 --- trunk/core/kernel/db/dbitem.php (.../dbitem.php) (revision 6835) +++ trunk/core/kernel/db/dbitem.php (.../dbitem.php) (revision 7635) @@ -108,6 +108,12 @@ // $parsed = $formatter->Parse($value, $options, $err); $parsed = $formatter->Parse($value, $name, $this); } + // this will make sure numeric value is converted to normal representation + // according to regional format, even when formatter is not set (try seting format to 1.234,56 to understand why) + elseif (preg_match('#int|integer|double|float|real|numeric#', $options['type'])) { + $formatter =& $this->Application->recallObject('kFormatter'); + $parsed = $formatter->TypeCast($value, $options); + } $this->SetDBField($name,$parsed); } Index: trunk/core/units/sections/sections_config.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/sections/sections_config.php (.../sections_config.php) (revision 7391) +++ trunk/core/units/sections/sections_config.php (.../sections_config.php) (revision 7635) @@ -112,6 +112,27 @@ 'SectionPrefix' => 'u', ), + 'in-portal:user_list' => Array( + 'parent' => 'in-portal:users', + 'icon' => 'in-portal:users', + 'label' => 'la_tab_User_List', + 'url' => Array('index_file' => 'users/user_list.php', 'pass' => 'm', 'resetpage' => 1), + 'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:ban', 'advanced:send_email', /*'advanced:add_favorite', 'advanced:remove_favorite',*/), + 'priority' => 1, + 'type' => stTREE, + ), + + 'in-portal:k4_user_list' => Array( + 'parent' => 'in-portal:users', + 'icon' => 'in-portal:users', + 'label' => 'la_title_K4Users', + 'url' => Array('t' => 'in-portal/users/users_list', 'pass' => 'm'), + 'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:ban', 'advanced:send_email', /*'advanced:add_favorite', 'advanced:remove_favorite',*/), + 'priority' => 1.5, + 'debug_only' => true, + 'type' => stTREE, + ), + 'in-portal:user_groups' => Array( 'parent' => 'in-portal:users', 'icon' => 'in-portal:usergroups', @@ -123,16 +144,7 @@ ), - 'in-portal:user_list' => Array( - 'parent' => 'in-portal:users', - 'icon' => 'in-portal:users', - 'label' => 'la_tab_User_List', - 'url' => Array('index_file' => 'users/user_list.php', 'pass' => 'm', 'resetpage' => 1), - 'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:ban', 'advanced:send_email', /*'advanced:add_favorite', 'advanced:remove_favorite',*/), - 'priority' => 1, - 'type' => stTREE, - ), - + 'in-portal:configure_users' => Array( 'parent' => 'in-portal:users', 'icon' => 'in-portal:users_settings', Index: trunk/core/units/groups/groups_config.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/groups/groups_config.php (.../groups_config.php) (revision 7391) +++ trunk/core/units/groups/groups_config.php (.../groups_config.php) (revision 7635) @@ -39,23 +39,22 @@ 'groups_edit_additional_permissions' => Array('prefixes' => Array('g'), 'format' => "#g_status# '#g_titlefield#' - !la_title_AdditionalPermissions!" ), - 'groups_select' => Array('prefixes' => Array('g_List'), 'format' => "!la_title_Groups! (#g_recordcount#) - !la_title_SelectGroup!"), + 'select_group' => Array('prefixes' => Array('g.user_List'), 'format' => "!la_title_Groups! (#g.user_recordcount#) - !la_title_SelectGroup!"), ), 'PermSection' => Array('main' => 'in-portal:user_groups'), 'TableName' => TABLE_PREFIX.'PortalGroup', 'ListSQLs' => Array( - '' => ' - SELECT %1$s.* %2$s FROM %1$s', - 'total' => ' - SELECT %1$s.* %2$s FROM %1$s + '' => 'SELECT %1$s.* %2$s FROM %1$s', + 'total' => 'SELECT %1$s.* %2$s + FROM %1$s LEFT JOIN '.TABLE_PREFIX.'UserGroup ug ON ug.GroupId = %1$s.GroupId', ), - 'ItemSQLs' => Array('' => ' - SELECT %1$s.* %2$s FROM %1$s + 'ItemSQLs' => Array('' => ' SELECT %1$s.* %2$s + FROM %1$s LEFT JOIN '.TABLE_PREFIX.'UserGroup ug ON ug.GroupId = %1$s.GroupId'), 'ListSortings' => Array( @@ -87,37 +86,43 @@ ), 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array(1 => 'icon16_group.gif', 0 => 'icon16_group_disabled.gif'), - 'Fields' => Array( - 'GroupId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'), - 'Name' => Array('title' => 'la_col_GroupName'), - 'UserCount' => Array('title' => 'la_col_UserCount'), - ), - ), + 'Default' => Array( + 'Icons' => Array(1 => 'icon16_group.gif', 0 => 'icon16_group_disabled.gif'), + 'Fields' => Array( + 'GroupId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'), + 'Name' => Array('title' => 'la_col_GroupName'), + 'UserCount' => Array('title' => 'la_col_UserCount'), + ), + ), - 'Radio' => Array( - 'Icons' => Array(1 => 'icon16_group.gif', 0 => 'icon16_group_disabled.gif'), - 'Fields' => Array( - 'GroupId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_radio_td'), - 'Name' => Array('title' => 'la_col_GroupName'), - 'Description' => Array('title' => 'la_col_Description'), - ), - ), + 'UserGroups' => Array ( + 'Icons' => Array (1 => 'icon16_group.gif', 0 => 'icon16_group_disabled.gif'), + 'Fields' => Array ( + 'GroupId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'), + 'Name' => Array('title' => 'la_col_GroupName'), + ), + ), + + 'Radio' => Array ( + 'Icons' => Array(1 => 'icon16_group.gif', 0 => 'icon16_group_disabled.gif'), + 'Fields' => Array( + 'GroupId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_radio_td'), + 'Name' => Array('title' => 'la_col_GroupName'), + 'Description' => Array('title' => 'la_col_Description'), + ), + ), + + 'GroupSelector' => Array ( + 'Icons' => Array(1 => 'icon16_group.gif', 0 => 'icon16_group_disabled.gif'), + 'Fields' => Array( + 'GroupId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'), + 'Name' => Array('title' => 'la_col_GroupName'), + 'Description' => Array('title' => 'la_col_Description'), + ), + ), + ), + - /*'GroupSelector' => Array( - 'Icons' => Array(0 => 'icon16_user_disabled.gif', 1 => 'icon16_user.gif', 2 => 'icon16_user_pending.gif'), - 'Fields' => Array( - 'Login' => Array('title' => 'la_col_Username', 'data_block' => 'grid_radio_td'), - 'LastName' => Array( 'title'=>'la_col_LastName'), - 'FirstName' => Array( 'title'=>'la_col_FirstName'), - 'Email' => Array( 'title'=>'la_col_Email'), - 'PrimaryGroup' => Array( 'title'=>'la_col_PrimaryGroup'), - 'CreatedOn_formatted' => Array('title' => 'la_col_CreatedOn', 'sort_field' => 'CreatedOn'), - ), - ),*/ - ), - ); ?> \ No newline at end of file Index: trunk/core/units/languages/languages_event_handler.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 7391) +++ trunk/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 7635) @@ -31,6 +31,7 @@ $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper'); $this->Application->UnitConfigReader->includeConfigFiles(MODULES_PATH); //make sure to re-read all configs + $this->Application->UnitConfigReader->AfterConfigRead(); foreach ($this->Application->UnitConfigReader->configData as $prefix => $config_data) { $ml_helper->createFields($prefix); } @@ -433,6 +434,27 @@ $event->redirect_params['opener'] = 'u'; } + function OnScheduleTopFrameReload(&$event) + { + $this->Application->StoreVar('RefreshTopFrame',1); + } + + /** + * Do now allow deleting current language + * + * @param kEvent $event + */ + function OnBeforeItemDelete(&$event) + { + $del_id = $event->getEventParam('id'); + $object =& $event->getObject(array('skip_autload' => true)); + $object->Load($del_id); + + if ($object->GetDBField('PrimaryLang') || $del_id == $this->Application->GetVar('m_lang')) { + $event->status = erFAIL; + } + } + } ?> \ No newline at end of file Index: trunk/core/kernel/parser/tags.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/parser/tags.php (.../tags.php) (revision 7391) +++ trunk/core/kernel/parser/tags.php (.../tags.php) (revision 7635) @@ -322,7 +322,11 @@ } return $code; case 'param': - $code[] = '$o .= $params["'.$this->NP['name'].'"];'; + $param_code = '$o .= $params["'.$this->NP['name'].'"]'; + if (isset($this->NP['plus'])) { + $param_code .= ' + '.$this->NP['plus']; + } + $code[] = $param_code.';'; return $code; case 'if': if (isset($this->NP['_closing_tag_'])) { Index: trunk/core/admin_templates/config/config_universal.tpl =================================================================== diff -u -r7391 -r7635 --- trunk/core/admin_templates/config/config_universal.tpl (.../config_universal.tpl) (revision 7391) +++ trunk/core/admin_templates/config/config_universal.tpl (.../config_universal.tpl) (revision 7635) @@ -1,8 +1,9 @@ - - + + + @@ -85,7 +86,7 @@
- +
\ No newline at end of file Index: trunk/core/units/languages/languages_config.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/languages/languages_config.php (.../languages_config.php) (revision 7391) +++ trunk/core/units/languages/languages_config.php (.../languages_config.php) (revision 7635) @@ -44,6 +44,18 @@ 'DoSpecial' => '', 'DoEvent' => 'OnUpdatePrimary', ), + + Array( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'lang', + 'HookToSpecial' => '*', + 'HookToEvent' => Array('OnSave','OnMassDelete'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnScheduleTopFrameReload', + ), + ), 'QueryString' => Array( 1 => 'id', Index: trunk/core/admin_templates/js/inp_fckconfig.js =================================================================== diff -u -r7391 -r7635 --- trunk/core/admin_templates/js/inp_fckconfig.js (.../inp_fckconfig.js) (revision 7391) +++ trunk/core/admin_templates/js/inp_fckconfig.js (.../inp_fckconfig.js) (revision 7635) @@ -57,7 +57,7 @@ FCKConfig.ToolbarStartExpanded = true ; FCKConfig.ToolbarCanCollapse = true ; //FCKConfig.ProjectPath = FCKConfig.BasePath.replace(/\/cmseditor\/editor\/$/,''); -FCKConfig.IconImagesUrl = FCKConfig.ProjectPath+'kernel/user_files/icons'; +FCKConfig.IconImagesUrl = FCKConfig.ProjectPath+'system/user_files/icons'; FCKConfig.ToolbarSets["Default"] = [ @@ -88,23 +88,23 @@ FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages' FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/rel/ieSpellSetup211325.exe' ; FCKConfig.LinkBrowser = true ; -FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'kernel/user_files' ; +FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'system/user_files' ; FCKConfig.LinkBrowserWindowWidth = screen.width * 0.7 ; // 70% FCKConfig.LinkBrowserWindowHeight = screen.height * 0.7 ; // 70% FCKConfig.ImageBrowser = true ; -FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Images&Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'kernel/user_files' ; +FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Images&Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'system/user_files' ; FCKConfig.ImageBrowserWindowWidth = screen.width * 0.7 ; // 70% ; FCKConfig.ImageBrowserWindowHeight = screen.height * 0.7 ; // 70% ; FCKConfig.DocumentBrowser = true ; -FCKConfig.DocumentBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Documents&Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'kernel/user_files' ; +FCKConfig.DocumentBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Documents&Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'system/user_files' ; FCKConfig.ImageBrowserWindowWidth = screen.width * 0.7 ; // 70% ; FCKConfig.ImageBrowserWindowHeight = screen.height * 0.7 ; // 70% ; -FCKConfig.DocumentsServerPath = FCKConfig.ProjectPath+'kernel/user_files/Documents' +FCKConfig.DocumentsServerPath = FCKConfig.ProjectPath+'system/user_files/Documents' FCKConfig.StructureBrowser = true ; FCKConfig.StructureBrowserURL = FCKConfig.ProjectPath+'/admin/index.php?t=structure/tree' ; FCKConfig.StructureBrowserWindowWidth = screen.width * 0.5 ; // 50% FCKConfig.StructureBrowserWindowHeight = screen.height * 0.7 ; // 70% -FCKConfig.FilesBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Files&Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'kernel/user_files/' ; +FCKConfig.FilesBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Files&Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'system/user_files/' ; FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ; FCKConfig.SmileyImages = ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ; FCKConfig.SmileyColumns = 8 ; Index: trunk/core/kernel/db/dblist.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/db/dblist.php (.../dblist.php) (revision 7391) +++ trunk/core/kernel/db/dblist.php (.../dblist.php) (revision 7635) @@ -560,21 +560,22 @@ * @access public * @param string $field Field name * @param string $direction Direction of ordering (asc|desc) + * @param bool $is_expression this is expression, that should not be escapted by "`" symbols * @return void */ - function AddOrderField($field, $direction) + function AddOrderField($field, $direction = 'asc', $is_expression = false) { // original multilanguage field - convert to current lang field if (getArrayValue($this->Fields, $field, 'formatter') == 'kMultiLanguage' && !getArrayValue($this->Fields, $field, 'master_field')) { $lang = $this->Application->GetVar('m_lang'); $field = 'l'.$lang.'_'.$field; } - if (!isset($this->Fields[$field]) && ($field != 'RAND()')) { + if (!isset($this->Fields[$field]) && $field != 'RAND()' && !$is_expression) { trigger_error('Incorrect sorting defined (field = '.$field.'; direction = '.$direction.') in config for prefix '.$this->Prefix.'', E_USER_WARNING); } - $this->OrderFields[] = Array($field, $direction); + $this->OrderFields[] = Array($field, $direction, $is_expression); } /** @@ -603,7 +604,8 @@ $name = $field[0]; $ret .= isset($this->Fields[$name]) && !isset($this->VirtualFields[$name]) ? '`'.$this->TableName.'`.' : ''; - if ($field[0] == 'RAND()') { + + if ($field[0] == 'RAND()' || $field[2]) { $ret .= $field[0].' '.$field[1].','; } else { Index: trunk/kernel/admin_templates/item_selector/item_selector_catalog.tpl =================================================================== diff -u -r6669 -r7635 --- trunk/kernel/admin_templates/item_selector/item_selector_catalog.tpl (.../item_selector_catalog.tpl) (revision 6669) +++ trunk/kernel/admin_templates/item_selector/item_selector_catalog.tpl (.../item_selector_catalog.tpl) (revision 7635) @@ -42,8 +42,8 @@ - - + + + +GetUpgradableModules(); + foreach ($modules as $module_name => $module_params) { + $module_title = $module_name.' ('.$module_params['Version'].' to '.$module_params['ToVersion'].')'; + if ($this->Application->isDebugMode()) { + $module_title .= ' [from: '.$module_params['FromVersion'].']'; + } + echo sprintf($module_tpl, $module_name, $module_title); + } +?> + + + \ No newline at end of file Index: trunk/core/units/categories/categories_tag_processor.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 7391) +++ trunk/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 7635) @@ -296,14 +296,19 @@ /** * Substitutes category in last template base on current category + * This is required becasue when you navigate catalog using AJAX, last_template is not updated + * but when you open item edit from catalog last_template is used to build opener_stack + * So, if we don't substitute m_cat_id in last_template, after saving item we'll get redirected + * to the first category we've opened, not the one we navigated to using AJAX * * @param Array $params */ function UpdateLastTemplate($params) { $category_id = $this->Application->GetVar('m_cat_id'); - list($index_file, $env) = explode('|', $this->Application->RecallVar('last_template'), 2); + $wid = $this->Application->GetVar('m_wid'); + list($index_file, $env) = explode('|', $this->Application->RecallVar(rtrim('last_template_'.$wid, '_')), 2); $this->Application->SetVar(ENV_VAR_NAME, str_replace('%5C', '\\', $env)); $this->Application->HttpQuery->processQueryString(); @@ -504,6 +509,19 @@ $params['skip_prefixes'] = implode(',', $skip_prefixes); return $this->Application->ParseBlock($params, 1); } + + function IsActive($params) + { + $cat_id = $this->Application->GetVar('c_id'); + $current_cat = $this->getObject($params); + $current_path = $current_cat->GetDBField('ParentPath'); + + static $parent_path = null; + if (!isset($parent_path)) { + $parent_path = $this->Conn->GetOne('SELECT ParentPath FROM '.TABLE_PREFIX.'Category WHERE CategoryId = '.$this->Application->GetVar('m_cat_id')); + } + return strpos($parent_path, $current_path) !== false; + } } Index: trunk/kernel/include/custommetadata.php =================================================================== diff -u -r5431 -r7635 --- trunk/kernel/include/custommetadata.php (.../custommetadata.php) (revision 5431) +++ trunk/kernel/include/custommetadata.php (.../custommetadata.php) (revision 7635) @@ -1,6 +1,6 @@ classname = 'clsCustomMetaData'; } - + function LoadResource($ResourceId) { // TO REMOVE } - + function DeleteResource($ResourceId, $main_prefix) { if (!$ResourceId) return false; - + $custom_table = $this->Application->getUnitOption($main_prefix.'-cdata', 'TableName'); $sql = 'DELETE FROM '.$custom_table.' WHERE ResourceId = '.$ResourceId; $this->adodbConnection->Execute($sql); } - + function CopyResource($OldId,$NewId, $main_prefix) { $custom_data =& $this->Application->recallObject($main_prefix.'-cdata.-item', null, Array('skip_autoload' => true)); $custom_data->Load($OldId, 'ResourceId'); - + if ($custom_data->isLoaded()) { $custom_data->SetDBField('ResourceId', $NewId); $custom_data->Create(); } } - + function &SetFieldValue($FieldId,$ResourceId,$Value) { // so strange construction used, because in normal // way it doesn't work at all (gets item copy not // pointer) $index = $this->GetDataItem($FieldId, true); - + if($index !== false) { $d =& $this->Items[$index]; @@ -70,7 +70,7 @@ { $d = null; } - + if(is_object($d)) { $d->Set('Value', $Value); @@ -83,7 +83,7 @@ $this->Items[$x]->Set("CustomFieldId",0); break; } - } + } $d->Delete(true); } } @@ -108,49 +108,58 @@ { $d =& $this->GetItemRefByIndex($i); if($d->Get("CustomFieldId")==$id) - { + { $found=TRUE; break; - } + } } return $found ? ($return_index ? $i : $d) : false; } - function SaveData($main_prefix, $resource_id) - { - // to call OnAfterConfigRead event - $item_table = $this->Application->getUnitOption($main_prefix, 'TableName'); - - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - $custom_data =& $this->Application->recallObject($main_prefix.'-cdata', null, Array('skip_autoload' => true)); - $custom_data->Load($resource_id, 'ResourceId'); - - foreach($this->Items as $f) { - $custom_id = $f->Get('CustomFieldId'); - $value = isset($GLOBALS['_CopyFromEditTable']) ? $f->Get('Value') : stripslashes($f->Get('Value')); - - $custom_name = $ml_formatter->LangFieldName('cust_'.$custom_id); - $custom_data->SetDBField($custom_name, $value); - } - - $custom_data->SetDBField('ResourceId', $resource_id); - return $custom_data->isLoaded() ? $custom_data->Update() : $custom_data->Create(); - } + function SaveData($main_prefix, $resource_id) + { + // to call OnAfterConfigRead event + $item_table = $this->Application->getUnitOption($main_prefix, 'TableName'); + $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); + $custom_data =& $this->Application->recallObject($main_prefix.'-cdata', null, Array('skip_autoload' => true)); + $custom_data->Load($resource_id, 'ResourceId'); + + foreach($this->Items as $f) { + $custom_id = $f->Get('CustomFieldId'); + $value = isset($GLOBALS['_CopyFromEditTable']) ? $f->Get('Value') : stripslashes($f->Get('Value')); + + $custom_name = $ml_formatter->LangFieldName('cust_'.$custom_id); + $custom_data->SetDBField($custom_name, $value); + } + + $custom_data->SetDBField('ResourceId', $resource_id); + return $custom_data->isLoaded() ? $custom_data->Update() : $custom_data->Create(); + } + function &getTempHandler($prefix) { if (strlen($prefix) > 2 || strlen($prefix) == 0) { // not e.g. bb, c, u, but CustomFieldId :) or empty at all $this->Application->reportError(get_class($this), 'CopyToEditTable'); } - + $temp_handler =& $this->Application->recallObject($prefix.'-cdata_TempHandler', 'kTempTablesHandler'); return $temp_handler; } - + function CopyToEditTable($main_prefix, $idlist) { $temp_handler =& $this->getTempHandler($main_prefix); + $tables = $temp_handler->Tables; + $parent_prefix = $this->Application->getUnitOption($main_prefix.'-cdata', 'ParentPrefix'); + if ($parent_prefix) { + $tables['ForeignKey'] = $this->Application->getUnitOption($main_prefix.'-cdata', 'ForeignKey'); + $tables['ParentPrefix'] = $parent_prefix; + $tables['ParentTableKey'] = $this->Application->getUnitOption($main_prefix.'-cdata', 'ParentTableKey'); + } + $temp_handler->Tables = $tables; + $temp_handler->DoCopyLiveToTemp($temp_handler->Tables, $idlist); } @@ -165,9 +174,9 @@ $temp_handler =& $this->getTempHandler($main_prefix); $temp_handler->CancelEdit(); } - + function CreateEmptyEditTable($main_prefix) - { + { $temp_handler =& $this->getTempHandler($main_prefix); $temp_handler->DoCopyLiveToTemp($temp_handler->Tables, Array(0)); } Index: trunk/core/admin_templates/catalog/item_selector/item_selector_toolbar.tpl =================================================================== diff -u -r7391 -r7635 --- trunk/core/admin_templates/catalog/item_selector/item_selector_toolbar.tpl (.../item_selector_toolbar.tpl) (revision 7391) +++ trunk/core/admin_templates/catalog/item_selector/item_selector_toolbar.tpl (.../item_selector_toolbar.tpl) (revision 7635) @@ -31,7 +31,7 @@ set_hidden_field('selected_ids[' + $prefix + ']', Grids[$Catalog.ActivePrefix].GetSelected()); - submit_event('', 'OnProcessSelected'); + submit_event('', 'OnProcessSelected'); } ) ); a_toolbar.AddButton( new ToolBarButton('cancel', '', function() { Index: trunk/core/units/general/helpers/multilanguage.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/general/helpers/multilanguage.php (.../multilanguage.php) (revision 7391) +++ trunk/core/units/general/helpers/multilanguage.php (.../multilanguage.php) (revision 7635) @@ -79,6 +79,18 @@ $this->curIndexCount = count($this->Conn->Query('SHOW INDEXES FROM '.$table_name)); // } } + + /** + * Checks if table exists in database + * + * @param string $table_name + * @return bool + */ + function tableExists($table_name) + { + $sql = 'SHOW TABLES LIKE "'.$table_name.'"'; + return $this->Conn->Query($sql) ? true : false; + } /** * Creates missing multilanguage fields in table by specified prefix @@ -95,7 +107,7 @@ $table_name = $this->Application->getUnitOption($prefix, 'TableName'); $this->curFields = $this->Application->getUnitOption($prefix, 'Fields'); - if (!($table_name && $this->curFields) ) { + if (!($table_name && $this->curFields) || ($table_name && !$this->tableExists($table_name))) { // invalid config found or prefix not found return true; } Index: trunk/core/units/general/helpers/mod_rewrite_helper.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/general/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 7391) +++ trunk/core/units/general/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 7635) @@ -74,7 +74,7 @@ { $category_path = trim($category_path.'/'.$url_part, '/'); - if( preg_match('/(.*)_([\d]+)$/', $category_path, $rets) ) + if( !preg_match('/^bb_[\d]+/', $url_part) && preg_match('/(.*)_([\d]+)$/', $category_path, $rets) ) { $category_path = $rets[1]; $vars['m_cat_page'] = $rets[2]; @@ -303,9 +303,9 @@ $sql = 'SELECT CategoryId FROM '.TABLE_PREFIX.'Category WHERE - NamedParentPath = '.$this->Conn->qstr($template_path).' + LOWER(NamedParentPath) = '.$this->Conn->qstr($template_path).' AND - Status = 1'; + Status IN (1,4) '; $template_found = $this->Conn->GetRow($sql); if ($template_found) { @@ -385,7 +385,7 @@ } $vars = array(); - $url_parts = $url ? explode('/', $url) : Array(); + $url_parts = $url ? explode('/', trim($url, '/')) : Array(); $process_module = true; if($this->HTTPQuery->Get('rewrite') == 'on' || !$url_parts) Index: trunk/admin/editor/cmseditor/editor/dialog/fck_document/excel.gif =================================================================== diff -u Binary files differ Index: trunk/admin/editor/cmseditor/editor/dialog/fck_document/doc.gif =================================================================== diff -u Binary files differ Index: trunk/kernel/include/itemreview.php =================================================================== diff -u -r3983 -r7635 --- trunk/kernel/include/itemreview.php (.../itemreview.php) (revision 3983) +++ trunk/kernel/include/itemreview.php (.../itemreview.php) (revision 7635) @@ -4,17 +4,17 @@ { $count = 0; $sql = "SELECT count(*) as DupCount FROM $SourceTable WHERE IPAddress='$ip' and ItemId=$id"; - $adodbConnection = &GetADODBConnection(); + $adodbConnection = &GetADODBConnection(); $rs = $adodbConnection->Execute($sql); if($rs) { $count = $rs->fields["DupCount"]; } - return ($count>0); + return ($count>0); } RegisterPrefix("clsItemReview","review","kernel/include/itemreview.php"); - + class clsItemReview extends clsParsedItem { function clsItemReview($ReviewId=NULL,$table="ItemReview") @@ -46,25 +46,25 @@ $Errors->AddError("error.fieldIsRequired",'ReviewText',"","",get_class($this),"Validate"); $dataValid = false; } - + if(!isset($this->m_Pending)) { $Error->AddError("error.fieldIsRequired",'Pending',"","",get_class($this),"Validate"); $dataValid = false; } - + if(!isset($this->m_IPAddress)) { $Error->AddError("error.fieldIsRequired",'IPAddress',"","",get_class($this),"Validate"); $dataValid = false; } - + if(!isset($this->m_ItemId)) { $Error->AddError("error.fieldIsRequired",'ItemId',"","",get_class($this),"Validate"); $dataValid = false; } - + if(!isset($this->m_CreatedById)) { $Error->AddError("error.fieldIsRequired",'CreatedBy',"","",get_class($this),"Validate"); @@ -83,7 +83,7 @@ $Errors->AddError("error.AppError",NULL,'Internal error: LoadFromDatabase id',"",get_class($this),"LoadFromDatabase"); return false; } - + $sql = sprintf("SELECT * FROM ".$this->tablename." WHERE ReviewId = '%s'",$Id); if( $GLOBALS['debuglevel'] ) echo $sql."
"; $result = $this->adodbConnection->Execute($sql); @@ -97,8 +97,8 @@ $this->SetFromArray($data); $this->Clean(); return TRUE; - } - + } + function MoveUp() { $this->Increment("Priority"); @@ -110,14 +110,14 @@ } function ParseObject($element) - { + { global $objConfig, $objCatList, $rootURL, $objUsers, $objModules; $extra_attribs = ExtraAttributes($element->attributes); - + if(strtolower($element->name)==$this->TagPrefix) - { - $field = strtolower($element->attributes["_field"]); + { + $field = strtolower($element->attributes["_field"]); switch($field) { case 'itemname': @@ -126,25 +126,25 @@ $module_info=$module_info[$this->Get('Module')]; $ret=$db->GetOne('SELECT '.$module_info['ItemNameField'].' FROM '.GetTablePrefix().$module_info['MainTable'].' WHERE ResourceId='.$this->Get('ItemId')); break; - + case 'itemlink': $db=&GetADODBConnection(); $module_info=$objModules->ExecuteFunction('GetModuleInfo','rel_list'); $module_info=$module_info[$this->Get('Module')]; $prefix=$db->GetOne('SELECT Var FROM '.$objModules->SourceTable.' WHERE Name=\''.$this->Get('Module').'\''); - + $id=$db->GetOne('SELECT '.$module_info['MainTable'].'Id FROM '.GetTablePrefix().$module_info['MainTable'].' WHERE ResourceId='.$this->Get('ItemId')); $GLOBALS[$prefix.'_var_list_update'][ $module_info['EnvIDField'] ]=$id; - + /*$env_unparsed=explode(':',$_REQUEST['env']); m_ParseEnv($tmp[1]);*/ - + $url=rtrim(GetIndexUrl(2),'index.php'); - + $ret = $url.strtolower($this->Get('Module')).'/admin/'.$module_info['EditFile'].'?env='.BuildEnv(); unset($GLOBALS[$prefix.'_var_list_update'][ $module_info['EnvIDField'] ]); break; - + case "id": /* @field:review.id @@ -168,17 +168,17 @@ { $ret = inp_htmlize($this->Get("ReviewText")); } - else + else { $ret = $this->Get("ReviewText"); } - + $cut_first_chars=$element->GetAttributeByName('_CutFirst'); if($cut_first_chars && strlen($ret)>$cut_first_chars) { $ret=substr($ret,0,$cut_first_chars).' ...'; } - break; + break; case "ip": /* @field:review.ip @@ -192,23 +192,23 @@ @description: Returns the review pening status */ $ret = $this->Get("Pending"); - break; + break; case "item_type": /* @field:review.item_type @description:Returns the name of the reviewed item type */ $type =& $objItemTypes->GetItem($this->Get("ItemType")); if(is_object($type)) - $ret = $type->Get("ItemName"); + $ret = $type->Get("ItemName"); break; case "date": /* @field:review.date @description:Returns the date/time the review was created @attrib:_tz:bool:Convert the date to the user's local time @attrib:_part::Returns part of the date. The following options are available: month,day,year,time_24hr,time_12hr - */ + */ $d = $this->Get("CreatedOn"); if($element->GetAttributeByName('_tz')) { @@ -221,9 +221,9 @@ $ret = ExtractDatePart($part,$d); } else - { + { if($d<=0) - { + { $ret = ""; } else @@ -243,18 +243,18 @@ } if($this->Get("CreatedById")>0) { - $u =& $objUsers->GetItem($this->Get("CreatedById")); - $e = new clsHtmlTag(); + $u =& $objUsers->GetItem($this->Get("CreatedById")); + $e = new clsHtmlTag(); $e->name = $u->TagPrefix; $e->attributes = $element->attributes; $e->attributes["_field"] = $userfield; $ret = $u->ParseObject($e); } - else + else if($userfield=="login") $ret = "root"; break; - + case "admin_icon": if( $element->GetAttributeByName('fulltag') ) { @@ -265,7 +265,7 @@ $ret = $this->StatusIcon(); } break; - + default: $tag = $this->TagPrefix."_".$field; $ret = "Undefined: ".$tag->name; @@ -274,7 +274,7 @@ } else { - $ret = $element->Execute(); + $ret = $element->Execute(); } return $ret; } @@ -290,26 +290,26 @@ $ret .= "icon16_review_disabled.gif"; break; case STATUS_PENDING: - $ret .= "icon16_review_pending.gif"; + $ret .= "icon16_review_pending.gif"; break; case STATUS_ACTIVE: $ret .= "icon16_review.gif"; break; } return $ret; } - + function parsetag($tag) - { + { global $objConfig, $objUsers, $objItemTypes; if(is_object($tag)) - { + { $tagname = $tag->name; } else $tagname = $tag; switch($tagname) - { + { case "review_id": return $this->Get("ReviewId"); break; @@ -318,13 +318,13 @@ break; case "review_text": return $this->Get("ReviewText"); - break; + break; case "review_ip_address": return $this->Get("IPAddress"); break; case "review_pending": return $this->Get("Pending"); - break; + break; case "review_item_type": $type =& $objItemTypes->GetItem($this->Get("ItemType")); $res = $type->Get("ItemName"); @@ -333,7 +333,7 @@ case "review_created_date": return LangDate($this->Get('CreatedOn'), 0, true); break; - + case "review_created_time": if ($this->Get('CreatedOn') <= 0) { return ''; @@ -343,10 +343,10 @@ case "review_created_date_month": return adodb_date("m", $this->Get("CreatedOn")); - break; + break; case "review_created_date_day": return adodb_date("d", $this->Get("CreatedOn")); - break; + break; case "review_created_date_year": return adodb_date("Y", $this->Get("CreatedOn")); break; @@ -368,7 +368,15 @@ { global $objItemTypes, $objMessageList; - $type =& $objItemTypes->GetItem($this->Get("ItemType")); + $types = array( + 'In-Link' => 4, + 'In-Bulletin' => 3, + 'In-Commerce' => 11, + 'In-News' => 2, + ); + $type_id = $types[$this->Get('Module')]; + + $type =& $objItemTypes->GetItem($type_id); $res = $type->Get("ItemName"); $EventName = $res.$Suffix; @@ -378,7 +386,7 @@ if($Event->Get("Enabled")=="1") { $Event->Item = $this; - return $Event->SendToUser($ToUserId); + return $Event->SendToUser($ToUserId); } } } @@ -387,7 +395,16 @@ { global $objItemTypes, $objMessageList; - $type =& $objItemTypes->GetItem($this->Get("ItemType")); + $types = array( + 'In-Link' => 4, + 'In-Bulletin' => 3, + 'In-Commerce' => 11, + 'In-News' => 2, + ); + $type_id = $types[$this->Get('Module')]; + + $type =& $objItemTypes->GetItem($type_id); + $res = $type->Get("ItemName"); $EventName = $res; //.$Suffix; @@ -427,7 +444,7 @@ { $GLOBALS['m_var_list']['reviews_page']=$this->Page; } - + function ItemCount() { return $this->NumItems(); @@ -461,7 +478,7 @@ if($TodayOnly) { $today = adodb_mktime(0,0,0,adodb_date('m'),adodb_date('d'),adodb_date('Y')); - $sql .= ' AND CreatedOn >= '.$today; + $sql .= ' AND CreatedOn >= '.$today; } return (int)$this->adodbConnection->GetOne($sql); } @@ -508,49 +525,49 @@ $Priority, $ItemId,$ItemType,$CreatedById,$TextFormat=0,$Module) { global $objSession; - - $r = new clsItemReview(NULL,$this->SourceTable); - - $ReviewText = str_replace("env=".$objSession->GetSessionKey(), "env=",$ReviewText); + + $r = new clsItemReview(NULL,$this->SourceTable); + + $ReviewText = str_replace("env=".$objSession->GetSessionKey(), "env=",$ReviewText); //$r->debuglevel = 1; $r->Set(array("CreatedOn","ReviewText","Status", "IPAddress", "Priority","ItemId","ItemType","CreatedById","TextFormat","Module"), array($CreatedOn,$ReviewText,$Status, $IPAddress, - $Priority, $ItemId,$ItemType,$CreatedById,$TextFormat,$Module)); - $r->Create(); + $Priority, $ItemId,$ItemType,$CreatedById,$TextFormat,$Module)); + $r->Create(); array_push($this->Items,$r); if($Status==1) { $r->SendUserEventMail("REVIEW.ADD",$CreatedById); - $r->SendAdminEventMail("REVIEW.ADD"); + $r->SendAdminEventMail("REVIEW.ADD"); } else { $r->SendUserEventMail("REVIEW.ADD.PENDING",$CreatedById); - $r->SendAdminEventMail("REVIEW.ADD.PENDING"); + $r->SendAdminEventMail("REVIEW.ADD.PENDING"); } return $r; } - function EditReview($ReviewId,$CreatedOn,$ReviewText, $Status, + function EditReview($ReviewId,$CreatedOn,$ReviewText, $Status, $IPAddress, $Priority, $ItemId,$ItemType,$CreatedById,$TextFormat,$Module='') { global $objSession; - + $r = $this->GetItem($ReviewId); if($CreatedById==0) $CreatedById = $r->Get("CreatedById"); - $r->Set(array("ReviewId","CreatedOn","ReviewText","Status", + $r->Set(array("ReviewId","CreatedOn","ReviewText","Status", "IPAddress", "Priority", "ItemId","ItemType","CreatedById","TextFormat"), array($ReviewId,$CreatedOn,$ReviewText,$Status, $IPAddress, $Priority, $ItemId,$ItemType,$CreatedById,$TextFormat)); if($Module) $r->Set('Module',$Module); - + $r->Update(); //$r->SendUserEventMail("REVIEW.MODIFY",$objSession->Get("PortalUserId")); - $r->SendAdminEventMail("REVIEW.MODIFY"); + $r->SendAdminEventMail("REVIEW.MODIFY"); return $r; } @@ -584,7 +601,7 @@ $idlist = array(); $sql = 'SELECT * FROM '.$edit_table; $this->Clear(); - + // get all items in edit-table $rs = $this->adodbConnection->Execute($sql); while($rs && !$rs->EOF) @@ -593,18 +610,18 @@ $c = $this->AddItemFromArray($data); $c->Dirty(); $c->Update(); - + $idlist[] = $c->Get("ReviewId"); $rs->MoveNext(); } - + //echo "DEL REVIEW SQL: $sql
"; - + $this->PurgeEditTable(); - + unset($GLOBALS['_CopyFromEditTable']); } - + function CopyFromEditTable($ResourceId, $saveEditTable = false) { global $objSession; @@ -639,9 +656,9 @@ $sql = "DELETE FROM ".$this->SourceTable." WHERE ItemId=$ResourceId ".(count($idlist) > 0 ? "AND ReviewId NOT IN (".implode(",",$idlist).")" : ""); //echo "DEL REVIEW SQL: $sql
"; $this->adodbConnection->Execute($sql); - + if(!$saveEditTable) $this->PurgeEditTable(); - + unset($GLOBALS['_CopyFromEditTable']); } @@ -650,8 +667,8 @@ $edit_table = $GLOBALS['objSession']->GetEditTable($this->SourceTable); @$this->adodbConnection->Execute("DROP TABLE IF EXISTS ".$edit_table); } - + function GetPageLinkList(&$UpdateVar,$dest_template=NULL,$page = NULL,$PagesToList=10,$HideEmpty=TRUE) { global $objConfig, $var_list_update, $var_list; @@ -716,26 +733,26 @@ $UpdateVar["rp"]=$this->Page+$PagesToList; $next_url = HREF_Wrapper(); $o .= " >>"; - } + } unset($UpdateVar,$var_list_update["t"] ); - return $o; + return $o; } - + function AdminPrintItems($template) { // prints item listing for admin (browse/advanced view) tabs $o = '
+ - - - + + + - - - - - - - + + + + + + + Index: trunk/core/units/groups/groups_event_handler.php =================================================================== diff -u -r6625 -r7635 --- trunk/core/units/groups/groups_event_handler.php (.../groups_event_handler.php) (revision 6625) +++ trunk/core/units/groups/groups_event_handler.php (.../groups_event_handler.php) (revision 7635) @@ -9,9 +9,28 @@ */ function SetCustomQuery(&$event) { - if ($event->Special == 'total') { $object =& $event->getObject(); + /* @var $object kDBList */ + + switch ($event->Special) { + case 'total': $object->AddGroupByField('%1$s.GroupId'); + break; + + case 'user': + $user_id = $this->Application->GetVar('u_id'); + if ($user_id !== false) { + // show only groups, that user doesn't belong to + $table_name = $this->Application->GetTempName(TABLE_PREFIX.'UserGroup', 'prefix:u'); + $sql = 'SELECT GroupId + FROM '.$table_name.' + WHERE PortalUserId = '.$user_id; + $group_ids = $this->Conn->GetCol($sql); + array_push($group_ids, 14, 15); // Guest & Everyone groups are set dynamically + + $object->addFilter('already_member_filter', '%1$s.GroupId NOT IN ('.implode(',', $group_ids).')'); + } + break; } } } Index: trunk/core/units/general/helpers/modules.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/general/helpers/modules.php (.../modules.php) (revision 7391) +++ trunk/core/units/general/helpers/modules.php (.../modules.php) (revision 7635) @@ -182,7 +182,7 @@ else { $modules = array_keys($this->Application->ModuleInfo); } - array_push($modules, 'Proj-base', 'Proj-CMS', 'Custom'); + array_push($modules, 'Core', 'Proj-base', 'Proj-CMS', 'Custom'); return $modules; } Index: trunk/core/kernel/db/db_event_handler.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 7391) +++ trunk/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 7635) @@ -104,6 +104,10 @@ 'OnMassDelete' => Array('self' => 'delete', 'subitem' => 'add|edit'), 'OnMassClone' => Array('self' => 'add', 'subitem' => 'add|edit'), + 'OnCut' => array('self'=>'edit', 'subitem' => 'edit'), + 'OnCopy' => array('self'=>'edit', 'subitem' => 'edit'), + 'OnPaste' => array('self'=>'edit', 'subitem' => 'edit'), + 'OnSelectItems' => Array('self' => 'add|edit', 'subitem' => 'add|edit'), 'OnProcessSelected' => Array('self' => 'add|edit', 'subitem' => 'add|edit'), 'OnSelectUser' => Array('self' => 'add|edit', 'subitem' => 'add|edit'), @@ -131,6 +135,7 @@ 'OnSetFilter' => Array('self' => true, 'subitem' => true), 'OnApplyFilters' => Array('self' => true, 'subitem' => true), 'OnRemoveFilters' => Array('self' => true, 'subitem' => true), + 'OnSetFilterPattern' => Array('self' => true, 'subitem' => true), 'OnSetPerPage' => Array('self' => true, 'subitem' => true), @@ -465,6 +470,7 @@ function OnListBuild(&$event) { $object =& $event->getObject(); + /* @var $object kDBList */ $this->dbBuild($object,$event); @@ -790,24 +796,33 @@ { $cur_sort1 = $this->Application->RecallVar($event->Prefix_Special.'_Sort1'); $cur_sort1_dir = $this->Application->RecallVar($event->Prefix_Special.'_Sort1_Dir'); - $cur_sort2 = $this->Application->RecallVar($event->Prefix_Special.'_Sort2'); - $cur_sort2_dir = $this->Application->RecallVar($event->Prefix_Special.'_Sort2_Dir'); + $use_double_sorting = $this->Application->ConfigValue('UseDoubleSorting') !== false ? $this->Application->ConfigValue('UseDoubleSorting') : true; + + if ($use_double_sorting) { + $cur_sort2 = $this->Application->RecallVar($event->Prefix_Special.'_Sort2'); + $cur_sort2_dir = $this->Application->RecallVar($event->Prefix_Special.'_Sort2_Dir'); + } + $passed_sort1 = $this->Application->GetVar($event->getPrefixSpecial(true).'_Sort1'); if ($cur_sort1 == $passed_sort1) { $cur_sort1_dir = $cur_sort1_dir == 'asc' ? 'desc' : 'asc'; } else { - $cur_sort2 = $cur_sort1; - $cur_sort2_dir = $cur_sort1_dir; + if ($use_double_sorting) { + $cur_sort2 = $cur_sort1; + $cur_sort2_dir = $cur_sort1_dir; + } $cur_sort1 = $passed_sort1; $cur_sort1_dir = 'asc'; } $this->Application->StoreVar($event->Prefix_Special.'_Sort1', $cur_sort1); $this->Application->StoreVar($event->Prefix_Special.'_Sort1_Dir', $cur_sort1_dir); - $this->Application->StoreVar($event->Prefix_Special.'_Sort2', $cur_sort2); - $this->Application->StoreVar($event->Prefix_Special.'_Sort2_Dir', $cur_sort2_dir); + if ($use_double_sorting) { + $this->Application->StoreVar($event->Prefix_Special.'_Sort2', $cur_sort2); + $this->Application->StoreVar($event->Prefix_Special.'_Sort2_Dir', $cur_sort2_dir); + } } /** Index: trunk/core/kernel/utility/formatters/formatter.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/utility/formatters/formatter.php (.../formatter.php) (revision 7391) +++ trunk/core/kernel/utility/formatters/formatter.php (.../formatter.php) (revision 7635) @@ -18,7 +18,13 @@ { $field_type = $options['type']; $type_ok = preg_match('#int|integer|double|float|real|numeric|string#', $field_type); - if($field_type == 'string') return $value; + if ($field_type == 'string') { + if (!$this->Application->IsAdmin() && isset($options['allow_html']) && $options['allow_html']) { + // this allows to revert htmlspecialchars call for each field submitted on front-end + $value = unhtmlentities($value); + } + return $value; + } static $comma = null; static $thousands = null; @@ -46,6 +52,19 @@ return $ret ? $value : false; } + function TypeCastArray($src, &$object) + { + $dst = array(); + foreach ($src as $id => $row) { + $tmp_row = array(); + foreach ($row as $fld => $value) { + $tmp_row[$fld] = $this->TypeCast($value, $object->Fields[$fld]); + } + $dst[$id] = $tmp_row; + } + return $dst; + } + //function Format($value, $options, &$errors) function Format($value, $field_name, &$object, $format=null) { Index: trunk/core/admin_templates/users/group_selector.tpl =================================================================== diff -u --- trunk/core/admin_templates/users/group_selector.tpl (revision 0) +++ trunk/core/admin_templates/users/group_selector.tpl (revision 7635) @@ -0,0 +1,46 @@ + + + + + + + + +
Search:  Index: trunk/admin/editor/cmseditor/editor/dialog/fck_document.html =================================================================== diff -u -r7363 -r7635 --- trunk/admin/editor/cmseditor/editor/dialog/fck_document.html (.../fck_document.html) (revision 7363) +++ trunk/admin/editor/cmseditor/editor/dialog/fck_document.html (.../fck_document.html) (revision 7635) @@ -7,7 +7,7 @@ - +
@@ -61,19 +61,19 @@ - + - +
PopUp Width:        PopUp Height:   
 
@@ -82,13 +82,13 @@
    ICON
Word PDF Image Excel PowerPoint Audio Video Word PDF Image Excel PowerPoint Audio Video      
+ + + + + +
+ + +
+ + + + \ No newline at end of file Index: trunk/core/install/step_templates/upgrade_modules.tpl =================================================================== diff -u --- trunk/core/install/step_templates/upgrade_modules.tpl (revision 0) +++ trunk/core/install/step_templates/upgrade_modules.tpl (revision 7635) @@ -0,0 +1,31 @@ + +
+ + + + + +
+
+ + Your data will be modified during the upgrade. We strongly recommend that you make a backup of your database. Proceed with the upgrade ? +
'; - + $i = 1; - + $topleft = 0; $topright = 0; $rightcount = 0; $total_items = $this->NumItems(); $topleft = ceil($total_items / 2); $topright = $total_items - $topleft; - - for($x = 0; $x < $topleft; $x++) + + for($x = 0; $x < $topleft; $x++) { //printingleft $item = $this->Items[$x]; @@ -746,13 +763,13 @@ } $o .= $item->AdminParseTemplate($template); $i++; - + //printingright - if ($rightcount < $topright && ( ($x + $topleft) < $total_items) ) + if ($rightcount < $topright && ( ($x + $topleft) < $total_items) ) { $item = $this->Items[ $x + $topleft ]; if ($i > 2) - { + { $o.="\n"; $i = 1; } @@ -761,7 +778,7 @@ $rightcount++; } } - $o .= "\n
\n"; + $o .= "\n\n"; return $o; } Index: trunk/core/admin_templates/tree.tpl =================================================================== diff -u -r7391 -r7635 --- trunk/core/admin_templates/tree.tpl (.../tree.tpl) (revision 7391) +++ trunk/core/admin_templates/tree.tpl (.../tree.tpl) (revision 7635) @@ -73,9 +73,9 @@ - " onclick="" icon="img/icons/icon24_.gif"> + " priority="" onclick="" icon="img/icons/icon24_.gif"> - " onclick="" name="" icon="img/icons/icon24_.gif" load_url=""> + " priority="" onclick="" name="" icon="img/icons/icon24_.gif" load_url=""> @@ -85,9 +85,9 @@ + + + + + + + + + + + + + + @@ -83,10 +128,11 @@ - + + " id="" value=""> Index: trunk/core/admin_templates/incs/tab_blocks.tpl =================================================================== diff -u -r7391 -r7635 --- trunk/core/admin_templates/incs/tab_blocks.tpl (.../tab_blocks.tpl) (revision 7391) +++ trunk/core/admin_templates/incs/tab_blocks.tpl (.../tab_blocks.tpl) (revision 7635) @@ -15,7 +15,7 @@ - url(img/tab_active_back3.jpg) no-repeat top left;" cellpadding="0" cellspacing="0" border="0"> +
url(img/tab_active_back3.jpg) no-repeat top left;" cellpadding="0" cellspacing="0" border="0"> - + - + - + - + Index: trunk/core/kernel/utility/debugger/debugger.css =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/utility/debugger/debugger.css (.../debugger.css) (revision 7391) +++ trunk/core/kernel/utility/debugger/debugger.css (.../debugger.css) (revision 7635) @@ -73,22 +73,31 @@ } .dbg-toolbar { - background-color: #D4D0C8; border: 1px solid #000000; + background-color: #D4D0C8; width: auto; } -.dbg-button, .dbg-button:hover { +.dbg-toolbar td { font-size: 13px; - font-family: Arial, Helvetica; + font-family: Tahoma; + padding: 1px 5px 1px 5px; } -.dbg-button { - background-color: #D4D0C8; +.dbg-toolbar td.dbg-button { border: 1px solid #D4D0C8; + background-color: #D4D0C8; } -.dbg-button:hover { - background-color: #B5BDD2; +.dbg-toolbar td.dbg-button:hover { border: 1px solid #0A246A; -} \ No newline at end of file + background-color: #B5BDD2; +} + +.dbg-toolbar td.dbg-separator { + background-color: #000000; + width: 1px; + padding: 0px; +} + + Index: trunk/core/admin_templates/catalog/item_selector/item_selector_catalog.tpl =================================================================== diff -u -r6669 -r7635 --- trunk/core/admin_templates/catalog/item_selector/item_selector_catalog.tpl (.../item_selector_catalog.tpl) (revision 6669) +++ trunk/core/admin_templates/catalog/item_selector/item_selector_catalog.tpl (.../item_selector_catalog.tpl) (revision 7635) @@ -42,8 +42,8 @@ -
left.gif" width="15" height="23"> @@ -30,7 +30,7 @@ - url(img/tab_active_back3.jpg) no-repeat top left;" cellpadding="0" cellspacing="0" border="0"> +
url(img/tab_active_back3.jpg) no-repeat top left;" cellpadding="0" cellspacing="0" border="0"> '; + + if (this.ErrorsCount > 0) { + $toolbar_content += ''; + } + else { + $toolbar_content += ''; + } + + if (this.SQLCount > 0) { + $toolbar_content += ''; + } + + $span.innerHTML = '
left.gif" width="15" height="23"> @@ -45,7 +45,7 @@ - url(img/tab_active_back3.jpg) no-repeat top left;" cellpadding="0" cellspacing="0" border="0"> +
url(img/tab_active_back3.jpg) no-repeat top left;" cellpadding="0" cellspacing="0" border="0"> Application->isDebugMode() && constOn('DBG_PHRASES')) { list($edit_tpl, $index_file) = $this->Application->IsAdmin() ? Array('regional/phrases_edit', 'index.php') : Array('phrases_edit', 'index.php'); - $edit_url = $this->Application->HREF($edit_tpl,'',Array('m_opener'=>'d','phrases_label'=>$original_label,'phrases_event'=>'OnNew', 'pass'=>'all,phrases'), $index_file ); + if ($this->Application->IsAdmin() && $this->Application->ConfigValue('UsePopups')) { + // link to popup when using popups (only in admin) + $edit_url = 'javascript:translate_phrase(\''.addslashes($original_label).'\', \''.$edit_tpl.'\');'; + } + else { + // direct link, when not using popups OR on frontend + $edit_url = $this->Application->HREF($edit_tpl,'',Array('m_opener'=>'d','phrases_label'=>$original_label,'phrases_event'=>'OnNew', 'pass'=>'all,phrases'), $index_file ); + } + $translation = '!'.$label.'!'; if($this->fromTag) $translation = $this->escapeTagReserved($translation); } Index: trunk/core/kernel/utility/formatters/password_formatter.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/utility/formatters/password_formatter.php (.../password_formatter.php) (revision 7391) +++ trunk/core/kernel/utility/formatters/password_formatter.php (.../password_formatter.php) (revision 7635) @@ -17,6 +17,9 @@ if (isset($field_options['salt'])) { $options['salt'] = $field_options['salt']; } + if (isset($field_options['required'])) { + $options['required'] = $field_options['required']; + } $add_fields[ $field_options['verify_field'] ] = $options; $add_fields[$field_name.'_plain'] = Array('type'=>'string', 'error_field'=>$field_name); @@ -55,7 +58,7 @@ $fields = array_reverse($fields); $flip_count++; } - + $salt = isset($object->Fields[$password_field]['salt']) ? $object->Fields[$password_field]['salt'] : ''; if( getArrayValue($object->Fields[$password_field], 'verify_field_set') && getArrayValue($object->Fields[$verify_field], 'master_field_set') ) { Index: trunk/core/kernel/parser/template.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/parser/template.php (.../template.php) (revision 7391) +++ trunk/core/kernel/parser/template.php (.../template.php) (revision 7635) @@ -95,7 +95,7 @@ */ function GetTemplatePaths($filename) { - if (isset($this->Application->ReplacementTemplates[$filename])) { + if ($this->Application->IsAdmin() && isset($this->Application->ReplacementTemplates[$filename])) { $filename = $this->Application->ReplacementTemplates[$filename]; } Index: trunk/core/kernel/processors/tag_processor.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/processors/tag_processor.php (.../tag_processor.php) (revision 7391) +++ trunk/core/kernel/processors/tag_processor.php (.../tag_processor.php) (revision 7635) @@ -53,7 +53,7 @@ $backup_special = $this->Special; // process all possible flags: begin - $flags = Array('js_escape', 'result_to_var', 'pass_params'); + $flags = Array('js_escape', 'result_to_var', 'pass_params', 'html_escape'); $flag_values = Array(); foreach ($flags as $flag_name) { @@ -81,6 +81,9 @@ $ret = str_replace(Array("\r", "\n"), Array('\r', '\n'), $ret); $ret = str_replace('', "", $ret); } + if ($flag_values['html_escape']) { + $ret = htmlspecialchars($ret); + } if ($flag_values['result_to_var']) { $this->Application->Parser->SetParam($flag_values['result_to_var'], $ret); $ret = ''; @@ -107,6 +110,9 @@ } return $ret; } + if ($this->Application->isDebugMode()) { + $this->Application->Debugger->appendTrace(); + } trigger_error('Tag '.$Method.' Undefined in '.get_class($this).'[Agregated Tag]:
'.$tag.'', E_USER_WARNING); } trigger_error('Tag Undefined:
'.$prefix.':'.$tag.'',E_USER_WARNING); Index: trunk/core/admin_templates/modules/modules_list.tpl =================================================================== diff -u --- trunk/core/admin_templates/modules/modules_list.tpl (revision 0) +++ trunk/core/admin_templates/modules/modules_list.tpl (revision 7635) @@ -0,0 +1,56 @@ + + + + + + + + +
left.gif" width="15" height="23"> style="border-top: black 1px solid;" background="img/tab_back.gif"> Index: trunk/core/install/steps_db.xml =================================================================== diff -u -r6691 -r7635 --- trunk/core/install/steps_db.xml (.../steps_db.xml) (revision 6691) +++ trunk/core/install/steps_db.xml (.../steps_db.xml) (revision 7635) @@ -40,4 +40,7 @@ For example, if you moved them from one folder to another. It will update all settings and ensure the program is operational at the new location.

]]> + + + \ No newline at end of file Index: trunk/core/units/user_groups/user_groups_dbitem.php =================================================================== diff -u --- trunk/core/units/user_groups/user_groups_dbitem.php (revision 0) +++ trunk/core/units/user_groups/user_groups_dbitem.php (revision 7635) @@ -0,0 +1,29 @@ +getLinkedInfo(); + $keys_hash = Array( + $this->IDField => $this->ID, + $table_info['ForeignKey'] => $table_info['ParentId'], + ); + + return parent::GetKeyClause($method, $keys_hash); + } + + } + + +?> \ No newline at end of file Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -r4850 -r7635 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 4850) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 7635) @@ -177,7 +177,6 @@ { $this->processRewriteURL(); } - } else { $this->Application->VerifyLanguageId(); @@ -381,7 +380,7 @@ $this->Set('t', $t); } } - + function parseEnvPart($mixed_part) { // In-portal old style env conversion - adds '-' between prefix and first var @@ -412,7 +411,7 @@ } } } - + /** * Decides what template name to * use from $_GET or from $_POST Index: trunk/core/admin_templates/popups/editor.tpl =================================================================== diff -u -r7391 -r7635 --- trunk/core/admin_templates/popups/editor.tpl (.../editor.tpl) (revision 7391) +++ trunk/core/admin_templates/popups/editor.tpl (.../editor.tpl) (revision 7635) @@ -1,4 +1,4 @@ - + Index: trunk/kernel/include/globals.php =================================================================== diff -u -r7391 -r7635 --- trunk/kernel/include/globals.php (.../globals.php) (revision 7391) +++ trunk/kernel/include/globals.php (.../globals.php) (revision 7635) @@ -1961,31 +1961,31 @@ */ function saveCustomFields($prefix, $resource_id, $item_type) { - $objCustomEdit = new clsCustomDataList(); + $objCustomEdit = new clsCustomDataList(); $CustomFields = new clsCustomFieldList($item_type); - $data_changed = false; - for ($i = 0; $i < $CustomFields->NumItems(); $i++) { + $data_changed = false; + for ($i = 0; $i < $CustomFields->NumItems(); $i++) { $objField =& $CustomFields->GetItemRefByIndex($i); $field_name = $objField->Get('FieldName'); $element_type = $objField->Get('ElementType'); - + $value = getCustomValue($field_name); if ($element_type == 'checkbox' && $value === false) { // unchecked checkboxes are not submitted $value = 0; } - + if ($value !== false) { $objCustomEdit->SetFieldValue($objField->Get('CustomFieldId'), $resource_id, $value); $data_changed = true; } } - if ($data_changed) { - $objCustomEdit->SaveData($prefix, $resource_id); - } + if ($data_changed) { + $objCustomEdit->SaveData($prefix, $resource_id); + } } /** @@ -2004,7 +2004,7 @@ } return GetVar($field_name); } - + function checkActionPermission($action_mapping, $action, $system = 0) { $application =& kApplication::Instance(); Index: trunk/admin/install/langpacks/english.lang =================================================================== diff -u -r6797 -r7635 --- trunk/admin/install/langpacks/english.lang (.../english.lang) (revision 6797) +++ trunk/admin/install/langpacks/english.lang (.../english.lang) (revision 7635) @@ -1,10 +1,12 @@ - m/d/Yg:i:s Am/d/Yg:i:s A.,iso-8859-12 + m/d/Yg:i:s Am/d/Yg:i:s A,.iso-8859-12 WW91ciBwYXNzd29yZCBoYXMgYmVlbiByZXNldC4gWW91IHdpbGwgcmVjZWl2ZSB5b3VyIG5ldyBwYXNzd29yZCBpbiB0aGUgZW1haWwgc2hvcnRseS4= + QmxvY2sgU2hpcHBpbmcgQWRkcmVzcyBFZGl0aW5n QWN0aXZl QWRkZWQ= QWRkIFRv + QWRtaW5pc3RyYXRpdmUgQ29uc29sZQ== QWx3YXlz YW5k QWN0aXZl @@ -17,6 +19,7 @@ QXJ0aWNsZSBUaXRsZQ== QXV0bw== QXV0b21hdGlj + QXZhaWxhYmxlIENvbHVtbnM= QmFja2dyb3VuZA== QmFuIGVtYWlsIGFkZHJlc3M= QmFuIElQIGFkZHJlc3M= @@ -86,6 +89,7 @@ RHVyYXRpb24gVHlwZQ== RWZmZWN0aXZl RW1haWw= + Jm5ic3A7 RXZlbnQ= RmllbGQgTmFtZQ== Rmlyc3QgTmFtZQ== @@ -117,6 +121,9 @@ UHJpbWFyeSBHcm91cA== UHJpbWFyeSBWYWx1ZQ== RmllbGQgUHJvbXB0 + RGF0ZQ== + JA== + JQ== UmVsYXRpb24gVHlwZQ== UmV2aWV3ZWQgQnk= UmV2aWV3IFRleHQ= @@ -301,6 +308,7 @@ QWRkcmVzcyBMaW5l QWR2YW5jZWQgQ1NT QWx0IFZhbHVl + QXNzaWduZWQgQ291cG9u QXV0b21hdGljIEZpbGVuYW1l QXZhaWxhYmxlIENvbHVtbnM= QmFja2dyb3VuZA== @@ -392,8 +400,6 @@ TWFyZ2luIFRvcA== TWVzc2FnZSBCb2R5 TWVzc2FnZSBUeXBl - TWV0YSBEZXNjcmlwdGlvbg== - TWV0YSBLZXl3b3Jkcw== TW9kaWZpZWQ= TW9kdWxl TmFtZQ== @@ -459,6 +465,7 @@ SW4tbGluaw== SW5jb3JyZWN0IGRhdGEgZm9ybWF0LCBwbGVhc2UgdXNlIGludGVnZXI= TWlzc2luZyBvciBpbnZhbGlkIEluLVBvcnRhbCBMaWNlbnNl + SW52YWxpZCB1c2VybmFtZSBvciBwYXNzd29yZA== SW52YWxpZCBzdGF0ZQ== Q2F0ZWdvcmllcw== TGlua3M= @@ -583,6 +590,7 @@ Qm90aA== RnJvbnQ= RWRpdG9yJ3MgcGljaw== + U2VsZWN0ZWQgQ29sdW1ucw== UG9w UG9zaXRpb24gQW5kIFZpc2liaWxpdHk= TmV3IHBvc3RzIChkYXlzKQ== @@ -978,6 +986,7 @@ VGh1bWJuYWlsIEltYWdl VHJhbnNsYXRpb24= U2VhcmNoIFVzZXJz + U2VsZWN0IENvbHVtbnM= U2VsZWN0aW5nIENhdGVnb3JpZXM= RW1wdHkgc2VsZWN0aW9u T25lIGZpZWxkIGZvciBlYWNoIGNhdGVnb3J5IGxldmVs @@ -1325,8 +1334,10 @@ U2VsZWN0IHJlbGF0aW9u U2VsZWN0IGNhdGVnb3J5 Q2Vuc29yc2hpcA== + Q29sdW1uIFBpY2tlcg== Q29tbXVuaXR5 Q29uZmlndXJhdGlvbg== + Q291cG9uIFNlbGVjdG9y Q3VzdG9t Q3VzdG9tIEZpZWxkcw== RG9uZQ== @@ -1667,8 +1678,6 @@ UGFzc3dvcmQgcmVzZXQgY29kZSBpcyBub3QgdmFsaWQ= UHJpY2VzIG9mIG9uZSBvciBtb3JlIGl0ZW1zIGluIHlvdXIgc2hvcHBpbmcgY2FydCBoYXZlIGJlZW4gY2hhbmdlZCBkdWUgdG8geW91ciBsb2dpbiwgcGxlYXNlIHJldmlldyBjaGFuZ2VzLg== RW1haWxBZGRyZXNz - QWRkaXRpb25hbCBJbWFnZXM= - QURESVRJT05BTCBJTUFHRVM= Tm8gUGVybWlzc2lvbnM= UHJvZHVjdCBEZXNjcmlwdGlvbg== Q29tcGFueQ== @@ -2339,7 +2348,7 @@ WC1Qcmlvcml0eTogMQ0KWC1NU01haWwtUHJpb3JpdHk6IEhpZ2gNClgtTWFpbGVyOiBJbi1Qb3J0YWwKU3ViamVjdDogVGhlIHNpdGUgaGFzIGJlZW4gc3VnZ2VzdGVkCgpBIHZpc2l0b3Igc3VnZ2VzdGVkIHlvdXIgc2l0ZSB0byBhIGZyaWVuZC4= WC1Qcmlvcml0eTogMQ0KWC1NU01haWwtUHJpb3JpdHk6IEhpZ2gNClgtTWFpbGVyOiBJbi1Qb3J0YWwKU3ViamVjdDogWW91IGhhdmUgYmVlbiB1bnN1YnNjcmliZWQKCllvdSBoYXZlIHN1Y2Nlc3NmdWxseSB1bnN1YnNyaWJlZCBmcm9tIDxpbnA6bV9wYWdlX3RpdGxlIC8+IG1haWxpbmcgbGlzdC4= WC1Qcmlvcml0eTogMQ0KWC1NU01haWwtUHJpb3JpdHk6IEhpZ2gNClgtTWFpbGVyOiBJbi1Qb3J0YWwKU3ViamVjdDogVXNlciB1bnN1YnNyaWJlZAoKQSB1c2VyIGhhcyB1bnN1YnNjcmliZWQu - WC1Qcmlvcml0eTogMQ0KWC1NU01haWwtUHJpb3JpdHk6IEhpZ2gNClgtTWFpbGVyOiBJbi1Qb3J0YWwKU3ViamVjdDogSW4tcG9ydGFsIHJlZ2lzdHJhdGlvbgoKV2VsY29tZSB0byBJbi1wb3J0YWwhDQpZb3VyIHVzZXIgcmVnaXN0cmF0aW9uIGhhcyBiZWVuIGFwcHJvdmVkLiBZb3VyIHVzZXIgbmFtZSBpcyAiPGlucDp0b3VzZXIgX0ZpZWxkPSJVc2VyTmFtZSIgLz4iIGFuZCB5b3VyIHBhc3N3b3JkIGlzICI8aW5wOnRvdXNlciBfRmllbGQ9InBhc3N3b3JkIiAvPiIuDQo= + WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEluLXBvcnRhbCByZWdpc3RyYXRpb24KCldlbGNvbWUgdG8gSW4tcG9ydGFsIQ0KWW91ciB1c2VyIHJlZ2lzdHJhdGlvbiBoYXMgYmVlbiBhcHByb3ZlZC4gWW91ciB1c2VyIG5hbWUgaXMgIjxpbnA6dG91c2VyIF9GaWVsZD0iVXNlck5hbWUiIC8+IiBhbmQgeW91ciBwYXNzd29yZCBpcyAiPGlucDp0b3VzZXIgX0ZpZWxkPSJwYXNzd29yZCIgLz4iLg0K WC1Qcmlvcml0eTogMQ0KWC1NU01haWwtUHJpb3JpdHk6IEhpZ2gNClgtTWFpbGVyOiBJbi1Qb3J0YWwKU3ViamVjdDogVXNlciB2YWxpZGF0ZWQKClVzZXIgIjxpbnA6dG91c2VyIF9GaWVsZD0iVXNlck5hbWUiIC8+IiBoYXMgYmVlbiB2YWxpZGF0ZWQu Index: trunk/core/kernel/event_manager.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/event_manager.php (.../event_manager.php) (revision 7391) +++ trunk/core/kernel/event_manager.php (.../event_manager.php) (revision 7635) @@ -196,20 +196,20 @@ { $unit_config_reader =& $this->Application->recallObject('kUnitConfigReader'); $unit_config_reader->loadConfig($event->Prefix); + if( !$this->Application->prefixRegistred($event->Prefix) ) + { + trigger_error('Prefix '.$event->Prefix.' not registred (requested event '.$event->Name.')', E_USER_NOTICE); + return false; + } } - if( !$this->Application->prefixRegistred($event->Prefix) ) - { - trigger_error('Prefix '.$event->Prefix.' not registred (requested event '.$event->Name.')', E_USER_NOTICE); - return false; - } - if (!$event->SkipBeforeHooks) { $this->processHooks($event, hBEFORE); if ($event->status == erFATAL) return true; } $event_handler =& $this->Application->recallObject($event->Prefix.'_EventHandler'); + /* @var $event_handler kEventHandler */ $event_handler->processEvent($event); if ($event->status == erFATAL) return true; @@ -218,7 +218,6 @@ } $this->popEvent(); - return true; } @@ -249,13 +248,13 @@ } // 3. store all prefixes passed before event processing, because they are used by GetTopmostPrefix - $passed = explode(',', $this->Application->GetVar('passed')); + $all_passed = explode(',', $this->Application->GetVar('passed')); foreach ($events as $prefix_special => $event_name) { if (!$event_name) continue; $prefix_special = explode('.',$prefix_special); - array_push($passed, $prefix_special[0]); + array_push($all_passed, $prefix_special[0]); } - $this->Application->SetVar('passed', implode(',', $passed)); + $this->Application->SetVar('all_passed', implode(',', $all_passed)); foreach ($events as $prefix_special => $event_name) { if (!$event_name) continue; @@ -278,6 +277,7 @@ $event->redirect = true; $event_handler =& $this->Application->recallObject($event->Prefix.'_EventHandler'); + /* @var $event_handler kEventHandler */ $event->setEventParam('top_prefix', $this->Application->GetTopmostPrefix($event->Prefix, true)); if (($this->Application->RecallVar('user_id') == -1) || $event_handler->CheckPermission($event)) { $this->HandleEvent($event); @@ -306,15 +306,15 @@ $wid = $this->Application->GetVar('m_wid'); if ($wid && $event->redirect_params['opener'] == 'u') { $event->redirect_params['opener'] = 's'; // because Application->HREF will react differently when 'opener' = 'u' - $event->redirect = 'incs/close_popup'; + $event->redirect = defined('CLOSE_POPUP_TPL') ? CLOSE_POPUP_TPL : 'incs/close_popup'; } $this->Application->Redirect($event->redirect, $event->redirect_params, null, $event->redirect_script); } } $this->Application->SetVar('events', $events); -// $this->Application->SetVar('passed', implode(',', $passed)); + $this->Application->SetVar('passed', implode(',', $all_passed)); } function processOpener() @@ -381,9 +381,9 @@ * @param Array $params * @param string $pass */ - function openerStackPush($t, $params, $pass = 'all') + function openerStackPush($t, $params, $pass = 'all', $wid=null) { - $wid = $this->Application->GetVar('m_wid'); + if (!isset($wid)) $wid = $this->Application->GetVar('m_wid'); $stack_name = rtrim('opener_stack_'.$wid, '_'); $opener_stack = $this->Application->RecallVar($stack_name); Index: trunk/core/units/categories/cache_updater.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/categories/cache_updater.php (.../cache_updater.php) (revision 7391) +++ trunk/core/units/categories/cache_updater.php (.../cache_updater.php) (revision 7635) @@ -191,7 +191,7 @@ function getDonePercent() { if(!$this->totalCats)return 0; - return min(100, intval( round( $this->doneCats / $this->totalCats * 100 ) )); + return min(100, intval( floor( $this->doneCats / $this->totalCats * 100 ) )); } function getData() Index: trunk/core/admin_templates/regional/phrases_edit.tpl =================================================================== diff -u -r7391 -r7635 --- trunk/core/admin_templates/regional/phrases_edit.tpl (.../phrases_edit.tpl) (revision 7391) +++ trunk/core/admin_templates/regional/phrases_edit.tpl (.../phrases_edit.tpl) (revision 7635) @@ -17,7 +17,7 @@ } ) ); a_toolbar.AddButton( new ToolBarButton('cancel', '', function() { - cancel_edit('phrases','OnCancelEdit','',''); + cancel_edit('phrases','OnCancelEdit','',''); } ) ); Index: trunk/admin/install/install_lib.php =================================================================== diff -u -r7413 -r7635 --- trunk/admin/install/install_lib.php (.../install_lib.php) (revision 7413) +++ trunk/admin/install/install_lib.php (.../install_lib.php) (revision 7635) @@ -324,13 +324,14 @@ $sqls = str_replace($replace_from, $replace_to, $sqls); } - $sqls = str_replace("\r\n", "\n", $sqls); + $sqls = str_replace("\r\n", "\n", $sqls); // convert to linux line endings + $sqls = preg_replace("/#(.*?)\n/", '', $sqls); // remove all comments $sqls = explode(";\n", $sqls); foreach ($sqls as $sql) { $sql = trim($sql); - if (!$sql || substr($sql, 0, 1) == '#') { - continue; // usually last line || comment + if (!$sql) { + continue; // usually last line } $db->Query($sql); if ($db->getErrorCode() != 0) { @@ -340,6 +341,47 @@ } } } + +/** + * Sets module version to passed + * + * @param string $module_name + * @param string $version + */ +function K4_SetModuleVersion($module_name, $version = false) +{ + if ($version === false) { + $version = K4_GetMaxModuleVersion($module_name); + } + + $sql = 'UPDATE '.TABLE_PREFIX.'Modules + SET Version = "'.$version.'" + WHERE Name = "'.$module_name.'"'; + + $db =& inst_GetADODBConnection(true); + $db->Query($sql); +} + +function K4_GetMaxModuleVersion($module_name) +{ + define('UPGRADES_FILE', FULL_PATH.'/%sinstall/upgrades.sql'); + define('VERSION_MARK', '# ===== v ([\d]+\.[\d]+\.[\d]+) ====='); + + $upgrades_file = sprintf(UPGRADES_FILE, strtolower($module_name).'/'); + if (!file_exists($upgrades_file)) { + // no upgrade file + return '4.0.1'; + } + + $sqls = file_get_contents($upgrades_file); + $versions_found = preg_match_all('/'.VERSION_MARK.'/s', $sqls, $regs); + if (!$versions_found) { + // upgrades file doesn't contain version definitions + return '4.0.1'; + } + + return end($regs[1]); +} function RunRestoreFile($ado,$filename,$FileOffset,$MaxLines) { Index: trunk/kernel/admin_templates/group_selector.tpl =================================================================== diff -u --- trunk/kernel/admin_templates/group_selector.tpl (revision 0) +++ trunk/kernel/admin_templates/group_selector.tpl (revision 7635) @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + +
+ + +
+ + + + \ No newline at end of file Index: trunk/core/admin_templates/incs/header.tpl =================================================================== diff -u -r7391 -r7635 --- trunk/core/admin_templates/incs/header.tpl (.../header.tpl) (revision 7391) +++ trunk/core/admin_templates/incs/header.tpl (.../header.tpl) (revision 7635) @@ -2,7 +2,7 @@ -In-Portal :: Administration Panel +<inp2:m_GetConfig var="Site_Name"/> - <inp2:m_Phrase label="la_AdministrativeConsole"/> @@ -34,6 +34,9 @@ var $base_path = ''; var img_path = '/img/'; +NumberFormatter.ThousandsSep = ''; +NumberFormatter.DecimalSep = ''; + window.name += '_'; @@ -47,7 +50,7 @@ - > + > Index: trunk/core/admin_templates/js/grid_scroller.js =================================================================== diff -u -r7391 -r7635 --- trunk/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 7391) +++ trunk/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 7635) @@ -78,50 +78,6 @@ return [curleft,curtop]; } -function execJS(node) -{ - var bSaf = (navigator.userAgent.indexOf('Safari') != -1); - var bOpera = (navigator.userAgent.indexOf('Opera') != -1); - var bMoz = (navigator.appName == 'Netscape'); - - if (!node) return; - - /* IE wants it uppercase */ - var st = node.getElementsByTagName('SCRIPT'); - var strExec; - - for(var i=0;iConn->GetOne( sprintf($sql,$sid) ); if(!$is_alive) $this->Conn->Query('DROP TABLE IF EXISTS '.$table); } Index: trunk/core/units/general/helpers/recursive_helper.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/general/helpers/recursive_helper.php (.../recursive_helper.php) (revision 7391) +++ trunk/core/units/general/helpers/recursive_helper.php (.../recursive_helper.php) (revision 7635) @@ -79,10 +79,10 @@ FROM '.$table_name.' WHERE '.$id_field.' = '.$dest_category_id; $dest_parent_path = explode('|', substr($this->Conn->GetOne($sql), 1, -1)); - + $child_categories = array_intersect($dest_parent_path, $category_ids); // get categories, then can't be moved $category_ids = array_diff($category_ids, $child_categories); // remove them from movable categories list - + if ($category_ids) { $sql = 'UPDATE '.$table_name.' SET ParentId = '.$dest_category_id.' @@ -102,6 +102,7 @@ // 1. clone category $temp_handler =& $this->Application->recallObject($prefix.'_TempHandler', 'kTempTablesHandler'); + /* @var $temp_handler kTempTablesHandler*/ $temp_handler->BuildTables($prefix, Array($category_id)); $new_category_id = array_pop( $temp_handler->CloneItems($prefix, '', Array($category_id)) ); $this->Application->SetVar('m_cat_id', $new_category_id); Index: trunk/admin/editor/cmseditor/editor/dialog/fck_document/ppt.gif =================================================================== diff -u Binary files differ Index: trunk/core/units/modules/modules_event_handler.php =================================================================== diff -u -r6625 -r7635 --- trunk/core/units/modules/modules_event_handler.php (.../modules_event_handler.php) (revision 6625) +++ trunk/core/units/modules/modules_event_handler.php (.../modules_event_handler.php) (revision 7635) @@ -21,10 +21,13 @@ */ function SetCustomQuery(&$event) { + $object =& $event->getObject(); if ($event->Special) { - $object =& $event->getObject(); $object->addFilter('current_module', 'Name = '.$event->Special); } + if (!$this->Application->isModuleEnabled('Proj-Base')) { + $object->addFilter('not_core', 'Name != '.$this->Conn->qstr('Core')); + } } function mapEvents() @@ -61,7 +64,7 @@ if ($object->Update()) { $event->status = erSUCCESS; - $event->redirect_params = Array('opener' => 's', 'pass_events' => true); //stay! + $event->redirect_params = Array('opener' => 's'); //stay! } else { $event->status = erFAIL; Index: trunk/core/admin_templates/incs/footer.tpl =================================================================== diff -u -r7391 -r7635 --- trunk/core/admin_templates/incs/footer.tpl (.../footer.tpl) (revision 7391) +++ trunk/core/admin_templates/incs/footer.tpl (.../footer.tpl) (revision 7635) @@ -9,6 +9,7 @@ o += '
'; o += el.innerHTML + '
'; el.innerHTML = o; + execJS(el) MakeHeight100(); addEvent(window, 'resize', function() {MakeHeight100()}) } @@ -23,6 +24,7 @@ el.style.height = h; // el.style.width=w; } + @@ -37,6 +39,5 @@
- \ No newline at end of file Index: trunk/admin/install/upgrades/readme_1_4_0.txt =================================================================== diff -u -r7601 -r7635 --- trunk/admin/install/upgrades/readme_1_4_0.txt (.../readme_1_4_0.txt) (revision 7601) +++ trunk/admin/install/upgrades/readme_1_4_0.txt (.../readme_1_4_0.txt) (revision 7635) @@ -15,6 +15,4 @@ - Category sorting - Overwriting Auto FileName option in Mod-rewrite mode - Updating Modification date for items -- Shortcuts to Pending items on Section Overview - - +- Shortcuts to Pending items on Section Overview \ No newline at end of file Index: trunk/core/admin_templates/img/perm_green.gif =================================================================== diff -u Binary files differ Index: trunk/core/install/step_templates/choose_modules.tpl =================================================================== diff -u -r6691 -r7635 --- trunk/core/install/step_templates/choose_modules.tpl (.../choose_modules.tpl) (revision 6691) +++ trunk/core/install/step_templates/choose_modules.tpl (.../choose_modules.tpl) (revision 7635) @@ -3,7 +3,12 @@ ?>
- + + + + + +
+ + + + + +
+ +
+ + + + + \ No newline at end of file Index: trunk/kernel/admin_templates/item_selector/item_selector_toolbar.tpl =================================================================== diff -u -r7391 -r7635 --- trunk/kernel/admin_templates/item_selector/item_selector_toolbar.tpl (.../item_selector_toolbar.tpl) (revision 7391) +++ trunk/kernel/admin_templates/item_selector/item_selector_toolbar.tpl (.../item_selector_toolbar.tpl) (revision 7635) @@ -31,7 +31,7 @@ set_hidden_field('selected_ids[' + $prefix + ']', Grids[$Catalog.ActivePrefix].GetSelected()); - submit_event('', 'OnProcessSelected'); + submit_event('', 'OnProcessSelected'); } ) ); a_toolbar.AddButton( new ToolBarButton('cancel', '', function() { Index: trunk/themes/default/common/footer.tpl =================================================================== diff -u -r3379 -r7635 --- trunk/themes/default/common/footer.tpl (.../footer.tpl) (revision 3379) +++ trunk/themes/default/common/footer.tpl (.../footer.tpl) (revision 7635) @@ -8,7 +8,7 @@ Index: trunk/core/units/user_groups/user_groups_config.php =================================================================== diff -u -r6625 -r7635 --- trunk/core/units/user_groups/user_groups_config.php (.../user_groups_config.php) (revision 6625) +++ trunk/core/units/user_groups/user_groups_config.php (.../user_groups_config.php) (revision 7635) @@ -14,81 +14,63 @@ 'ForeignKey' => 'PortalUserId', 'ParentTableKey' => 'PortalUserId', ), - ), - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), + 'ItemClass' => Array('class'=>'UserGroups_DBItem','file'=>'user_groups_dbitem.php','build_event'=>'OnItemBuild'), 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'kDBEventHandler','file'=>'','build_event'=>'OnBuild'), + 'EventHandlerClass' => Array('class'=>'UserGroupsEventHandler','file'=>'user_groups_eh.php','build_event'=>'OnBuild'), 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'), 'AutoLoad' => true, - 'QueryString' => Array( - 1 => 'id', - 2 => 'page', - 3 => 'event', - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'page', + 3 => 'event', + ), 'IDField' => 'GroupId', - 'StatusField' => Array('UserStatus'), 'TableName' => TABLE_PREFIX.'UserGroup', 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON %1$s.GroupId = g.GroupId AND %1$s.PrimaryGroup = 1 - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON u.PortalUserId = %1$s.PortalUserId'), + LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON %1$s.GroupId = g.GroupId'), 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON %1$s.GroupId = g.GroupId AND %1$s.PrimaryGroup = 1 - LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON u.PortalUserId = %1$s.PortalUserId'), + LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON %1$s.GroupId = g.GroupId'), 'AutoDelete' => true, 'AutoClone' => true, - 'CalculatedFields' => Array( - '' => Array( - 'Login' => 'u.Login', - 'FirstName' => 'u.FirstName', - 'LastName' => 'u.LastName', - 'Email' => 'u.Email', - 'PrimaryGroup' => 'g.Name', - 'CreatedOn' => 'u.CreatedOn', - 'UserStatus' => 'u.Status' - ), - ), + 'CalculatedFields' => Array ( + '' => Array( + 'GroupName' => 'g.Name', + ), + ), 'Fields' => Array( - 'PortalUserId' => Array('type' => 'int','not_null' => '1','default' => '0'), - 'GroupId' => Array(), - 'MembershipExpires' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''), - 'PrimaryGroup' => Array('type' => 'int','not_null' => '1','default' => '1'), - 'ExpirationReminderSent' => Array('type' => 'int','not_null' => '1','default' => '0'), + 'PortalUserId' => Array('type' => 'int'), + 'GroupId' => Array('type' => 'int', 'not_null' => 1, 'default' => 1), + 'MembershipExpires' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''), + 'PrimaryGroup' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1), + 'ExpirationReminderSent' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), ), - 'VirtualFields' => Array( - 'Login' => Array('type' => 'string'), - 'FirstName' => Array('type' => 'string'), - 'LastName' => Array('type' => 'string'), - 'Email' => Array('type' => 'string'), - 'PrimaryGroup' => Array('type' => 'string'), - 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1, 'default' => '#NOW#'), - 'UserStatus' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Pending'), 'use_phrases' => 1, 'not_null' => '1','default' => 2), - ), + 'VirtualFields' => Array ( + 'GroupName' => Array('type' => 'string'), + ), 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array(0 => 'icon16_user_disabled.gif', 1 => 'icon16_user.gif', 2 => 'icon16_user_pending.gif'), - 'Fields' => Array( - 'Login' => Array('title' => 'la_col_Username', 'data_block' => 'grid_checkbox_td'), - 'LastName' => Array( 'title'=>'la_col_LastName'), - 'FirstName' => Array( 'title'=>'la_col_FirstName'), - 'Email' => Array( 'title'=>'la_col_Email'), + 'Default' => Array( + 'Icons' => Array ('default' => 'icon16_group.gif'), + 'Fields' => Array( + 'GroupId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'), + 'GroupName' => Array ('title'=>'la_col_GroupName'), 'PrimaryGroup' => Array( 'title'=>'la_col_PrimaryGroup'), - 'CreatedOn_formatted' => Array('title' => 'la_col_CreatedOn', 'sort_field' => 'CreatedOn'), - ), - ), - ), + 'MembershipExpires' => Array ('title' => 'la_col_MembershipExpires', 'data_block' => 'grid_membership_td'), + ), + ), + ), ); Index: trunk/core/admin_templates/img/perm_red.gif =================================================================== diff -u Binary files differ Index: trunk/core/admin_templates/incs/grid_blocks.tpl =================================================================== diff -u -r7391 -r7635 --- trunk/core/admin_templates/incs/grid_blocks.tpl (.../grid_blocks.tpl) (revision 7391) +++ trunk/core/admin_templates/incs/grid_blocks.tpl (.../grid_blocks.tpl) (revision 7635) @@ -159,8 +159,8 @@ - - + + @@ -240,7 +240,7 @@ - $Menus[''+'_filter_menu'].addMenuItem('','',''); + $Menus[''+'_filter_menu'].addMenuItem('','',''); @@ -257,7 +257,7 @@ $Menus[''+'_filter_menu'].addMenuItem('All','filters_remove_all("", );'); $Menus[''+'_filter_menu'].addMenuItem('None','filters_apply_all("", );'); $Menus[''+'_filter_menu'].addMenuSeparator(); - + Index: trunk/kernel/include/category.php =================================================================== diff -u -r6583 -r7635 --- trunk/kernel/include/category.php (.../category.php) (revision 6583) +++ trunk/kernel/include/category.php (.../category.php) (revision 7635) @@ -1737,6 +1737,10 @@ } } + global $m_var_list; + foreach ($Orders as $key => $val) { + $Orders[$key] = preg_replace('/\.(Name|Description)/', '.l'.$m_var_list['lang'].'_$1', $Orders[$key]); + } if(count($Orders)>0) { Index: trunk/core/kernel/utility/formatters/multilang_formatter.php =================================================================== diff -u -r6093 -r7635 --- trunk/core/kernel/utility/formatters/multilang_formatter.php (.../multilang_formatter.php) (revision 6093) +++ trunk/core/kernel/utility/formatters/multilang_formatter.php (.../multilang_formatter.php) (revision 7635) @@ -95,6 +95,9 @@ $value = $object->GetDBField('l'.$lang.'_'.$field_name); //getting value of current language $master_field = $field_name; // THIS is master_field } + $options = $object->GetFieldOptions($field_name); + $format = isset($format) ? $format : ( isset($options['format']) ? $options['format'] : null); + if ( $value == '' && $format != 'no_default') { // try to get default language value $def_lang_value = $object->GetDBField('l'.$this->Application->GetDefaultLanguageId().'_'.$master_field); if ($def_lang_value == '') return NULL; Index: trunk/core/kernel/parser/template_parser.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/parser/template_parser.php (.../template_parser.php) (revision 7391) +++ trunk/core/kernel/parser/template_parser.php (.../template_parser.php) (revision 7635) @@ -144,7 +144,10 @@ function ConvertToCode($data) { - $code = '$o .= \''. str_replace("'", "\'", $data) .'\';'; + $data = str_replace("\\", "\\\\", $data); // escape any "\" + $data = str_replace("'", "\'", $data); // escape "'" + + $code = '$o .= \''. $data .'\';'; $code = explode("\n", $code); return $code; } @@ -192,6 +195,12 @@ $this->Application->CompiledFunctions[$f_name] = $real_name; + /*if (defined('DEBUG_MODE') && DEBUG_MODE && defined('DBG_PRE_PARSE') && DBG_PRE_PARSE) { + // this shows newly compiled functions (blocks) + global $debugger; + $f_body = "\t".'function '.$real_name.'($params)'."\n\t{\n".$f_body."\t}\n\n"; + $debugger->appendHTML($debugger->highlightString($f_body)); + }*/ } } @@ -333,7 +342,13 @@ } if ($opening_tag == ''); + if ($this->Application->IsAdmin()) { + $this->AppendOutput(''); + } + else { + $this->AppendOutput(''); + $this->AppendCompiledHTML(''); + } $tag = '__COMMENT__'; } Index: trunk/admin/editor/cmseditor/editor/dialog/fck_document/xml.gif =================================================================== diff -u Binary files differ Index: trunk/core/units/categories/categories_config.php =================================================================== diff -u -r6782 -r7635 --- trunk/core/units/categories/categories_config.php (.../categories_config.php) (revision 6782) +++ trunk/core/units/categories/categories_config.php (.../categories_config.php) (revision 7635) @@ -42,7 +42,7 @@ 'icon' => 'icon16_cat_pending.gif', 'label' => 'la_tab_Categories', 'js_url' => '#url#', - 'url' => Array('t' => 'advanced_view', 'SetTab' => 'c', 'pass' => 'm,c.showall', 'c.showall_event' => 'OnSetFilterPattern', 'c.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_pick=1'), + 'url' => Array('t' => 'in-portal/advanced_view', 'SetTab' => 'c', 'pass' => 'm,c.showall', 'c.showall_event' => 'OnSetFilterPattern', 'c.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_pick=1'), 'status' => STATUS_PENDING, ), ), Index: trunk/admin/browse/fw_menu.js =================================================================== diff -u -r4971 -r7635 --- trunk/admin/browse/fw_menu.js (.../fw_menu.js) (revision 4971) +++ trunk/admin/browse/fw_menu.js (.../fw_menu.js) (revision 7635) @@ -14,7 +14,7 @@ * Modified By Intechnic Corporation for use in In-Portal * 6/28/02 * - */ + */ function Menu(label) { this.version = "990702 [xMenu; fw_menu.js]"; @@ -38,11 +38,12 @@ var $base_path = ''; var $base_tag = document.getElementsByTagName('BASE'); if ($base_tag.length) { - $base_path = $base_tag[0].href.replace('kernel/admin_templates', 'admin'); + $base_path = $base_tag[0].href.replace('kernel/admin_templates', 'admin').replace('core/admin_templates', 'admin'); } +// alert('base: '+$base_tag[0].href+' => '+$base_path) this.imagePath = $base_path + 'images/'; - + this.childMenuIcon = "menu_arrow.gif"; this.items = new Array(); this.actions = new Array(); @@ -90,7 +91,7 @@ default: this.types[this.types.length] = ''; } -} +} function addMenuSeparator() { this.items[this.items.length] = "separator"; @@ -99,7 +100,7 @@ this.menuItemBorder = 0; } -// For NS6. +// For NS6. function FIND(item,called_from) { if (document.all) return(document.all[item]); @@ -131,7 +132,7 @@ } else { - return false; + return false; } } else @@ -141,11 +142,11 @@ } window.fwHideMenuTimer = null; - if (!container) return; window.triedToWriteMenus = true; + if (!container) return; window.triedToWriteMenus = true; container.isContainer = true; container.menus = new Array(); - - for (var i=0; i \n'; content += ' \n \n\n'; } i=x; } - if (document.layers) { + if (document.layers) { container.clip.width = window.innerWidth; container.clip.height = window.innerHeight; container.onmouseout = mouseoutMenu; @@ -334,7 +335,7 @@ } else { container.document.open("text/html"); container.document.writeln(content); - container.document.close(); + container.document.close(); } if (!FIND("menuLayer0")) return; var menuCount = 0; @@ -356,14 +357,14 @@ var l = FIND("menuItem" + menuCount); l.Menu = container.menus[x]; if (l.addEventListener) { // ns6 - l.style.width = menu.menuItemWidth; + l.style.width = menu.menuItemWidth; l.style.height = menu.menuItemHeight; l.style.top = top; l.addEventListener("mouseover", onMenuItemOver, false); l.addEventListener("click", onMenuItemAction, false); l.addEventListener("mouseout", mouseoutMenu, false); } else { //ie - l.style.pixelWidth = menu.menuItemWidth; + l.style.pixelWidth = menu.menuItemWidth; l.style.pixelHeight = menu.menuItemHeight; l.style.pixelTop = top; } @@ -389,11 +390,11 @@ var sep = FIND("menuSeparator" + menuCount); if (sep) { sep.style.clip = "rect(0 " + (menu.menuItemWidth - 3) + " 1 0)"; - sep.style.width = sep.style.pixelWidth = menu.menuItemWidth; + sep.style.width = sep.style.pixelWidth = menu.menuItemWidth; sep.style.backgroundColor = menu.bgColor; sep = FIND("menuSeparatorLite" + menuCount); sep.style.clip = "rect(1 " + (menu.menuItemWidth - 3) + " 2 0)"; - sep.style.width = sep.style.pixelWidth = menu.menuItemWidth; + sep.style.width = sep.style.pixelWidth = menu.menuItemWidth; sep.style.backgroundColor = menu.menuLiteBgColor; l.style.height = l.style.pixelHeight = menu.menuItemHeight/2; l.isSeparator = true @@ -421,10 +422,10 @@ s.height = s.pixelHeight = menu.menuHeight+(menu.menuBorder*4); } } - if (document.captureEvents) { + if (document.captureEvents) { document.captureEvents(Event.MOUSEUP); } - if (document.addEventListener) { + if (document.addEventListener) { document.addEventListener("mouseup", onMenuItemOver, false); } if (document.layers && window.innerWidth) { @@ -438,10 +439,10 @@ } function NS4resize() { - if (NS4sIW < window.innerWidth || - NS4sIW > window.innerWidth || - NS4sIH > window.innerHeight || - NS4sIH < window.innerHeight ) + if (NS4sIW < window.innerWidth || + NS4sIW > window.innerWidth || + NS4sIH > window.innerHeight || + NS4sIH < window.innerHeight ) { window.location.reload(); } @@ -481,7 +482,7 @@ if (a.Menu.bgImageUp) { a.style.background = "url(" + a.Menu.bgImageUp +")";; } - } + } if (l.isSeparator) return; l.style.backgroundColor = l.menuHiliteBgColor; l.zIndex = 100; // magic IE 4.5 mac happy doohicky. jba @@ -539,7 +540,7 @@ } function FW_showMenu(menu, x, y, child) { - if (!window.fwWroteMenu) + if (!window.fwWroteMenu) { alert('No Menu Written'); return; @@ -557,18 +558,18 @@ var l = child; } if (!l) return; - for (var i=0; i 0) + if (l.layers[i].document.layers.length > 0) FW_showMenu(null, "relative", "relative", l.layers[i]); } if (l.parentLayer) { - if (x != "relative") + if (x != "relative") l.parentLayer.left = x || window.pageX || 0; - if (l.parentLayer.left + l.clip.width > window.innerWidth) + if (l.parentLayer.left + l.clip.width > window.innerWidth) l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth); - if (y != "relative") + if (y != "relative") l.parentLayer.top = y || window.pageY || 0; if (l.parentLayer.isContainer) { l.Menu.xOffset = window.pageXOffset; @@ -581,17 +582,17 @@ l.visibility = "inherit"; if (l.Menu) l.Menu.container.visibility = "inherit"; } else if (FIND("menuItem0")) { - var l = menu.menuLayer || menu; + var l = menu.menuLayer || menu; hideActiveMenus(); if (typeof(l) == "string") { l = FIND(l); } window.ActiveMenu = l; var s = l.style; s.visibility = "inherit"; - if (x != "relative") + if (x != "relative") s.left = s.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0; - if (y != "relative") + if (y != "relative") s.top = s.pixelTop = y || (window.pageY + document.body.scrollTop) || 0; l.Menu.xOffset = document.body.scrollLeft; l.Menu.yOffset = document.body.scrollTop; @@ -697,7 +698,7 @@ childMenu.left = l.parentLayer.left + l.parentLayer.clip.width + l.Menu.menuLayer.left -5; } var w = childMenu.clip.width+childMenu.left-l.Menu.container.clip.left; - if (w > l.Menu.container.clip.width) + if (w > l.Menu.container.clip.width) l.Menu.container.clip.width = w; var h = childMenu.clip.height+childMenu.top-l.Menu.container.clip.top; if (h > l.Menu.container.clip.height) l.Menu.container.clip.height = h; @@ -714,7 +715,7 @@ // alert(left + parseInt(s.width) - document.body.scrollLeft) if (left + parseInt(s.width) > document.body.scrollLeft + document.body.offsetWidth) left -= parseInt(s.width) + l.offsetWidth - 5; - s.left = left; + s.left = left; } else { // zilla case @@ -724,7 +725,7 @@ // alert() if (left + parseInt(s.width) > document.body.offsetWidth) left -= parseInt(s.width) + l.offsetWidth - 5; - s.left = left; + s.left = left; } childMenu.style.visibility = "inherit"; } else { @@ -759,4 +760,4 @@ { if(variable==null) return false; return (typeof(variable)=='undefined')?false:true; -} +} Index: trunk/core/admin_templates/img/icons/icon24_modules.gif =================================================================== diff -u Binary files differ Index: trunk/core/units/reviews/reviews_event_handler.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/reviews/reviews_event_handler.php (.../reviews_event_handler.php) (revision 7391) +++ trunk/core/units/reviews/reviews_event_handler.php (.../reviews_event_handler.php) (revision 7635) @@ -183,20 +183,31 @@ $object->ErrorMsgs['too_frequent'] = $this->Application->Phrase('lu_ferror_review_duplicate'); } } - + /** + * Enter description here... + * + * @param kEvent $event + */ + function OnBeforeItemCreate(&$event) + { + $object =& $event->getObject(); + $object->SetDBField('Module', $this->Application->findModule('Var',$this->Application->getUnitOption($this->Prefix, 'ParentPrefix'), 'Name')); + } + + /** * Returns current user id for reviews, for logic ask Kostja T. * * @return int */ function getUserID() { $user_id = $this->Application->RecallVar('user_id'); - + if ($user_id == 0) { $user_id = -2; } - + return $user_id; } } Index: trunk/core/admin_templates/img/icons/icon46_list_modules.gif =================================================================== diff -u Binary files differ Index: trunk/core/units/reviews/reviews_config.php =================================================================== diff -u -r5219 -r7635 --- trunk/core/units/reviews/reviews_config.php (.../reviews_config.php) (revision 5219) +++ trunk/core/units/reviews/reviews_config.php (.../reviews_config.php) (revision 7635) @@ -26,6 +26,7 @@ 1 => 'id', 2 => 'page', 3 => 'event', + 4 => 'mode', ), Index: trunk/core/install/step_templates/install_setup.tpl =================================================================== diff -u -r6691 -r7635 --- trunk/core/install/step_templates/install_setup.tpl (.../install_setup.tpl) (revision 6691) +++ trunk/core/install/step_templates/install_setup.tpl (.../install_setup.tpl) (revision 7635) @@ -8,15 +8,15 @@ Username*: @@ -25,25 +25,30 @@ ?> 'Upgrade In-Portal', - 1 => 'Clean out the In-Portal database and reinstall', - 4 => 'Clean out the In-Portal database and reinstall from backup', - 2 => 'Install to a new database', - 3 => 'Update License Information', - 5 => 'Change Database Configuration', - 7 => 'Fix Paths', + 'upgrade' => 'Upgrade In-Portal', + 1 => 'Clean out the In-Portal database and reinstall', + 4 => 'Clean out the In-Portal database and reinstall from backup', + 2 => 'Install to a new database', + 3 => 'Update License Information', + 'db_reconfig' => 'Change Database Configuration', + 'fix_paths' => 'Fix Paths', ); + $upgradable_modules = $this->GetUpgradableModules(); + if (!$upgradable_modules) { + unset($options['upgrade']); + } + $td_class = 'table_color1'; foreach ($options as $option_key => $option_title) { - $checked = $this->GetVar('inp_opt') == $option_key ? ' checked' : ''; + $checked = $this->GetVar('next_preset') == $option_key ? ' checked' : ''; echo sprintf($option_tpl, $option_key, $checked, $option_title, $td_class); $td_class = ($td_class == 'table_color1') ? 'table_color2' : 'table_color1'; } Index: trunk/tools/cron.php =================================================================== diff -u -r6647 -r7635 --- trunk/tools/cron.php (.../cron.php) (revision 6647) +++ trunk/tools/cron.php (.../cron.php) (revision 7635) @@ -1,5 +1,8 @@ /tools/cron.php -O /dev/null > /dev/null 2>&1 + define('FULL_PATH', realpath(dirname(__FILE__).'/..')); define('REL_PATH', 'tools/'); define('ADMIN', 1); Index: trunk/core/units/categories/categories_event_handler.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 7391) +++ trunk/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 7635) @@ -294,12 +294,14 @@ { $object =& $event->getObject( Array('skip_autoload' => true) ); - $object->addCalculatedField('IsNew', ' IF(%1$s.NewItem = 2, - IF(%1$s.CreatedOn >= (UNIX_TIMESTAMP() - '. - $this->Application->ConfigValue('Category_DaysNew'). - '*3600*24), 1, 0), - %1$s.NewItem - )'); + $object->addCalculatedField( + 'IsNew', + ' IF(%1$s.NewItem = 2, + IF(%1$s.CreatedOn >= (UNIX_TIMESTAMP() - '. + $this->Application->ConfigValue('Category_DaysNew'). + '*3600*24), 1, 0), + %1$s.NewItem + )'); } /** @@ -440,6 +442,7 @@ $this->Application->RemoveVar('clipboard'); $clipboard_helper =& $this->Application->recallObject('ClipboardHelper'); $clipboard_helper->setClipboard($event, 'copy', $this->StoreSelectedIDs($event)); + $this->clearSelectedIDs($event); } /** @@ -452,6 +455,7 @@ $this->Application->RemoveVar('clipboard'); $clipboard_helper =& $this->Application->recallObject('ClipboardHelper'); $clipboard_helper->setClipboard($event, 'cut', $this->StoreSelectedIDs($event)); + $this->clearSelectedIDs($event); } /** @@ -503,7 +507,7 @@ } if ($clipboard_data['cut'] || $clipboard_data['copy']) { - $event->redirect = 'categories/cache_updater'; + $event->redirect = 'in-portal/categories/cache_updater'; } } Index: trunk/core/units/languages/languages_tag_processor.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/languages/languages_tag_processor.php (.../languages_tag_processor.php) (revision 7391) +++ trunk/core/units/languages/languages_tag_processor.php (.../languages_tag_processor.php) (revision 7635) @@ -25,15 +25,43 @@ return $lang_current->GetDBField('Charset'); } + /** + * Returns formatted date + time on current language + * + * @param Array $params + * @return string + */ + function CurrentDate($params) + { + $week_day = $this->Application->Phrase('lu_weekday_'.adodb_date('l')); + $format = str_replace('l', '#@#', $params['format']); // replace with reserved char (preserves translation link) + + return str_replace('#@#', $week_day, adodb_date($format)); + } + function ListLanguages($params) { $this->Special = 'enabled'; return $this->PrintList2($params); } + function LanguageName($params) + { + $object =& $this->getObject($params); + return $this->Application->Phrase($params['phrase_prefix'].$object->GetDBField('PackName')); + } + + function LanguageLink($params) + { + $t = $this->SelectParam($params, 'template,t'); + + $object =& $this->getObject($params); + return $this->Application->HREF($t, '', Array('m_lang' => $object->GetID())); + } + function SelectedLanguage($params) { - $object =& $this->Application->recallObject($this->getPrefixSpecial()); + $object =& $this->getObject($params); return $object->GetDBField('LanguageId') == $this->Application->GetVar('m_lang'); } Index: trunk/core/kernel/utility/debugger.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 7391) +++ trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 7635) @@ -144,6 +144,10 @@ $dbg_constMap['DBG_EDITOR'] = 'c:\Program Files\Zend\ZendStudio-5.2.0\bin\ZDE.exe %F'; } + if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] && constOn('DBG_SKIP_AJAX')) { + $this->safeDefine('DBG_SKIP_REPORTING', 1); + } + // user defined options override debugger defaults $dbg_constMap = $this->array_merge_recursive2($dbg_constMap, $dbg_options); @@ -818,6 +822,20 @@ } /** + * Returns profile total key (check against unexisting key too) + * + * @param string $key + * @return int + */ + function getProfilerTotal($key) + { + if (isset($this->ProfilerTotalCount[$key])) { + return (int)$this->ProfilerTotalCount[$key]; + } + return 0; + } + + /** * Generates report * */ @@ -902,7 +920,7 @@ $is_ajax = isset($_GET['ajax']) && $_GET['ajax'] == 'yes'; $skip_reporting = $this->constOn('DBG_SKIP_REPORTING') || $this->constOn('DBG_ZEND_PRESENT'); - if ($is_ajax || !$skip_reporting) { + if (($is_ajax && !constOn('DBG_SKIP_AJAX')) || !$skip_reporting) { $debug_file = $this->tempFolder.'/debug_'.$this->rowSeparator.'.txt'; if (file_exists($debug_file)) unlink($debug_file); @@ -937,12 +955,11 @@ + + if ($request_visible) { document.getElementById('_div').setAttribute('group_id', ); } @@ -15,44 +17,44 @@ - + - + - + - + Index: trunk/kernel/frontaction.php =================================================================== diff -u -r7391 -r7635 --- trunk/kernel/frontaction.php (.../frontaction.php) (revision 7391) +++ trunk/kernel/frontaction.php (.../frontaction.php) (revision 7635) @@ -694,6 +694,7 @@ break; case "m_sort_cats": + $_POST['Category_Sortfield'] = preg_replace('/^(Name$|^Description)$/', 'l'.$m_var_list['lang'].'_$1', $_POST['Category_Sortfield']); $objSession->SetVariable("Category_Sortfield",$_POST["Category_Sortfield"]); $objSession->SetVariable("Category_Sortorder",$_POST["Category_Sortorder"]); $objSession->SetVariable("Perpage_Category",$_POST["Perpage_Category"]); Index: trunk/core/kernel/session/session.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/session/session.php (.../session.php) (revision 7391) +++ trunk/core/kernel/session/session.php (.../session.php) (revision 7635) @@ -507,7 +507,7 @@ { setcookie($name, $value, $expires, $this->CookiePath, $this->CookieDomain, $this->CookieSecure); } - + function Check() { // we should check referer if cookies are disabled, and in combined mode @@ -731,7 +731,8 @@ } } $this->Application->Debugger->dumpVars($session_data); - + } + if ($this->Application->isDebugMode() && constOn('DBG_SHOW_PERSISTENTDATA')) { // dump persistent session data if ($this->Storage->PersistentVars) { $this->Application->Debugger->appendHTML('Persistant Session:'); @@ -744,10 +745,6 @@ } $this->Application->Debugger->dumpVars($session_data); } - -// to insert after HTTPQuery if it's visible -// $new_row = constOn('DBG_SHOW_HTTPQUERY') ? 4 : 2; -// $debugger->moveAfterRow($new_row,2); } } @@ -765,15 +762,15 @@ { // save last_template $wid = $this->Application->GetVar('m_wid'); - + $last_env = $this->getLastTemplateENV($t, Array('m_opener' => 'u')); $last_template = basename($_SERVER['PHP_SELF']).'|'.substr($last_env, strlen(ENV_VAR_NAME) + 1); $this->StoreVar(rtrim('last_template_'.$wid, '_'), $last_template); - + $last_env = $this->getLastTemplateENV($t, Array()); $last_template = basename($_SERVER['PHP_SELF']).'|'.substr($last_env, strlen(ENV_VAR_NAME) + 1); $this->StoreVar(rtrim('last_template_popup_'.$wid, '_'), $last_template); - + // save other last... variables for mistical purposes (customizations may be) $this->StoreVar('last_url', $_SERVER['REQUEST_URI']); // needed by ord:StoreContinueShoppingLink $this->StoreVar('last_env', substr($last_env, strlen(ENV_VAR_NAME)+1)); @@ -819,6 +816,7 @@ { return $this->Storage->RecallPersistentVar($this, $name, $default); } + function RemoveVar($name) { Index: trunk/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7391) +++ trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7635) @@ -105,7 +105,12 @@ $block_params['label'] = addslashes( $this->Application->Phrase($filter_params['label']) ); if (getArrayValue($view_filter,$filter_key)) { $submit = 0; - $status = $group_params['element_type'] == 'checkbox' ? '[\'img/check_on.gif\']' : '[\'img/menu_dot.gif\']'; + if ($params['old_style']) { + $status = $group_params['element_type'] == 'checkbox' ? 1 : 2; + } + else { + $status = $group_params['element_type'] == 'checkbox' ? '[\'img/check_on.gif\']' : '[\'img/menu_dot.gif\']'; + } } else { $submit = 1; @@ -380,6 +385,9 @@ $column_number++; } + $block_params['first_col'] = $column_number == 1 ? 1 : 0; + $block_params['last_col'] = $column_number == $columns ? 1 : 0; + $block_params['column_number'] = $column_number; $o.= $this->Application->ParseBlock($block_params, 1); array_push($displayed, $list->GetDBField($id_field)); @@ -451,18 +459,18 @@ function PageLink($params) { $t = isset($params['template']) ? $param['template'] : ''; + unset($params['template']); + if (!$t) $t = $this->Application->GetVar('t'); if (isset($params['page'])) { $this->Application->SetVar($this->getPrefixSpecial().'_Page', $params['page']); + unset($params['page']); } -// $http_query =& $this->Application->recallObject('HTTPQuery'); -// $get = $http_query->getRedirectParams(); - $pass = Array('pass' => 'm,'.$this->getPrefixSpecial()); -// $pass = array_merge($get, $pass); + $params['pass'] = 'm,'.$this->getPrefixSpecial(); - return $this->Application->HREF($t, '', $pass); + return $this->Application->HREF($t, '', $params); } function ColumnWidth($params) @@ -823,6 +831,50 @@ } /** + * Returns grid padination information + * Can return links to pages + * + * @param Array $params + * @return mixed + */ + function PageInfo($params) + { + $object =& $this->GetList($params); + /* @var $object kDBList */ + + $type = $params['type']; + unset($params['type']); // remove parameters used only by current tag + + switch ($type) { + case 'current': + $ret = $object->Page; + break; + + case 'total': + $ret = $object->GetTotalPages(); + break; + + case 'prev': + $ret = $object->Page > 1 ? $object->Page - 1 : false; + break; + + case 'next': + $ret = $object->Page < $object->GetTotalPages() ? $object->Page + 1 : false; + break; + } + + if ($ret && isset($params['as_link']) && $params['as_link']) { + unset($params['as_link']); // remove parameters used only by current tag + $params['page'] = $ret; + $current_page = $object->Page; // backup current page + $ret = $this->PageLink($params); + $this->Application->SetVar($object->getPrefixSpecial().'_Page', $current_page); // restore page + } + + return $ret; + } + + /** * Print grid pagination using * block names specified * @@ -1268,7 +1320,12 @@ { $new_value = $this->getInfo( $objects[ $prefix_data['prefix_special'] ], 'titlefield' ); if(!$new_value && getArrayValue($title_info['new_titlefield'],$prefix_data['prefix_special']) ) $new_value = $this->Application->Phrase($title_info['new_titlefield'][ $prefix_data['prefix_special'] ]); - $title = str_replace('#'.$prefix_data['prefix_special'].'_titlefield#', $new_value, $title); + // old format had single quotes in the format + $title = str_replace('\'#'.$prefix_data['prefix_special'].'_titlefield#\'', "'$new_value'", $title); + // new format has no quotes and $new_value should be empty when creating items + if ($new_value) { + $title = str_replace('#'.$prefix_data['prefix_special'].'_titlefield#', "'$new_value'", $title); + } } } } @@ -1286,7 +1343,13 @@ $var_info = explode('_',$replacement_var,2); $object =& $objects[ $var_info[0] ]; $new_value = $this->getInfo($object,$var_info[1]); - $title = str_replace('#'.$replacement_var.'#', $new_value, $title); + $title = str_replace('\'#'.$replacement_var.'#\'', "'$new_value'", $title); + if ($new_value) { + $title = str_replace('#'.$replacement_var.'#', "'$new_value'", $title); + } + else { + $title = str_replace('#'.$replacement_var.'#', $new_value, $title); + } } } @@ -1317,7 +1380,7 @@ } function GridInfo($params) { - $object =& $this->getObject($params); + $object =& $this->GetList($params); /* @var $object kDBList */ switch ($params['type']) { @@ -1329,6 +1392,10 @@ return $object->RecordsCount ? $object->Offset+1 : 0; //0-based case 'to': return min($object->Offset + $object->PerPage, $object->RecordsCount); + case 'total_pages': + return ceil($object->RecordsCount / $object->PerPage); + case 'needs_pagination': + return $object->RecordsCount > $object->PerPage; } } @@ -1689,7 +1756,7 @@ { if ($this->Special == 'import') { $this->Application->StoreVar('PermCache_UpdateRequired', 1); - $this->Application->Redirect('categories/cache_updater', Array('m_opener' => 'r', 'pass' => 'm', 'continue' => 1, 'no_amp' => 1)); + $this->Application->Redirect('in-portal/categories/cache_updater', Array('m_opener' => 'r', 'pass' => 'm', 'continue' => 1, 'no_amp' => 1)); } elseif ($this->Special == 'export') { $finish_t = $this->Application->RecallVar('export_finish_t'); @@ -1735,6 +1802,11 @@ $value = $this->Field($params); $name = $this->InputName($params); + $theme_path = $this->Application->BaseURL().substr($this->Application->GetFrontThemePath(), 1); + + $bgcolor = $this->Application->GetVar('bgcolor'); + if (!$bgcolor) $bgcolor = '#ffffff'; + include_once(FULL_PATH.'/core/cmseditor/fckeditor.php'); $oFCKeditor = new FCKeditor($name); $oFCKeditor->BasePath = BASE_PATH.'/core/cmseditor/'; @@ -1747,14 +1819,38 @@ 'ProjectPath' => BASE_PATH.'/', 'CustomConfigurationsPath' => $this->Application->BaseURL().'core/admin_templates/js/inp_fckconfig.js', // 'EditorAreaCSS' => $this->Application->BaseURL().'/themes/inportal_site/inc/inportal.css', //GetThemeCSS(), - 'StylesXmlPath' => $this->Application->BaseURL().'core/admin_templates/js/inp_styles.xml', + 'StylesXmlPath' => $theme_path.'/inc/styles.xml', + 'EditorAreaCSS' => $theme_path.'/inc/style.css', + 'DefaultClass' => 'Default Text', // 'Debug' => 1, 'Admin' => 1, 'K4' => 1, + 'newBgColor' => $bgcolor, ); return $oFCKeditor->CreateHtml(); } + function IsNewItem($params) + { + $object =& $this->getObject($params); + return $object->IsNewItem(); + } + + /** + * Creates link to an item including only it's id + * + * @param Array $params + * @return string + */ + function ItemLink($params) + { + $object =& $this->getObject($params); + + $params['pass'] = 'm'; + $params[$object->getPrefixSpecial().'_id'] = $object->GetID(); + + return $this->Application->ProcessParsedTag('m', 't', $params); + } } ?> \ No newline at end of file Index: trunk/core/admin_templates/js/tree.js =================================================================== diff -u -r7391 -r7635 --- trunk/core/admin_templates/js/tree.js (.../tree.js) (revision 7391) +++ trunk/core/admin_templates/js/tree.js (.../tree.js) (revision 7635) @@ -1,7 +1,7 @@ var last_hightlighted = null; var last_highlighted_key = null; -function TreeItem(title, url, icon, onclick) +function TreeItem(title, url, icon, onclick, priority) { this.Title = title; this.Url = url; @@ -10,6 +10,7 @@ this.Level = 0; this.Icon = icon; this.Onclick = onclick; + this.Priority = isset(priority) ? priority : false; this.Children = false; } @@ -83,6 +84,9 @@ { var $node_text = document.createElement('span'); $node_text.innerHTML = this.Title; + if (TREE_SHOW_PRIORITY && this.Priority !== false) { + $node_text.innerHTML += '' + this.Priority + ''; + } link = document.createElement('a'); link.nodeValue = this.Title; @@ -240,7 +244,7 @@ /* FOLDER */ -function TreeFolder(parent_id, title, url, icon, late_load_url, onclick) +function TreeFolder(parent_id, title, url, icon, late_load_url, onclick, priority) { var render = false; if (isset(parent_id)) { @@ -264,6 +268,7 @@ this.LateLoadURL = isset(late_load_url) ? late_load_url : false; this.Loaded = false; this.Onclick = onclick; + this.Priority = isset(priority) ? priority : false; this.Children = new Array(); this.ChildIndex = 0; @@ -374,14 +379,14 @@ child = node.childNodes.item(i); if (child.tagName == 'folder') { var backupLastFolder = this.LastFolder; - this.LastFolder = this.LastFolder.AddItem(new TreeFolder(null, child.getAttribute('name'), child.getAttribute('href'), child.getAttribute('icon'), child.getAttribute('load_url'), child.getAttribute('onclick')), render); + this.LastFolder = this.LastFolder.AddItem(new TreeFolder(null, child.getAttribute('name'), child.getAttribute('href'), child.getAttribute('icon'), child.getAttribute('load_url'), child.getAttribute('onclick'), child.getAttribute('priority')), render); if (child.hasChildNodes) { this.ProcessXMLNode(child); } this.LastFolder = backupLastFolder; } else if (child.tagName == 'item') { - this.LastFolder.AddItem(new TreeItem(child.firstChild.nodeValue, child.getAttribute('href'), child.getAttribute('icon'), child.getAttribute('onclick')), render) + this.LastFolder.AddItem(new TreeItem(child.firstChild.nodeValue, child.getAttribute('href'), child.getAttribute('icon'), child.getAttribute('onclick'), child.getAttribute('priority')), render) } else if (child.tagName == 'tree') { this.LastFolder = this; Index: trunk/core/units/users/users_event_handler.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 7391) +++ trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 7635) @@ -30,6 +30,26 @@ } /** + * Shows only admins when required + * + * @param kEvent $event + */ + function SetCustomQuery(&$event) + { + $object =& $event->getObject(); + /* @var $object kDBList */ + + if ($event->Special == 'admins') { + $object->addFilter('primary_filter', 'ug.GroupId = 11'); + } + + if ($event->Special == 'regular') { + $object->addFilter('primary_filter', 'ug.GroupId <> 11'); + } + } + + + /** * Checks permissions of user * * @param kEvent $event @@ -109,9 +129,12 @@ $prefix_special = $this->Application->IsAdmin() ? 'u.current' : 'u'; // "u" used on front not to change theme $object =& $this->Application->recallObject($prefix_special, null, Array('skip_autoload' => true)); $password = $this->Application->GetVar('password'); + + $invalid_pseudo = $this->Application->IsAdmin() ? 'la_invalid_password' : 'lu_invalid_password'; + if(!$password) { - $object->SetError('ValidateLogin', 'blank_password', 'lu_blank_password'); + $object->SetError('ValidateLogin', 'invalid_password', $invalid_pseudo); $event->status = erFAIL; return false; } @@ -121,17 +144,19 @@ $login_value = $this->Application->GetVar($submit_field); // process "Save Username" checkbox - $save_username = $this->Application->GetVar('cb_save_username') ? $login_value : ''; - $this->Application->Session->SetCookie('save_username', $save_username, adodb_mktime() + 31104000); // 1 year expiration - $this->Application->SetVar('save_username', $save_username); // cookie will be set on next refresh, but refresh won't occur if login error present, so duplicate cookie in HTTPQuery - + if ($this->Application->IsAdmin()) { + $save_username = $this->Application->GetVar('cb_save_username') ? $login_value : ''; + $this->Application->Session->SetCookie('save_username', $save_username, adodb_mktime() + 31104000); // 1 year expiration + $this->Application->SetVar('save_username', $save_username); // cookie will be set on next refresh, but refresh won't occur if login error present, so duplicate cookie in HTTPQuery + } + if ($this->Application->IsAdmin() && ($login_value == 'root')) { // logging in "root" (admin only) $root_password = $this->Application->ConfigValue('RootPass'); $password_formatter =& $this->Application->recallObject('kPasswordFormatter'); $test = $password_formatter->EncryptPassword($password, 'b38'); if ($root_password != $test) { - $object->SetError('ValidateLogin', 'invalid_password', 'lu_invalid_password'); + $object->SetError('ValidateLogin', 'invalid_password', $invalid_pseudo); $event->status = erFAIL; return false; } @@ -196,10 +221,10 @@ else { $object->SetID(-2); - $object->SetError('ValidateLogin', 'invalid_password', 'lu_invalid_password'); + $object->SetError('ValidateLogin', 'invalid_password', $invalid_pseudo); $event->status = erFAIL; } - + $event->SetRedirectParam('pass', 'm'); } @@ -313,7 +338,7 @@ if ($this->Application->ConfigValue('UseJSRedirect')) { $event->SetRedirectParam('js_redirect', 1); } - + $event->SetRedirectParam('pass', 'm'); } @@ -350,7 +375,7 @@ if ($object->mode == 't') { $ug_table = $this->Application->GetTempName($ug_table, 'prefix:'.$event->Prefix); } - + $sql = 'UPDATE '.$ug_table.' SET PrimaryGroup = 0 WHERE PortalUserId = '.$object->GetDBField('PortalUserId'); @@ -406,7 +431,7 @@ if($items_info) { list($id, $field_values) = each($items_info); - $user_email = $field_values['Email']; + $user_email = isset($field_values['Email']) ? $field_values['Email'] : false; if($user_email) { // check if is subscriber @@ -577,7 +602,7 @@ // used for error reporting only -> rewrite code + theme (by Alex) $object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true)); // TODO: change theme too - + if (preg_match("/^[_a-zA-Z0-9-\.]+@[a-zA-Z0-9-\.]+\.[a-z]{2,4}$/", $friend_email)) { $send_params = array(); @@ -594,7 +619,7 @@ else { // $event->redirect_params = array('opener' => 's', 'pass' => 'all'); // $event->redirect = $this->Application->GetVar('template_fail'); - + $object->ErrorMsgs['send_error'] = $this->Application->Phrase('lu_email_send_error'); $object->FieldErrors['Email']['pseudo'] = 'send_error'; $event->status = erFAIL; @@ -648,7 +673,7 @@ } } else { - // used for error reporting only -> rewrite code + theme (by Alex) + // used for error reporting only -> rewrite code + theme (by Alex) $object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true)); // TODO: change theme too $object->ErrorMsgs['invalid_email'] = $this->Application->Phrase('lu_InvalidEmail'); $object->FieldErrors['SubscribeEmail']['pseudo'] = 'invalid_email'; @@ -751,7 +776,7 @@ function OnForgotPassword(&$event) { $user_object = &$this->Application->recallObject('u.forgot', null, Array('skip_autoload' => true)); - + // used for error reporting only -> rewrite code + theme (by Alex) $user_current_object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true)); // TODO: change theme too @@ -862,7 +887,7 @@ $passed_key = $this->Application->GetVar('user_key'); $user_object = &$this->Application->recallObject('u.forgot'); - + // used for error reporting only -> rewrite code + theme (by Alex) $user_current_object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true));// TODO: change theme too @@ -1052,7 +1077,7 @@ } return parent::getPassedID($event); } - + /** * Allows to change root password * @@ -1065,15 +1090,15 @@ // not "root" can't change root's password via this event return false; } - + // put salt to user's config $field_options = $this->Application->getUnitOption($event->Prefix.'.RootPassword', 'Fields'); $field_options['salt'] = 'b38'; $this->Application->setUnitOption($event->Prefix.'.RootPassword', 'Fields', $field_options); - + $object =& $event->getObject( Array('skip_autoload' => true) ); /* @var $object UsersItem */ - + $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) ); if ($items_info) { list ($id, $field_values) = each($items_info); Index: trunk/core/install/install_data.sql =================================================================== diff -u -r7403 -r7635 --- trunk/core/install/install_data.sql (.../install_data.sql) (revision 7403) +++ trunk/core/install/install_data.sql (.../install_data.sql) (revision 7635) @@ -574,3 +574,5 @@ INSERT INTO Permissions VALUES (0, 'CATEGORY.MODIFY', 11, 1, 0, 0); INSERT INTO Permissions VALUES (0, 'in-portal:service.view', 11, 1, 1, 0); + +INSERT INTO Modules (Name, Path, Var, Version, Loaded, LoadOrder, TemplatePath, RootCat, BuildDate) VALUES ('Core', 'core/', 'adm', '0.0.0', 1, 1, '', 0, '0'); Index: trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/config.php =================================================================== diff -u -r6647 -r7635 --- trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/config.php (.../config.php) (revision 6647) +++ trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/config.php (.../config.php) (revision 7635) @@ -39,10 +39,11 @@ } else { - $fp = realpath(dirname(__FILE__).'/../../../../../../../../../'); + $fp = realpath(dirname(__FILE__).'/../../../../../../../../'); define('FULL_PATH', $fp); define('DEBUG_MODE', 0); - define('REL_PATH', 'admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php'); + define('DBG_SKIP_REPORTING', 1); + define('REL_PATH', 'core/cmseditor/editor/filemanager/browser/default/connectors/php'); $kernel4_startup = $fp."/core/kernel/startup.php"; $Config['K4Mode'] = 1; include_once($kernel4_startup); Index: trunk/admin/install/upgrades/changelog_1_4_0.txt =================================================================== diff -u -r7391 -r7635 --- trunk/admin/install/upgrades/changelog_1_4_0.txt (.../changelog_1_4_0.txt) (revision 7391) +++ trunk/admin/install/upgrades/changelog_1_4_0.txt (.../changelog_1_4_0.txt) (revision 7635) @@ -13,6 +13,7 @@ File in-portal/admin/install.php changed File in-portal/admin/install_over_kx.php is new; release_1_4_0 revision 1.1.2.9 File in-portal/admin/relation_select.php changed +File in-portal/admin/browse/fw_menu.js changed File in-portal/admin/help/install_help.php changed File in-portal/admin/import/step2.php changed File in-portal/admin/include/mainscript.php changed @@ -24,8 +25,9 @@ File in-portal/admin/install/install_lib.php changed File in-portal/admin/install/prerequisit_errors.php changed File in-portal/admin/install/upgrade_errors.php changed +File in-portal/admin/install/langpacks/english.lang changed File in-portal/admin/install/upgrades/changelog_1_3_0.txt changed -File in-portal/admin/install/upgrades/changelog_1_4_0.txt is new; release_1_4_0 revision 1.1.2.7 +File in-portal/admin/install/upgrades/changelog_1_4_0.txt is new; release_1_4_0 revision 1.1.2.15 File in-portal/admin/install/upgrades/inportal_upgrade_v1.3.2.sql is new; release_1_4_0 revision 1.1.2.2 File in-portal/admin/install/upgrades/inportal_upgrade_v1.4.0.sql is new; release_1_4_0 revision 1.1.2.1 File in-portal/admin/users/adduser.php changed @@ -69,6 +71,7 @@ File in-portal/kernel/admin_templates/advanced_view.tpl changed File in-portal/kernel/admin_templates/catalog.tpl changed File in-portal/kernel/admin_templates/catalog_tab.tpl changed +File in-portal/kernel/admin_templates/group_selector.tpl is new; release_1_4_0 revision 1.1.2.1 File in-portal/kernel/admin_templates/head.tpl is removed; release_1_3_1 revision 1.4 File in-portal/kernel/admin_templates/index.tpl is removed; release_1_3_1 revision 1.8 File in-portal/kernel/admin_templates/login.tpl is removed; release_1_3_1 revision 1.4 @@ -85,6 +88,7 @@ File in-portal/kernel/admin_templates/categories/categories_tabs.tpl changed File in-portal/kernel/admin_templates/categories/ci_blocks.tpl changed File in-portal/kernel/admin_templates/categories/images_edit.tpl changed +File in-portal/kernel/admin_templates/categories/permissions_tab.tpl changed File in-portal/kernel/admin_templates/categories/relations_edit.tpl changed File in-portal/kernel/admin_templates/custom_fields/custom_fields_edit.tpl changed File in-portal/kernel/admin_templates/custom_fields/custom_fields_list.tpl changed @@ -145,10 +149,13 @@ File in-portal/kernel/admin_templates/xml/cache_updater.tpl changed File in-portal/kernel/admin_templates/xml/categories_list.tpl changed File in-portal/kernel/admin_templates/xml/tree_categories.tpl changed +File in-portal/kernel/include/category.php changed File in-portal/kernel/include/compat.php is new; release_1_4_0 revision 1.1.2.2 File in-portal/kernel/include/customfield.php changed -File in-portal/kernel/include/globals.php is new; release_1_4_0 revision 1.1.2.2 +File in-portal/kernel/include/custommetadata.php changed +File in-portal/kernel/include/globals.php is new; release_1_4_0 revision 1.1.2.3 File in-portal/kernel/include/item.php changed +File in-portal/kernel/include/itemreview.php changed File in-portal/kernel/include/modules.php changed File in-portal/kernel/include/obscure.php is new; release_1_4_0 revision 1.1.2.2 File in-portal/kernel/include/robots_list.txt is new; release_1_4_0 revision 1.1.2.1 @@ -253,9 +260,10 @@ File in-portal/kernel/units/phrases/phrases_config.php is removed; release_1_3_1 revision 1.9 File in-portal/kernel/units/phrases/phrases_event_handler.php is removed; release_1_3_1 revision 1.10.2.2 File in-portal/kernel/units/relationship/relationship_event_handler.php changed +File in-portal/kernel/units/reviews/reviews_config.php changed File in-portal/kernel/units/reviews/reviews_event_handler.php changed File in-portal/kernel/units/reviews/reviews_tag_processor.php changed -File in-portal/kernel/units/sections/sections_config.php is new; release_1_4_0 revision 1.1.2.4 +File in-portal/kernel/units/sections/sections_config.php is new; release_1_4_0 revision 1.1.2.5 File in-portal/kernel/units/selectors/selectors_event_handler.php changed File in-portal/kernel/units/statistics/statistics_event_handler.php changed File in-portal/kernel/units/stylesheets/stylesheets_config.php changed @@ -274,6 +282,7 @@ File in-portal/kernel/units/visits/visits_event_handler.php changed File in-portal/kernel/units/visits/visits_tag_processor.php changed File in-portal/themes/default/captcha_image.tpl is new; release_1_4_0 revision 1.1.2.1 +File in-portal/themes/default/common/footer.tpl changed File in-portal/themes/default/misc/right_recommend.tpl changed File in-portal/themes/default/recommend/captcha.tpl is new; release_1_4_0 revision 1.1.2.1 File in-portal/themes/default/search_results/cat_search_results.tpl changed @@ -291,6 +300,7 @@ File kernel4_dev/kernel4/db/dblist.php changed File kernel4_dev/kernel4/fonts/monofont.ttf is new; release_1_4_0 revision 1.1.2.1 File kernel4_dev/kernel4/fonts/monofont_read_me.txt is new; release_1_4_0 revision 1.1.2.1 +File kernel4_dev/kernel4/languages/phrases_cache.php changed File kernel4_dev/kernel4/parser/tags.php changed File kernel4_dev/kernel4/parser/template.php changed File kernel4_dev/kernel4/parser/template_parser.php changed @@ -299,27 +309,30 @@ File kernel4_dev/kernel4/session/session.php changed File kernel4_dev/kernel4/utility/debugger.php changed File kernel4_dev/kernel4/utility/event.php changed +File kernel4_dev/kernel4/utility/http_query.php changed File kernel4_dev/kernel4/utility/temp_handler.php changed File kernel4_dev/kernel4/utility/unit_config_reader.php changed File kernel4_dev/kernel4/utility/debugger/debugger.css changed File kernel4_dev/kernel4/utility/debugger/debugger.js changed File kernel4_dev/kernel4/utility/debugger/debugger_responce.php changed File kernel4_dev/kernel4/utility/formatters/formatter.php changed +File kernel4_dev/kernel4/utility/formatters/multilang_formatter.php changed File kernel4_dev/kernel4/utility/formatters/password_formatter.php changed +File kernel4_dev/kernel4/utility/formatters/unit_formatter.php changed File kernel.X/core/admin_templates/dummy is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/head.tpl is new; release_1_4_0 revision 1.2.2.3 File kernel.X/core/admin_templates/index.tpl is new; release_1_4_0 revision 1.2.2.3 File kernel.X/core/admin_templates/login.tpl is new; release_1_4_0 revision 1.1.2.5 File kernel.X/core/admin_templates/logout.tpl is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/no_permission.tpl is new; release_1_4_0 revision 1.1.2.2 File kernel.X/core/admin_templates/sections_list.tpl is new; release_1_4_0 revision 1.2.2.4 -File kernel.X/core/admin_templates/tree.tpl is new; release_1_4_0 revision 1.2.2.4 +File kernel.X/core/admin_templates/tree.tpl is new; release_1_4_0 revision 1.2.2.6 File kernel.X/core/admin_templates/ajax/popup_manager.tpl is new; release_1_4_0 revision 1.1.2.1 -File kernel.X/core/admin_templates/config/config_email.tpl is new; release_1_4_0 revision 1.1.2.3 +File kernel.X/core/admin_templates/config/config_email.tpl is new; release_1_4_0 revision 1.1.2.4 File kernel.X/core/admin_templates/config/config_general.tpl is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/config/config_search.tpl is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/config/config_search_edit.tpl is new; release_1_4_0 revision 1.1.2.1 -File kernel.X/core/admin_templates/config/config_universal.tpl is new; release_1_4_0 revision 1.1.2.2 +File kernel.X/core/admin_templates/config/config_universal.tpl is new; release_1_4_0 revision 1.1.2.4 File kernel.X/core/admin_templates/custom_fields/custom_fields_edit.tpl is new; release_1_4_0 revision 1.1.2.2 File kernel.X/core/admin_templates/custom_fields/custom_fields_list.tpl is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/img/ajax_progress.gif is new; release_1_4_0 revision 1.1 @@ -345,6 +358,8 @@ File kernel.X/core/admin_templates/img/menu_arrow.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/img/menu_bar.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/img/menu_dot.gif is new; release_1_4_0 revision 1.1 +File kernel.X/core/admin_templates/img/perm_green.gif is new; release_1_4_0 revision 1.1.2.1 +File kernel.X/core/admin_templates/img/perm_red.gif is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/img/progress_done.gif is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/img/progress_left.gif is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/img/spacer.gif is new; release_1_4_0 revision 1.1 @@ -358,6 +373,7 @@ File kernel.X/core/admin_templates/img/tab_active_right.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/img/tab_back.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/img/tab_back.jpg is new; release_1_4_0 revision 1.1.2.1 +File kernel.X/core/admin_templates/img/tab_back3.jpg is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/img/tab_left.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/img/tab_right.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/img/tabnav_back.gif is new; release_1_4_0 revision 1.1 @@ -371,6 +387,7 @@ File kernel.X/core/admin_templates/img/icons/icon24_help.gif is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/img/icons/icon24_link_editor.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/img/icons/icon24_lock_login.gif is new; release_1_4_0 revision 1.1 +File kernel.X/core/admin_templates/img/icons/icon24_modules.gif is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/img/icons/icon24_site.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/img/icons/icon24_translate.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/img/icons/icon46_conf.gif is new; release_1_4_0 revision 1.1 @@ -380,6 +397,8 @@ File kernel.X/core/admin_templates/img/icons/icon46_list_conf.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/img/icons/icon46_list_conf_general.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/img/icons/icon46_list_conf_regional.gif is new; release_1_4_0 revision 1.1 +File kernel.X/core/admin_templates/img/icons/icon46_list_modules.gif is new; release_1_4_0 revision 1.1.2.1 +File kernel.X/core/admin_templates/img/icons/icon46_modules.gif is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/img/icons/icon46_settings_general.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/img/icons/icon46_site.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/img/icons/icon_left.gif is new; release_1_4_0 revision 1.1.2.1 @@ -593,6 +612,9 @@ File kernel.X/core/admin_templates/img/toolbar/tool_refresh_f2.gif is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/img/toolbar/tool_refresh_f3.gif is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/img/toolbar/tool_reset.gif is new; release_1_4_0 revision 1.1.2.2 +File kernel.X/core/admin_templates/img/toolbar/tool_reset_edit.gif is new; release_1_4_0 revision 1.1.2.1 +File kernel.X/core/admin_templates/img/toolbar/tool_reset_edit_f2.gif is new; release_1_4_0 revision 1.1.2.1 +File kernel.X/core/admin_templates/img/toolbar/tool_reset_edit_f3.gif is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/img/toolbar/tool_reset_f2.gif is new; release_1_4_0 revision 1.1.2.2 File kernel.X/core/admin_templates/img/toolbar/tool_reset_f3.gif is new; release_1_4_0 revision 1.1.2.2 File kernel.X/core/admin_templates/img/toolbar/tool_reset_to_base.gif is new; release_1_4_0 revision 1.1.2.1 @@ -652,36 +674,37 @@ File kernel.X/core/admin_templates/incs/blocks.tpl is new; release_1_4_0 revision 1.1.2.4 File kernel.X/core/admin_templates/incs/close_popup.tpl is new; release_1_4_0 revision 1.1.2.7 File kernel.X/core/admin_templates/incs/config_blocks.tpl is new; release_1_4_0 revision 1.1 -File kernel.X/core/admin_templates/incs/footer.tpl is new; release_1_4_0 revision 1.1.2.6 -File kernel.X/core/admin_templates/incs/form_blocks.tpl is new; release_1_4_0 revision 1.4.2.9 +File kernel.X/core/admin_templates/incs/footer.tpl is new; release_1_4_0 revision 1.1.2.8 +File kernel.X/core/admin_templates/incs/form_blocks.tpl is new; release_1_4_0 revision 1.4.2.12 File kernel.X/core/admin_templates/incs/fw_menu.js is new; release_1_4_0 revision 1.1 -File kernel.X/core/admin_templates/incs/grid_blocks.tpl is new; release_1_4_0 revision 1.1.2.14 -File kernel.X/core/admin_templates/incs/header.tpl is new; release_1_4_0 revision 1.1.2.8 +File kernel.X/core/admin_templates/incs/grid_blocks.tpl is new; release_1_4_0 revision 1.1.2.16 +File kernel.X/core/admin_templates/incs/header.tpl is new; release_1_4_0 revision 1.1.2.10 File kernel.X/core/admin_templates/incs/in-portal.tpl is new; release_1_4_0 revision 1.1 File kernel.X/core/admin_templates/incs/menu_blocks.tpl is new; release_1_4_0 revision 1.1.2.5 File kernel.X/core/admin_templates/incs/nlsmenu.css is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/incs/sections_list.css is new; release_1_4_0 revision 1.1.2.1 -File kernel.X/core/admin_templates/incs/style.css is new; release_1_4_0 revision 1.2.2.9 -File kernel.X/core/admin_templates/incs/tab_blocks.tpl is new; release_1_4_0 revision 1.2.2.2 -File kernel.X/core/admin_templates/js/ajax.js is new; release_1_4_0 revision 1.1.2.6 +File kernel.X/core/admin_templates/incs/style.css is new; release_1_4_0 revision 1.2.2.10 +File kernel.X/core/admin_templates/incs/tab_blocks.tpl is new; release_1_4_0 revision 1.2.2.3 +File kernel.X/core/admin_templates/js/ajax.js is new; release_1_4_0 revision 1.1.2.7 File kernel.X/core/admin_templates/js/calendar.js is new; release_1_4_0 revision 1.1.2.3 -File kernel.X/core/admin_templates/js/grid.js is new; release_1_4_0 revision 1.1.2.3 -File kernel.X/core/admin_templates/js/grid_scroller.js is new; release_1_4_0 revision 1.1.2.14 +File kernel.X/core/admin_templates/js/grid.js is new; release_1_4_0 revision 1.1.2.4 +File kernel.X/core/admin_templates/js/grid_scroller.js is new; release_1_4_0 revision 1.1.2.17 File kernel.X/core/admin_templates/js/in-portal.js is new; release_1_4_0 revision 1.1 -File kernel.X/core/admin_templates/js/inp_fckconfig.js is new; release_1_4_0 revision 1.1.2.1 +File kernel.X/core/admin_templates/js/inp_fckconfig.js is new; release_1_4_0 revision 1.1.2.2 File kernel.X/core/admin_templates/js/inp_styles.xml is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/js/is.js is new; release_1_4_0 revision 1.1 -File kernel.X/core/admin_templates/js/nlsmenu.js is new; release_1_4_0 revision 1.1.2.3 +File kernel.X/core/admin_templates/js/nlsmenu.js is new; release_1_4_0 revision 1.1.2.4 File kernel.X/core/admin_templates/js/nlsmenueffect_1_2_1.js is new; release_1_4_0 revision 1.1.2.1 -File kernel.X/core/admin_templates/js/script.js is new; release_1_4_0 revision 1.2.2.18 -File kernel.X/core/admin_templates/js/toolbar.js is new; release_1_4_0 revision 1.3.2.7 -File kernel.X/core/admin_templates/js/tree.js is new; release_1_4_0 revision 1.1.2.3 +File kernel.X/core/admin_templates/js/script.js is new; release_1_4_0 revision 1.2.2.27 +File kernel.X/core/admin_templates/js/toolbar.js is new; release_1_4_0 revision 1.3.2.9 +File kernel.X/core/admin_templates/js/tree.js is new; release_1_4_0 revision 1.1.2.7 File kernel.X/core/admin_templates/js/calendar/calendar-blue.css is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/admin_templates/js/calendar/calendar-en.js is new; release_1_4_0 revision 1.1.2.2 File kernel.X/core/admin_templates/js/calendar/calendar-setup.js is new; release_1_4_0 revision 1.1.2.2 File kernel.X/core/admin_templates/js/calendar/calendar.js is new; release_1_4_0 revision 1.1.2.1 -File kernel.X/core/admin_templates/popups/column_picker.tpl is new; release_1_4_0 revision 1.1.2.7 -File kernel.X/core/admin_templates/popups/editor.tpl is new; release_1_4_0 revision 1.1.2.2 +File kernel.X/core/admin_templates/modules/modules_list.tpl is new; release_1_4_0 revision 1.1.2.1 +File kernel.X/core/admin_templates/popups/column_picker.tpl is new; release_1_4_0 revision 1.1.2.9 +File kernel.X/core/admin_templates/popups/editor.tpl is new; release_1_4_0 revision 1.1.2.3 File kernel.X/core/admin_templates/popups/translator.tpl is new; release_1_4_0 revision 1.1.2.3 File kernel.X/core/admin_templates/regional/email_messages_edit.tpl is new; release_1_4_0 revision 1.1.2.3 File kernel.X/core/admin_templates/regional/languages_edit.tpl is new; release_1_4_0 revision 1.1.2.6 @@ -692,66 +715,69 @@ File kernel.X/core/admin_templates/regional/languages_export_step2.tpl is new; release_1_4_0 revision 1.1.2.2 File kernel.X/core/admin_templates/regional/languages_import.tpl is new; release_1_4_0 revision 1.1.2.2 File kernel.X/core/admin_templates/regional/languages_import_step2.tpl is new; release_1_4_0 revision 1.1.2.2 -File kernel.X/core/admin_templates/regional/languages_list.tpl is new; release_1_4_0 revision 1.1.2.3 -File kernel.X/core/admin_templates/regional/phrases_edit.tpl is new; release_1_4_0 revision 1.1.2.5 +File kernel.X/core/admin_templates/regional/languages_list.tpl is new; release_1_4_0 revision 1.1.2.4 +File kernel.X/core/admin_templates/regional/phrases_edit.tpl is new; release_1_4_0 revision 1.1.2.7 File kernel.X/core/admin_templates/tools/system_tools.tpl is new; release_1_4_0 revision 1.1.2.2 File kernel.X/core/units/dummy is new; release_1_4_0 revision 1.1 -File kernel.X/core/units/admin/admin_config.php is new; release_1_4_0 revision 1.20.2.5 -File kernel.X/core/units/admin/admin_events_handler.php is new; release_1_4_0 revision 1.4.2.5 -File kernel.X/core/units/admin/admin_tag_processor.php is new; release_1_4_0 revision 1.27.2.16 -File kernel.X/core/units/categories/cache_updater.php is new; release_1_4_0 revision 1.8.2.3 -File kernel.X/core/units/categories/categories_config.php is new; release_1_4_0 revision 1.54 -File kernel.X/core/units/categories/categories_event_handler.php is new; release_1_4_0 revision 1.25.2.12 -File kernel.X/core/units/categories/categories_item.php is new; release_1_4_0 revision 1.10.2.4 -File kernel.X/core/units/categories/categories_tag_processor.php is new; release_1_4_0 revision 1.31.2.4 +File kernel.X/core/units/admin/admin_config.php is new; release_1_4_0 revision 1.20.2.6 +File kernel.X/core/units/admin/admin_events_handler.php is new; release_1_4_0 revision 1.4.2.6 +File kernel.X/core/units/admin/admin_tag_processor.php is new; release_1_4_0 revision 1.27.2.22 +File kernel.X/core/units/categories/cache_updater.php is new; release_1_4_0 revision 1.8.2.5 +File kernel.X/core/units/categories/categories_config.php is new; release_1_4_0 revision 1.54.2.1 +File kernel.X/core/units/categories/categories_event_handler.php is new; release_1_4_0 revision 1.25.2.16 +File kernel.X/core/units/categories/categories_item.php is new; release_1_4_0 revision 1.10.2.6 +File kernel.X/core/units/categories/categories_tag_processor.php is new; release_1_4_0 revision 1.31.2.5 File kernel.X/core/units/category_items/category_items_config.php is new; release_1_4_0 revision 1.12 File kernel.X/core/units/category_items/category_items_dbitem.php is new; release_1_4_0 revision 1.4 -File kernel.X/core/units/category_items/category_items_event_handler.php is new; release_1_4_0 revision 1.9.2.1 +File kernel.X/core/units/category_items/category_items_event_handler.php is new; release_1_4_0 revision 1.9.2.2 File kernel.X/core/units/category_items/category_items_tag_processor.php is new; release_1_4_0 revision 1.6 File kernel.X/core/units/configuration/configuration.php is new; release_1_4_0 revision 1.1 File kernel.X/core/units/configuration/configuration_config.php is new; release_1_4_0 revision 1.15 File kernel.X/core/units/configuration/configuration_event_handler.php is new; release_1_4_0 revision 1.18 File kernel.X/core/units/configuration/configuration_tag_processor.php is new; release_1_4_0 revision 1.14 File kernel.X/core/units/custom_data/custom_data_event_handler.php changed File kernel.X/core/units/custom_fields/custom_fields_event_handler.php changed -File kernel.X/core/units/email_events/email_events_config.php is new; release_1_4_0 revision 1.6 +File kernel.X/core/units/email_events/email_events_config.php is new; release_1_4_0 revision 1.6.2.1 File kernel.X/core/units/email_events/email_events_event_handler.php is new; release_1_4_0 revision 1.28.2.1 -File kernel.X/core/units/email_messages/email_messages_config.php is new; release_1_4_0 revision 1.2 -File kernel.X/core/units/email_messages/email_messages_event_handler.php is new; release_1_4_0 revision 1.5 +File kernel.X/core/units/email_messages/email_messages_config.php is new; release_1_4_0 revision 1.2.52.1 +File kernel.X/core/units/email_messages/email_messages_event_handler.php is new; release_1_4_0 revision 1.5.2.1 File kernel.X/core/units/general/brackets.php is new; release_1_4_0 revision 1.4 -File kernel.X/core/units/general/cat_dbitem.php is new; release_1_4_0 revision 1.34.2.2 +File kernel.X/core/units/general/cat_dbitem.php is new; release_1_4_0 revision 1.34.2.5 File kernel.X/core/units/general/cat_dbitem_export.php is new; release_1_4_0 revision 1.22.2.1 File kernel.X/core/units/general/cat_dblist.php is new; release_1_4_0 revision 1.4 File kernel.X/core/units/general/cat_event_handler.php is new; release_1_4_0 revision 1.68.2.3 -File kernel.X/core/units/general/cat_tag_processor.php is new; release_1_4_0 revision 1.15.2.1 +File kernel.X/core/units/general/cat_tag_processor.php is new; release_1_4_0 revision 1.15.2.2 File kernel.X/core/units/general/country_states.php is new; release_1_4_0 revision 1.4 File kernel.X/core/units/general/custom_fields.php is new; release_1_4_0 revision 1.8 File kernel.X/core/units/general/general_config.php is new; release_1_4_0 revision 1.10.2.1 File kernel.X/core/units/general/inp1_parser.php is new; release_1_4_0 revision 1.16 -File kernel.X/core/units/general/inp_ses_storage.php is new; release_1_4_0 revision 1.22 +File kernel.X/core/units/general/inp_ses_storage.php is new; release_1_4_0 revision 1.22.2.1 File kernel.X/core/units/general/main_event_handler.php is new; release_1_4_0 revision 1.15 File kernel.X/core/units/general/xml_helper.php is new; release_1_4_0 revision 1.6 File kernel.X/core/units/general/helpers/captcha_helper.php is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/units/general/helpers/clipboard_helper.php is new; release_1_4_0 revision 1.2 File kernel.X/core/units/general/helpers/col_picker_helper.php is new; release_1_4_0 revision 1.1.2.3 File kernel.X/core/units/general/helpers/filenames_helper.php is new; release_1_4_0 revision 1.3 File kernel.X/core/units/general/helpers/helpers_config.php is new; release_1_4_0 revision 1.3.2.3 -File kernel.X/core/units/general/helpers/mod_rewrite_helper.php is new; release_1_4_0 revision 1.7.2.1 -File kernel.X/core/units/general/helpers/modules.php is new; release_1_4_0 revision 1.6.2.2 -File kernel.X/core/units/general/helpers/multilanguage.php is new; release_1_4_0 revision 1.8.2.2 +File kernel.X/core/units/general/helpers/mod_rewrite_helper.php is new; release_1_4_0 revision 1.7.2.4 +File kernel.X/core/units/general/helpers/modules.php is new; release_1_4_0 revision 1.6.2.3 +File kernel.X/core/units/general/helpers/multilanguage.php is new; release_1_4_0 revision 1.8.2.3 File kernel.X/core/units/general/helpers/permissions_helper.php is new; release_1_4_0 revision 1.20.2.3 -File kernel.X/core/units/general/helpers/recursive_helper.php is new; release_1_4_0 revision 1.3.2.3 +File kernel.X/core/units/general/helpers/recursive_helper.php is new; release_1_4_0 revision 1.3.2.4 File kernel.X/core/units/general/helpers/search_helper.php is new; release_1_4_0 revision 1.4.2.6 File kernel.X/core/units/general/helpers/sections_helper.php is new; release_1_4_0 revision 1.11.2.4 File kernel.X/core/units/general/helpers/themes_helper.php is new; release_1_4_0 revision 1.1.2.1 -File kernel.X/core/units/groups/groups_config.php is new; release_1_4_0 revision 1.15.2.1 -File kernel.X/core/units/groups/groups_event_handler.php is new; release_1_4_0 revision 1.2 +File kernel.X/core/units/groups/groups_config.php is new; release_1_4_0 revision 1.15.2.2 +File kernel.X/core/units/groups/groups_event_handler.php is new; release_1_4_0 revision 1.2.2.1 File kernel.X/core/units/groups/groups_item.php is new; release_1_4_0 revision 1.1 File kernel.X/core/units/languages/import_xml.php is new; release_1_4_0 revision 1.22.2.1 -File kernel.X/core/units/languages/languages_config.php is new; release_1_4_0 revision 1.19.2.2 -File kernel.X/core/units/languages/languages_event_handler.php is new; release_1_4_0 revision 1.28.2.1 +File kernel.X/core/units/languages/languages_config.php is new; release_1_4_0 revision 1.19.2.3 +File kernel.X/core/units/languages/languages_event_handler.php is new; release_1_4_0 revision 1.28.2.3 File kernel.X/core/units/languages/languages_item.php is new; release_1_4_0 revision 1.8.2.1 -File kernel.X/core/units/languages/languages_tag_processor.php is new; release_1_4_0 revision 1.7.2.3 +File kernel.X/core/units/languages/languages_tag_processor.php is new; release_1_4_0 revision 1.7.2.7 +File kernel.X/core/units/modules/modules_config.php changed +File kernel.X/core/units/modules/modules_event_handler.php changed +File kernel.X/core/units/permissions/permissions_config.php changed File kernel.X/core/units/permissions/permissions_event_handler.php changed File kernel.X/core/units/permissions/permissions_tag_processor.php changed File kernel.X/core/units/phrases/phrases_config.php is new; release_1_4_0 revision 1.9.2.3 @@ -760,26 +786,30 @@ File kernel.X/core/units/themes/themes_tag_processor.php is new; release_1_4_0 revision 1.7 File kernel.X/core/units/translator/translator_config.php is new; release_1_4_0 revision 1.4 File kernel.X/core/units/translator/translator_event_handler.php is new; release_1_4_0 revision 1.9 -File kernel.X/core/units/user_groups/user_groups_config.php is new; release_1_4_0 revision 1.3 -File kernel.X/core/units/users/users_config.php is new; release_1_4_0 revision 1.32.2.2 -File kernel.X/core/units/users/users_event_handler.php is new; release_1_4_0 revision 1.68.2.8 +File kernel.X/core/units/user_groups/user_groups_config.php is new; release_1_4_0 revision 1.3.2.2 +File kernel.X/core/units/user_groups/user_groups_dbitem.php is new; release_1_4_0 revision 1.1.4.1 +File kernel.X/core/units/user_groups/user_groups_eh.php is new; release_1_4_0 revision 1.1.2.1 +File kernel.X/core/units/users/users_config.php is new; release_1_4_0 revision 1.32.2.5 +File kernel.X/core/units/users/users_event_handler.php is new; release_1_4_0 revision 1.68.2.15 File kernel.X/core/units/users/users_item.php is new; release_1_4_0 revision 1.13 File kernel.X/core/units/users/users_syncronize.php is new; release_1_4_0 revision 1.4 File kernel.X/core/units/users/users_tag_processor.php is new; release_1_4_0 revision 1.14.2.2 File kernel.X/core/install/english.lang is new; release_1_4_0 revision 1.1 -File kernel.X/core/install/install_data.sql is new; release_1_4_0 revision 1.3.2.4 -File kernel.X/core/install/install_schema.sql is new; release_1_4_0 revision 1.3.2.7 -File kernel.X/core/install/steps_db.xml is new; release_1_4_0 revision 1.2 -File kernel.X/core/install/incs/install.tpl is new; release_1_4_0 revision 1.2 +File kernel.X/core/install/install_data.sql is new; release_1_4_0 revision 1.3.2.7 +File kernel.X/core/install/install_schema.sql is new; release_1_4_0 revision 1.3.2.8 +File kernel.X/core/install/steps_db.xml is new; release_1_4_0 revision 1.2.2.1 +File kernel.X/core/install/upgrades.sql is new; release_1_4_0 revision 1.1.2.2 +File kernel.X/core/install/incs/install.tpl is new; release_1_4_0 revision 1.2.2.2 File kernel.X/core/install/incs/script.js is new; release_1_4_0 revision 1.1 -File kernel.X/core/install/incs/style.css is new; release_1_4_0 revision 1.1 +File kernel.X/core/install/incs/style.css is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/install/incs/img/bg_install_menu.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/install/incs/img/blocks.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/install/incs/img/blocks2.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/install/incs/img/blue_bar_help.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/install/incs/img/button_back.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/install/incs/img/globe.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/install/incs/img/icon_install.gif is new; release_1_4_0 revision 1.1 +File kernel.X/core/install/incs/img/icon_warning.gif is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/install/incs/img/logo.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/install/incs/img/spacer.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/install/incs/img/tab_middle.gif is new; release_1_4_0 revision 1.1 @@ -791,16 +821,31 @@ File kernel.X/core/install/incs/img/toolbar/tool_select.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/install/incs/img/toolbar/tool_select_f2.gif is new; release_1_4_0 revision 1.1 File kernel.X/core/install/step_templates/check_paths.tpl is new; release_1_4_0 revision 1.1 -File kernel.X/core/install/step_templates/choose_modules.tpl is new; release_1_4_0 revision 1.1 +File kernel.X/core/install/step_templates/choose_modules.tpl is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/install/step_templates/db_config.tpl is new; release_1_4_0 revision 1.1 File kernel.X/core/install/step_templates/finish.tpl is new; release_1_4_0 revision 1.1 -File kernel.X/core/install/step_templates/install_setup.tpl is new; release_1_4_0 revision 1.1 +File kernel.X/core/install/step_templates/install_setup.tpl is new; release_1_4_0 revision 1.1.2.1 File kernel.X/core/install/step_templates/root_password.tpl is new; release_1_4_0 revision 1.1 +File kernel.X/core/install/step_templates/upgrade_modules.tpl is new; release_1_4_0 revision 1.1.2.1 +File cmseditor/editor/dialog/fck_document.html changed +File cmseditor/editor/dialog/fck_document/audio.gif is new; release_1_4_0 revision 1.1.2.1 +File cmseditor/editor/dialog/fck_document/doc.gif is new; release_1_4_0 revision 1.1.2.1 +File cmseditor/editor/dialog/fck_document/excel.gif is new; release_1_4_0 revision 1.1.2.1 +File cmseditor/editor/dialog/fck_document/image.gif is new; release_1_4_0 revision 1.1.2.1 +File cmseditor/editor/dialog/fck_document/pdf.gif is new; release_1_4_0 revision 1.1.2.1 +File cmseditor/editor/dialog/fck_document/ppt.gif is new; release_1_4_0 revision 1.1.2.1 +File cmseditor/editor/dialog/fck_document/video.gif is new; release_1_4_0 revision 1.1.2.1 +File cmseditor/editor/dialog/fck_document/xml.gif is new; release_1_4_0 revision 1.1.2.1 File cmseditor/editor/filemanager/browser/default/frmresourceslist.html changed File cmseditor/editor/filemanager/browser/default/frmupload.html changed +File cmseditor/editor/filemanager/browser/default/connectors/php/commands.php changed File cmseditor/editor/filemanager/browser/default/connectors/php/config.php changed Changes in phrases and events: +! m/d/Yg:i:s Am/d/Yg:i:s A.,iso-8859-12 +! m/d/Yg:i:s Am/d/Yg:i:s A,.iso-8859-12 +Changed event "USER.VALIDATE" of type "0" +Changed event "USER.VALIDATE" of type "0" Index: trunk/core/admin_templates/js/toolbar.js =================================================================== diff -u -r7391 -r7635 --- trunk/core/admin_templates/js/toolbar.js (.../toolbar.js) (revision 7391) +++ trunk/core/admin_templates/js/toolbar.js (.../toolbar.js) (revision 7635) @@ -1,8 +1,13 @@ function ToolBarButton(title, alt, onclick, $hidden, prefix) { this.Title = title || ''; + this.TranslateLink = false; this.CheckTitleModule(); this.Alt = RemoveTranslationLink(alt || ''); + if (this.Alt != alt) { + this.TranslateLink = alt || ''; + this.TranslateLink = this.TranslateLink.replace(/<a href="(.*?)">(.*?)<\/a>/g, '$1'); + } if (this.Alt.match(/(.*)::(.*)/)) { this.Alt = RegExp.$1; @@ -12,6 +17,7 @@ this.Label = this.Alt; } + if (typeof(onclick) == 'function') { this.onClick = onclick; } @@ -78,7 +84,9 @@ this.SetOnMouseOver(); this.SetOnMouseOut(); this.SetOnClick(); + this.SetOnRightClick() if (this.Hidden) this.Hide(); + if (!img.complete) { var real_path = img_path.replace('#MODULE#', this.Module) + 'toolbar/'; var old_path = img_path.replace('#MODULE#', 'kernel') + 'toolbar/'+this.ToolBar.IconPrefix + this.Title+'.gif'; @@ -92,6 +100,36 @@ // preg_print_pre(img, /natural|compl/i) } +ToolBarButton.prototype.EditTitle = function() { + if (this.TranslateLink !== false) { + var $links = this.TranslateLink; + + $links = $links.split('::'); + var $i = 0; + while ($i < $links.length) { + var $link = $links[$i]; + if ($link.match(/(javascript:|http:\/\/)(.*)/)) { + var $link_type = RegExp.$1; + $link = RegExp.$2.replace(/'/g, '"'); + if ($link_type == 'javascript:') { + eval($link); + } + else { + window.location.href = 'http://' + $link; + } + + // edit one phrase at a time + break; + } + $i++; + } + + return false; + } + + return true; +} + ToolBarButton.prototype.SetOnMouseOver = function() { this.Container.onmouseover = function() { this.btn.imgObject.src = this.btn.IconsPath() + this.btn.ToolBar.IconPrefix + this.btn.Title + '_f2.gif'; @@ -141,6 +179,13 @@ } } +ToolBarButton.prototype.SetOnRightClick = function() { + this.Container.oncontextmenu = function() { + return this.btn.EditTitle(); + } +} + + ToolBarButton.prototype.Disable = function() { if ( !this.Enabled ) return; this.imgObject.src = this.IconsPath() + this.ToolBar.IconPrefix + this.Title + '_f3.gif'; @@ -224,7 +269,7 @@ this.Module = $module ? $module : 'core'; this.IconPrefix = icon_prefix ? icon_prefix : 'tool_'; this.Buttons = new Array(); - this.UseLabels = $use_toolbarlabels ? $use_toolbarlabels : false; + this.UseLabels = typeof($use_toolbarlabels) != 'undefined' ? $use_toolbarlabels : false; } ToolBar.prototype.AddButton = function(a_button) Index: trunk/core/kernel/utility/debugger/debugger.js =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/utility/debugger/debugger.js (.../debugger.js) (revision 7391) +++ trunk/core/kernel/utility/debugger/debugger.js (.../debugger.js) (revision 7635) @@ -57,7 +57,11 @@ } // Debugger -function Debugger() { +function Debugger($row_separator, $errors_count, $fatal_error, $sql_count) { + this.RowSeparator = $row_separator; + this.IsFatalError = $fatal_error; + this.ErrorsCount = parseInt($errors_count); + this.SQLCount = parseInt($sql_count); this.IsQueried = false; this.IsVisible = false; this.DebuggerDIV = document.getElementById('debug_layer'); @@ -75,17 +79,42 @@ Debugger.prototype.SetOpacity = function(opacity) { this.DebuggerToolbar.style.opacity = (opacity / 100); - this.DebuggerToolbar.style.MozOpacity = (opacity / 100); - this.DebuggerToolbar.style.KhtmlOpacity = (opacity / 100); - this.DebuggerToolbar.style.filter = "alpha(opacity=" + opacity + ")"; + this.DebuggerToolbar.style.MozOpacity = (opacity / 100); + this.DebuggerToolbar.style.KhtmlOpacity = (opacity / 100); + this.DebuggerToolbar.style.filter = "alpha(opacity=" + opacity + ")"; } +Debugger.prototype.ToolbarClick = function ($button) { + switch ($button.id) { + case 'dbg_ReloadFrame': + self.location.reload(); + break; + + case 'dbg_ShowDebugger': + this.Toggle(); + break; + } +} + Debugger.prototype.AddToolbar = function($var_name) { var $span = document.createElement('SPAN'); $span.style.position = 'absolute'; - $span.innerHTML = '

">"> - +
Password*: - +
- +
[] " name="" value="10" /> - - " + id="_cb_" checked onchange="update_checkbox(this, document.getElementById(''));" onclick="inherited_click('', , this.checked, '_cb_')" /> " name="" value="10" /> - - " + id="_cb_" disabled="disabled" checked onchange="update_checkbox(this, document.getElementById(''));" onclick="update_light('', this.checked)" /> " src="img/perm_greenred.gif"/>

'; - + var $toolbar_content = '
Reload FrameShow Debugger (' + this.ErrorsCount + ' errors)Show Debugger' + this.SQLCount + ' sqls
' + $toolbar_content + '
'; + this.DebuggerToolbar = $span; this.SetOpacity(20); $span.onmouseover = function() { Index: trunk/kernel/units/relationship/relationship_event_handler.php =================================================================== diff -u -r7391 -r7635 --- trunk/kernel/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 7391) +++ trunk/kernel/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 7635) @@ -65,7 +65,7 @@ $sql = 'SELECT ResourceId FROM '.$this->Application->getUnitOption($target_prefix, 'TableName').' - WHERE '.$this->Application->getUnitOption($target_prefix, 'IDField').' = '.$target_id; + WHERE '.$this->Application->getUnitOption($target_prefix, 'IDField').' IN ('.$target_id.')'; $target_id = $this->Conn->GetOne($sql); $target_type = $this->Application->getUnitOption($target_prefix, 'ItemType'); @@ -82,10 +82,10 @@ // place correct template in opener stack $source_prefix = $this->Application->getUnitOption($event->Prefix, 'ParentPrefix'); $template = $this->Application->getUnitOption($source_prefix, 'AdminTemplatePath').'/relations_edit'; - + $redirect_params = Array($event->Prefix.'_event' => 'OnNew', 'target_id' => $target_id, 'm_opener' => 's', 'target_type' => $target_type); $this->Application->EventManager->openerStackPush($template, $redirect_params, 'all,'.$event->Prefix); - + // $event->SetRedirectParam('popup_stay', 1); // if popup mode, then set this } } @@ -236,7 +236,7 @@ $prefix = 'c'; } if (!$this->Application->prefixRegistred($prefix)) continue; - + $configs[$prefix] = $this->Application->getUnitOptions($prefix); if($configs[$prefix] === false) unset($configs[$prefix]); if(!isset($configs[$prefix]['CatalogItem']) || !$configs[$prefix]['CatalogItem']) unset($configs[$prefix]); Index: trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php =================================================================== diff -u -r7537 -r7635 --- trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php (.../commands.php) (revision 7537) +++ trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php (.../commands.php) (revision 7635) @@ -89,18 +89,34 @@ $application =& kApplication::Instance(); $application->Init(); - $lang = $application->GetVar('m_lang'); + if ($application->isModuleEnabled('Proj-CMS')) { + $lang = $application->GetVar('m_lang'); - $query = 'SELECT PageId, Path, l'.$lang.'_Title AS Title FROM '.TABLE_PREFIX.'Pages ORDER By l'.$lang.'_Title'; - $pages = $application->Conn->Query($query); + $query = 'SELECT CategoryId, NamedParentPath, l'.$lang.'_Title AS Title FROM '.TABLE_PREFIX.'Category ORDER By l'.$lang.'_Title'; + $pages = $application->Conn->Query($query); - $res = ''; - foreach ($pages as $page) { - $page_path = $page['Path'].'.html'; - $title = $page['Title'].' ('.$page_path.')'; - $res .= ''; + $res = ''; + foreach ($pages as $page) { + $page_path = preg_replace('/^content\//', '', strtolower($page['NamedParentPath']).'.html'); + $title = $page['Title'].' ('.$page_path.')'; + $res .= ''; + } } + else { + $lang = $application->GetVar('m_lang'); + + $query = 'SELECT PageId, Path, l'.$lang.'_Title AS Title FROM '.TABLE_PREFIX.'Pages ORDER By l'.$lang.'_Title'; + $pages = $application->Conn->Query($query); + + $res = ''; + foreach ($pages as $page) { + $page_path = $page['Path'].'.html'; + $title = $page['Title'].' ('.$page_path.')'; + $res .= ''; + } + } + return $res; } function ReadCmsTree($st_id, $level = 0) Index: trunk/core/units/category_items/category_items_event_handler.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/category_items/category_items_event_handler.php (.../category_items_event_handler.php) (revision 7391) +++ trunk/core/units/category_items/category_items_event_handler.php (.../category_items_event_handler.php) (revision 7635) @@ -25,7 +25,7 @@ { $object =& $event->getObject( Array('skip_autoload' => true) ); $ids = $this->StoreSelectedIDs($event); - + if($ids) { $id = array_shift($ids); @@ -34,7 +34,7 @@ $this->Conn->Query('UPDATE '.$object->TableName.' SET PrimaryCat = 0 WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']); $this->Conn->Query('UPDATE '.$object->TableName.' SET PrimaryCat = 1 WHERE ('.$table_info['ForeignKey'].' = '.$table_info['ParentId'].') AND (CategoryId = '.$id.')'); } - $event->redirect_params = Array('opener' => 's', 'pass_events' => true); //stay! + $event->redirect_params = Array('opener' => 's'); //stay! } /** Index: trunk/core/units/users/users_config.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/users/users_config.php (.../users_config.php) (revision 7391) +++ trunk/core/units/users/users_config.php (.../users_config.php) (revision 7635) @@ -66,19 +66,23 @@ ), 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('u'=>'!la_title_Adding_User!'), - 'edit_status_labels' => Array('u'=>'!la_title_Editing_User!'), - 'new_titlefield' => Array('u'=>'!la_title_New_User!'), - ), + 'default' => Array( + 'new_status_labels' => Array('u'=>'!la_title_Adding_User!'), + 'edit_status_labels' => Array('u'=>'!la_title_Editing_User!'), + 'new_titlefield' => Array('u'=>'!la_title_New_User!'), + ), - 'users_list' => Array('prefixes' => Array('u_List'), 'format' => "!la_title_Users! (#u_recordcount#)"), + 'users_list' => Array('prefixes' => Array('u_List'), 'format' => "!la_title_Users! (#u_recordcount#)"), - 'users_edit' => Array('prefixes' => Array('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_General!"), + 'users_edit' => Array('prefixes' => Array('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_General!"), + 'users_custom' => Array('prefixes' => Array('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Custom!"), + + 'users_select' => Array('prefixes' => Array('u_List'), 'format' => "!la_title_Users! (#u_recordcount#) - !la_title_SelectUser!"), - 'users_select' => Array('prefixes' => Array('u_List'), 'format' => "!la_title_Users! (#u_recordcount#) - !la_title_SelectUser!"), + 'user_groups_list' => Array('prefixes' => Array('u', 'u-ug_List'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Groups! (#u-ug_recordcount#)"), - 'tree_users' => Array('format' => '!la_section_overview!'), - ), + 'tree_users' => Array('format' => '!la_section_overview!'), + ), 'PermSection' => Array('main' => 'in-portal:user_list', 'email' => 'in-portal:user_email', 'custom' => 'in-portal:user_custom'), Index: trunk/core/install/upgrades.sql =================================================================== diff -u --- trunk/core/install/upgrades.sql (revision 0) +++ trunk/core/install/upgrades.sql (revision 7635) @@ -0,0 +1,13 @@ +# ===== v 1.3.5 ===== +SELECT * FROM Modules; +SELECT Name FROM Modules; + +# ===== v 4.0.1 ===== +ALTER TABLE Modules ADD COLUMN NotCool VARCHAR(255); + +# ===== v 4.0.12 ===== +# multiline +UPDATE Modules SET Name = 'dummy' WHERE Name = 'dummy'; + +# ===== v 4.0.15 ===== +UPDATE Modules SET Name = 'dummy' WHERE Name = 'dummy'; \ No newline at end of file Index: trunk/core/units/modules/modules_config.php =================================================================== diff -u -r7391 -r7635 --- trunk/core/units/modules/modules_config.php (.../modules_config.php) (revision 7391) +++ trunk/core/units/modules/modules_config.php (.../modules_config.php) (revision 7635) @@ -42,7 +42,7 @@ 'parent' => 'in-portal:modules', 'icon' => 'modules', 'label' => 'la_title_Module_Status', - 'url' => Array('t' => 'in-portal/modules/modules_list', 'pass' => 'm'), + 'url' => Array('t' => 'modules/modules_list', 'pass' => 'm'), 'permissions' => Array('view', 'edit', 'advanced:approve', 'advanced:decline'), 'priority' => 1, 'type' => stTREE, Index: trunk/core/admin_templates/img/tab_back3.jpg =================================================================== diff -u Binary files differ Index: trunk/core/admin_templates/categories/permissions_tab.tpl =================================================================== diff -u -r6093 -r7635 --- trunk/core/admin_templates/categories/permissions_tab.tpl (.../permissions_tab.tpl) (revision 6093) +++ trunk/core/admin_templates/categories/permissions_tab.tpl (.../permissions_tab.tpl) (revision 7635) @@ -2,6 +2,8 @@
_div" prefix="" group_id="-1" class="catalog-tab">
+ + if ($request_visible) { document.getElementById('_div').setAttribute('group_id', ); } @@ -15,44 +17,44 @@
[] " name="" value="10" /> - - " + id="_cb_" checked onchange="update_checkbox(this, document.getElementById(''));" onclick="inherited_click('', , this.checked, '_cb_')" /> " name="" value="10" /> - - " + id="_cb_" disabled="disabled" checked onchange="update_checkbox(this, document.getElementById(''));" onclick="update_light('', this.checked)" /> " src="img/perm_greenred.gif"/> - +
+
Search:  Index: trunk/kernel/include/customfield.php =================================================================== diff -u -r7391 -r7635 --- trunk/kernel/include/customfield.php (.../customfield.php) (revision 7391) +++ trunk/kernel/include/customfield.php (.../customfield.php) (revision 7635) @@ -2,11 +2,11 @@ class clsCustomField extends clsItem { - + function clsCustomField($CustomFieldId=-1) { $this->clsItem(); - $this->tablename=GetTablePrefix()."CustomField"; + $this->tablename=GetTablePrefix()."CustomField"; $this->type=10; $this->BasePermission=""; $this->id_field = "CustomFieldId"; @@ -31,27 +31,27 @@ $a->ElementType="text"; if(!strlen($a->prompt)) $a->prompt = "lu_fieldcustom__".strtolower($this->Get("FieldName")); - return $a; - } - + return $a; + } + function parsetag($tag) - { + { if(is_object($tag)) - { + { $tagname = $tag->name; } else $tagname = $tag; switch($tagname) - { + { case "fieldlabel": return $this->Get("FieldLabel"); break; - + case "fieldname": return $this->Get("FieldName"); break; - + case "customfieldid": return $this->Get("CustomFieldId"); @@ -75,7 +75,7 @@ if ($table == 'CustomField') { $table = GetTablePrefix().$table; } - + $this->SourceTable = $table; if ($this->Type > 0) { $this->LoadFields(); @@ -87,39 +87,39 @@ $this->Clear(); $sql = 'SELECT * FROM '.$this->SourceTable.' - WHERE Type = '.$this->Type.' AND IsSystem = 0 + WHERE Type = '.$this->Type.' AND (IsSystem = 0 OR OnGeneralTab = 1) ORDER BY DisplayOrder DESC, CustomFieldId ASC'; - if($this->debuglevel > 1) + if($this->debuglevel > 1) echo $sql."
\n"; $rs = $this->adodbConnection->Execute($sql); - + while($rs && !$rs->EOF) { $data = $rs->fields; $this->AddItemFromArray($data); $rs->MoveNext(); - } + } } function LoadFieldsAndValues($ResourceId, $main_prefix, $temp_table = false) { $this->Clear(); - + $table = $this->Application->getUnitOption($main_prefix.'-cdata', 'TableName'); if ($temp_table) { $table = $this->Application->GetTempName($table, 'prefix:'.$main_prefix); } - + $sql = 'SELECT * FROM '.$table.' WHERE ResourceId = '.$ResourceId; $custom_data = $this->adodbConnection->GetRow($sql); - + $sql = 'SELECT * FROM '.TABLE_PREFIX.'CustomField WHERE Type = '.$this->Application->getUnitOption($main_prefix, 'ItemType'); $custom_fields = $this->Conn->Query($sql, 'CustomFieldId'); - + $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); foreach ($custom_fields as $custom_id => $custom_info) { $custom_name = $ml_formatter->LangFieldName('cust_'.$custom_id); @@ -128,7 +128,7 @@ $this->AddItemFromArray($custom_info); } } - + function GetFieldUIList($GeneralTab=FALSE) { $ret = new clsConfigAdmin(); @@ -185,9 +185,9 @@ $ElementType="",$ValueList="") { global $objItemTypes,$objSearchConfig,$objLanguages; - + //if(!is_numeric($Type)) - // { + // { $f = new clsCustomField(); $f->tablename = $this->SourceTable; $f->Set(array("Type","FieldName","FieldLabel","OnGeneralTab","Heading","Prompt", @@ -203,56 +203,56 @@ $Header = "la_text_".strtolower($Item->Get("ItemName")); $Module = $Item->Get("Module"); // $Desc = $FieldLabel; - + if(!is_object($objSearchConfig)) { $objSearchConfig = new clsSearchConfigList(); } - + $NextOrder = $objSearchConfig->GetNextDisplayOrder($Module); $desc = "lu_fieldcustom__".strtolower($FieldName); if(!strlen($FieldLabel)) { $FieldLabel = $FieldName; } - + $l = $objLanguages->GetPrimary(); $phrases = new clsPhraseList(); - $phrases->AddPhrase($desc,$l,$FieldLabel,2, $Item->Get('Module') ); - + $phrases->AddPhrase($desc,$l,$FieldLabel,2, $Item->Get('Module') ); + $dtable = GetTablePrefix()."CustomMetaData"; $Join = "($dtable.ResourceId={Table}.ResourceId)"; $objSearchConfig->AddSearchField($Table,$FieldName,$Module,$Type == 6 ? -1 : 0,0, $FieldLabel,$desc,$Header,$NextOrder,0, $ElementType, NULL, NULL, NULL, NULL, NULL, $f->Get("CustomFieldId"), NULL); - } + } return $f; //} //else // return FALSE; } - + function EditField($FieldId,$Type,$FieldName,$FieldLabel,$ShowGeneral=0,$Heading="", $Prompt="",$ElementType="",$ValueList="") { global $objSearchConfig; - + $f = $this->GetItem($FieldId); $f->Set(array("Type","FieldName","FieldLabel","OnGeneralTab","Heading","Prompt","ElementType","ValueList"), array($Type,$FieldName,$FieldLabel,$ShowGeneral,$Heading,$Prompt,$ElementType,$ValueList)); $f->Update(); - + $db =& $this->adodbConnection; - - if (!$FieldLabel) $FieldLabel = $FieldName; + + if (!$FieldLabel) $FieldLabel = $FieldName; $sql = 'UPDATE '.GetTablePrefix().'SearchConfig SET FieldType = '.$db->qstr($ElementType).', DisplayName = '.$db->qstr('lu_fieldcustom__'.strtolower($FieldName)).', FieldName = '.$db->qstr($FieldName).', Description = '.$db->qstr($FieldLabel).' WHERE CustomFieldId = '.$FieldId; $this->adodbConnection->Execute($sql); - + return $f; } @@ -271,17 +271,17 @@ if(!is_object($objSearchConfig)) { $objSearchConfig = new clsSearchConfigList($Module); - } - + } + $sql = 'DELETE FROM '.$objSearchConfig->SourceTable.' WHERE CustomFieldId = '.$FieldId; $this->adodbConnection->Execute($sql); - + $phrase_name = 'lu_fieldcustom__'.strtolower($f->Get('FieldName')); $sql = 'DELETE FROM '.GetTablePrefix().'Phrase WHERE Phrase = '.$this->adodbConnection->qstr($phrase_name); $this->adodbConnection->Execute($sql); } $f->Delete(); - } + } }/*clsCustomFieldList*/ Index: trunk/kernel/units/modules/modules_event_handler.php =================================================================== diff -u -r6625 -r7635 --- trunk/kernel/units/modules/modules_event_handler.php (.../modules_event_handler.php) (revision 6625) +++ trunk/kernel/units/modules/modules_event_handler.php (.../modules_event_handler.php) (revision 7635) @@ -61,7 +61,7 @@ if ($object->Update()) { $event->status = erSUCCESS; - $event->redirect_params = Array('opener' => 's', 'pass_events' => true); //stay! + $event->redirect_params = Array('opener' => 's'); //stay! } else { $event->status = erFAIL; Index: trunk/admin/editor/cmseditor/editor/dialog/fck_document/audio.gif =================================================================== diff -u Binary files differ Index: trunk/admin/editor/cmseditor/editor/dialog/fck_document/image.gif =================================================================== diff -u Binary files differ Index: trunk/core/install/incs/style.css =================================================================== diff -u -r6685 -r7635 --- trunk/core/install/incs/style.css (.../style.css) (revision 6685) +++ trunk/core/install/incs/style.css (.../style.css) (revision 7635) @@ -204,3 +204,10 @@ .link { cursor: pointer; } + +.hint { + font-size: 12px; + color: #666666; + font-style: normal; + font-family: Arial, Helvetica, sans-serif; +} Index: trunk/core/admin_templates/img/icons/icon46_modules.gif =================================================================== diff -u Binary files differ Index: trunk/kernel/admin_templates/popups/translator.tpl =================================================================== diff -u -r6669 -r7635 --- trunk/kernel/admin_templates/popups/translator.tpl (.../translator.tpl) (revision 6669) +++ trunk/kernel/admin_templates/popups/translator.tpl (.../translator.tpl) (revision 7635) @@ -22,7 +22,6 @@ -