Index: branches/unlabeled/unlabeled-1.3.2/core/install/install_data.sql =================================================================== diff -u -r7345 -r7456 --- branches/unlabeled/unlabeled-1.3.2/core/install/install_data.sql (.../install_data.sql) (revision 7345) +++ branches/unlabeled/unlabeled-1.3.2/core/install/install_data.sql (.../install_data.sql) (revision 7456) @@ -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', '4.0.0', 1, 1, '', 0, '0'); Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/modules/modules_list.tpl =================================================================== diff -u --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/modules/modules_list.tpl (revision 0) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/modules/modules_list.tpl (revision 7456) @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + +
+ +
+ + + + + \ No newline at end of file Index: branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php =================================================================== diff -u -r7368 -r7456 --- branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php (.../application.php) (revision 7368) +++ branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php (.../application.php) (revision 7456) @@ -363,6 +363,13 @@ return; } + $path = $this->GetFrontThemePath(); + if ($path === false) { + $this->ApplicationDie('No Primary Theme Selected or Current Theme is Unknonw or Disabled'); + } + safeDefine('THEMES_PATH', $path); + /* + $theme_id = $this->GetVar('m_theme'); if (!$theme_id) { $theme_id = $this->GetDefaultThemeId(); @@ -377,8 +384,32 @@ if (!defined('IS_INSTALL')) $this->ApplicationDie('Unknown or disabled theme'); } safeDefine('THEMES_PATH', '/themes/'.$theme->GetDBField('Name')); +*/ + } + function GetFrontThemePath($force=0) + { + static $path=null; + if (!$force && isset($path)) return $path; + + $theme_id = $this->GetVar('m_theme'); + if (!$theme_id) { + $theme_id = $this->GetDefaultThemeId(1); //1 to force front-end mode! + if (!$theme_id) { + return false; + } + } + $this->SetVar('m_theme', $theme_id); + $this->SetVar('theme.current_id', $theme_id ); // KOSTJA: this is to fool theme' getPassedId + $theme =& $this->recallObject('theme.current'); + if (!$theme->IsLoaded() || !$theme->GetDBField('Enabled')) { + return false; + } + $path = '/themes/'.$theme->GetDBField('Name'); + return $path; + } + function GetDefaultLanguageId() { static $language_id = 0; @@ -399,7 +430,7 @@ return $language_id; } - function GetDefaultThemeId() + function GetDefaultThemeId($force_front=0) { static $theme_id = 0; @@ -408,7 +439,7 @@ if (constOn('DBG_FORCE_THEME')) { $theme_id = DBG_FORCE_THEME; } - elseif ($this->IsAdmin()) { + elseif (!$force_front && $this->IsAdmin()) { $theme_id = 999; } else { @@ -590,7 +621,7 @@ * * @access private */ - function SetDefaultConstants() + function SetDefaultConstants() // it's defined in startup.php - can be removed?? { safeDefine('SERVER_NAME', $_SERVER['HTTP_HOST']); } @@ -1592,7 +1623,7 @@ if (!$this->IsAdmin()) { // needed for "profile edit", "registration" forms ON FRONT ONLY - $this->SetVar('u_id', $user_id); + $this->SetVar('u_id', $user_id); } $this->StoreVar('user_id', $user_id); Index: branches/unlabeled/unlabeled-1.2.54/admin/editor/cmseditor/editor/dialog/fck_document.html =================================================================== diff -u -r1456 -r7456 --- branches/unlabeled/unlabeled-1.2.54/admin/editor/cmseditor/editor/dialog/fck_document.html (.../fck_document.html) (revision 1456) +++ branches/unlabeled/unlabeled-1.2.54/admin/editor/cmseditor/editor/dialog/fck_document.html (.../fck_document.html) (revision 7456) @@ -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       Index: branches/unlabeled/unlabeled-1.19.2/core/units/languages/languages_config.php =================================================================== diff -u -r7088 -r7456 --- branches/unlabeled/unlabeled-1.19.2/core/units/languages/languages_config.php (.../languages_config.php) (revision 7088) +++ branches/unlabeled/unlabeled-1.19.2/core/units/languages/languages_config.php (.../languages_config.php) (revision 7456) @@ -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: branches/unlabeled/unlabeled-1.6.2/core/units/modules/modules_config.php =================================================================== diff -u -r7345 -r7456 --- branches/unlabeled/unlabeled-1.6.2/core/units/modules/modules_config.php (.../modules_config.php) (revision 7345) +++ branches/unlabeled/unlabeled-1.6.2/core/units/modules/modules_config.php (.../modules_config.php) (revision 7456) @@ -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: branches/unlabeled/unlabeled-1.2.16/core/kernel/utility/formatters/multilang_formatter.php =================================================================== diff -u -r6110 -r7456 --- branches/unlabeled/unlabeled-1.2.16/core/kernel/utility/formatters/multilang_formatter.php (.../multilang_formatter.php) (revision 6110) +++ branches/unlabeled/unlabeled-1.2.16/core/kernel/utility/formatters/multilang_formatter.php (.../multilang_formatter.php) (revision 7456) @@ -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: branches/unlabeled/unlabeled-1.68.2/core/units/users/users_event_handler.php =================================================================== diff -u -r7424 -r7456 --- branches/unlabeled/unlabeled-1.68.2/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 7424) +++ branches/unlabeled/unlabeled-1.68.2/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 7456) @@ -38,17 +38,17 @@ { $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 * @@ -131,7 +131,7 @@ $password = $this->Application->GetVar('password'); if(!$password) { - $object->SetError('ValidateLogin', 'blank_password', 'lu_blank_password'); + $object->SetError('ValidateLogin', 'invalid_password', 'lu_invalid_password'); $event->status = erFAIL; return false; } @@ -144,7 +144,7 @@ $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'); @@ -219,7 +219,7 @@ $object->SetError('ValidateLogin', 'invalid_password', 'lu_invalid_password'); $event->status = erFAIL; } - + $event->SetRedirectParam('pass', 'm'); } @@ -333,7 +333,7 @@ if ($this->Application->ConfigValue('UseJSRedirect')) { $event->SetRedirectParam('js_redirect', 1); } - + $event->SetRedirectParam('pass', 'm'); } @@ -370,7 +370,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'); @@ -597,7 +597,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(); @@ -614,7 +614,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; @@ -668,7 +668,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'; @@ -771,7 +771,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 @@ -882,7 +882,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 @@ -1072,7 +1072,7 @@ } return parent::getPassedID($event); } - + /** * Allows to change root password * @@ -1085,15 +1085,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: branches/unlabeled/unlabeled-1.1.2/admin/editor/cmseditor/editor/dialog/fck_document/pdf.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.28.2/core/units/languages/languages_event_handler.php =================================================================== diff -u -r6873 -r7456 --- branches/unlabeled/unlabeled-1.28.2/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 6873) +++ branches/unlabeled/unlabeled-1.28.2/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 7456) @@ -433,6 +433,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: branches/unlabeled/unlabeled-1.1.2/admin/editor/cmseditor/editor/dialog/fck_document/ppt.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.1.2/admin/editor/cmseditor/editor/dialog/fck_document/audio.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.1.2/admin/editor/cmseditor/editor/dialog/fck_document/xml.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.1.2/admin/editor/cmseditor/editor/dialog/fck_document/excel.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.1.2/admin/editor/cmseditor/editor/dialog/fck_document/doc.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r7432 -r7456 --- branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7432) +++ branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7456) @@ -841,31 +841,31 @@ 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 @@ -1361,7 +1361,7 @@ } function GridInfo($params) { - $object =& $this->getObject($params); + $object =& $this->GetList($params); /* @var $object kDBList */ switch ($params['type']) { @@ -1779,6 +1779,8 @@ $value = $this->Field($params); $name = $this->InputName($params); + $theme_path = $this->Application->BaseURL().substr($this->Application->GetFrontThemePath(), 1); + include_once(FULL_PATH.'/core/cmseditor/fckeditor.php'); $oFCKeditor = new FCKeditor($name); $oFCKeditor->BasePath = BASE_PATH.'/core/cmseditor/'; @@ -1791,7 +1793,9 @@ '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, @@ -1814,7 +1818,7 @@ function ItemLink($params) { $object =& $this->getObject($params); - + $params['pass'] = 'm'; $params[$object->getPrefixSpecial().'_id'] = $object->GetID(); Index: branches/unlabeled/unlabeled-1.1.2/admin/editor/cmseditor/editor/dialog/fck_document/image.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.1.2/admin/editor/cmseditor/editor/dialog/fck_document/video.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.52.30/core/kernel/utility/http_query.php =================================================================== diff -u -r4852 -r7456 --- branches/unlabeled/unlabeled-1.52.30/core/kernel/utility/http_query.php (.../http_query.php) (revision 4852) +++ branches/unlabeled/unlabeled-1.52.30/core/kernel/utility/http_query.php (.../http_query.php) (revision 7456) @@ -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: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/img/icons/icon46_modules.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/img/icons/icon24_modules.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/img/icons/icon46_list_modules.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/inp_fckconfig.js =================================================================== diff -u -r7068 -r7456 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/inp_fckconfig.js (.../inp_fckconfig.js) (revision 7068) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/inp_fckconfig.js (.../inp_fckconfig.js) (revision 7456) @@ -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 ;