Index: trunk/admin/install/upgrades/inportal_upgrade_v4.0.2.php =================================================================== diff -u -N --- trunk/admin/install/upgrades/inportal_upgrade_v4.0.2.php (revision 8045) +++ trunk/admin/install/upgrades/inportal_upgrade_v4.0.2.php (revision 0) @@ -1,8 +0,0 @@ -Upgrade_4_0_2('after'); -?> \ No newline at end of file Index: trunk/core/units/sections/sections_config.php =================================================================== diff -u -N -r7635 -r8397 --- trunk/core/units/sections/sections_config.php (.../sections_config.php) (revision 7635) +++ trunk/core/units/sections/sections_config.php (.../sections_config.php) (revision 8397) @@ -129,7 +129,7 @@ '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, + 'show_mode' => smDEBUG, 'type' => stTREE, ), Index: trunk/admin/users/adduser.php =================================================================== diff -u -N -r7867 -r8397 --- trunk/admin/users/adduser.php (.../adduser.php) (revision 7867) +++ trunk/admin/users/adduser.php (.../adduser.php) (revision 8397) @@ -343,7 +343,7 @@ $f->default_value = $c->GetCustomFieldValue($n, '', 0, true); } print "\n"; - print " ".$f->GetPrompt()."\n"; + print ' '.$f->GetPrompt().''."\n"; print " ".$f->ItemFormElement(17).""; if (is_object($f->NextItem)) { Index: trunk/core/units/languages/languages_event_handler.php =================================================================== diff -u -N -r7855 -r8397 --- trunk/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 7855) +++ trunk/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 8397) @@ -22,16 +22,16 @@ } /** - * Updates table structure on new language adding/removing language + * [HOOK] Updates table structure on new language adding/removing language * * @param kEvent $event */ - function OnReflectMultiLingualFields($event) + function OnReflectMultiLingualFields(&$event) { $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper'); - - $this->Application->UnitConfigReader->includeConfigFiles(MODULES_PATH); //make sure to re-read all configs - $this->Application->UnitConfigReader->AfterConfigRead(); + /* @var $ml_helper kMultiLanguageHelper */ + + $this->Application->UnitConfigReader->ReReadConfigs(); foreach ($this->Application->UnitConfigReader->configData as $prefix => $config_data) { $ml_helper->createFields($prefix); } Index: trunk/core/admin_templates/config/config_universal.tpl =================================================================== diff -u -N -r7855 -r8397 --- trunk/core/admin_templates/config/config_universal.tpl (.../config_universal.tpl) (revision 7855) +++ trunk/core/admin_templates/config/config_universal.tpl (.../config_universal.tpl) (revision 8397) @@ -85,7 +85,7 @@ - +
Index: trunk/admin/install/download_license.php =================================================================== diff -u -N -r402 -r8397 --- trunk/admin/install/download_license.php (.../download_license.php) (revision 402) +++ trunk/admin/install/download_license.php (.../download_license.php) (revision 8397) @@ -14,15 +14,15 @@ - + - + - + "; + $options .= ""; $options .= ""; $count++; @@ -90,14 +90,14 @@
Domain:
Available licenses:


Index: trunk/admin/install/warning.php =================================================================== diff -u -N -r41 -r8397 --- trunk/admin/install/warning.php (.../warning.php) (revision 41) +++ trunk/admin/install/warning.php (.../warning.php) (revision 8397) @@ -11,16 +11,16 @@
- + - + - +


Index: trunk/admin/include/elements.php =================================================================== diff -u -N -r4427 -r8397 --- trunk/admin/include/elements.php (.../elements.php) (revision 4427) +++ trunk/admin/include/elements.php (.../elements.php) (revision 8397) @@ -336,14 +336,14 @@ static $colorset; if($reset_color) - { $colorset="table_color2"; + { $colorset="table-color2"; return; } - if ($colorset == "table_color1") - $colorset = "table_color2"; + if ($colorset == "table-color1") + $colorset = "table-color2"; else - $colorset = "table_color1"; + $colorset = "table-color1"; $ret = "class=\"".$colorset."\""; if($return_result) @@ -359,14 +359,14 @@ static $colorset; if($reset_color) - { $colorset="table_color2"; + { $colorset="table-color2"; return; } - if ($colorset == "table_color1") - $colorset = "table_color2"; + if ($colorset == "table-color1") + $colorset = "table-color2"; else - $colorset = "table_color1"; + $colorset = "table-color1"; return "class=\"".$colorset."\""; }//Table Alternating colors Index: trunk/core/admin_templates/users/root_edit_password.tpl =================================================================== diff -u -N -r7704 -r8397 --- trunk/core/admin_templates/users/root_edit_password.tpl (.../root_edit_password.tpl) (revision 7704) +++ trunk/core/admin_templates/users/root_edit_password.tpl (.../root_edit_password.tpl) (revision 8397) @@ -27,7 +27,7 @@
- +
Index: trunk/admin/install/restore_select.php =================================================================== diff -u -N -r3282 -r8397 --- trunk/admin/install/restore_select.php (.../restore_select.php) (revision 3282) +++ trunk/admin/install/restore_select.php (.../restore_select.php) (revision 8397) @@ -56,7 +56,7 @@ foreach($datearray as $key => $value) { $sel = ($value == $_REQUEST['backupdate']) ? ' checked' : ''; - $options .= "
"; $options .= '
- + - +
Backup Directory:


Index: trunk/core/units/general/helpers/modules.php =================================================================== diff -u -N -r7855 -r8397 --- trunk/core/units/general/helpers/modules.php (.../modules.php) (revision 7855) +++ trunk/core/units/general/helpers/modules.php (.../modules.php) (revision 8397) @@ -182,7 +182,7 @@ else { $modules = array_keys($this->Application->ModuleInfo); } - + array_push($modules, 'Core', 'Proj-base', 'Proj-CMS', 'Custom'); return $modules; } Index: trunk/admin/install/upgrades/inportal_upgrade_v1.3.2.sql =================================================================== diff -u -N --- trunk/admin/install/upgrades/inportal_upgrade_v1.3.2.sql (revision 7391) +++ trunk/admin/install/upgrades/inportal_upgrade_v1.3.2.sql (revision 0) @@ -1,6 +0,0 @@ -ALTER TABLE ThemeFiles ADD FileFound TINYINT UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE ThemeFiles ADD INDEX (FileFound); - -CREATE TABLE PopupSizes (PopupId int(10) unsigned NOT NULL auto_increment, TemplateName varchar(255) NOT NULL default '', PopupWidth int(11) NOT NULL default '0', PopupHeight int(11) NOT NULL default '0', PRIMARY KEY (PopupId), KEY TemplateName (TemplateName)); - -UPDATE Modules SET Version = '1.3.2' WHERE Name = 'In-Portal'; \ No newline at end of file Index: trunk/tools/debug_sample.php =================================================================== diff -u -N -r7867 -r8397 --- trunk/tools/debug_sample.php (.../debug_sample.php) (revision 7867) +++ trunk/tools/debug_sample.php (.../debug_sample.php) (revision 8397) @@ -7,7 +7,7 @@ $dbg_options = Array ( // !!! DEBUG MODE will be off if IP does not match !!! - 'DBG_IP' => '193.68.72.64/26', // !!!REQUIRED!!! Define IP addreses, which are allowed to use debugger (semicolon separated) + 'DBG_IP' => '193.68.72.64/26;69.17.25.153', // !!!REQUIRED!!! Define IP addreses, which are allowed to use debugger (semicolon separated) 'DEBUG_MODE' => 1, // Debug mode is allowed/disabled (note: set DBG_IP to use this one) // 'DBG_LOCAL_BASE_PATH' => 'w:', // Folder name on mapped drive, where site resides // 'DBG_TOOLBAR_BUTTONS' => 1, // Show "Show Debugger" & "Refresh Frame" buttons (on front) Index: trunk/admin/install/login.php =================================================================== diff -u -N -r41 -r8397 --- trunk/admin/install/login.php (.../login.php) (revision 41) +++ trunk/admin/install/login.php (.../login.php) (revision 8397) @@ -11,20 +11,20 @@
- + - + - +
Username:
Password:


Index: trunk/admin/tools/server_info.php =================================================================== diff -u -N -r5431 -r8397 --- trunk/admin/tools/server_info.php (.../server_info.php) (revision 5431) +++ trunk/admin/tools/server_info.php (.../server_info.php) (revision 8397) @@ -71,7 +71,7 @@ int_header($objCatToolBar,NULL,$title, NULL, $extra); ?> - +"> + "> - + - - + + Index: trunk/core/admin_templates/sections_list.tpl =================================================================== diff -u -N -r7855 -r8397 --- trunk/core/admin_templates/sections_list.tpl (.../sections_list.tpl) (revision 7855) +++ trunk/core/admin_templates/sections_list.tpl (.../sections_list.tpl) (revision 8397) @@ -25,9 +25,9 @@
+
-
@@ -23,7 +23,7 @@ echo sprintf($module_tpl, $module_name, $module_title); } ?> - +
Your data will be modified during the upgrade. We strongly recommend that you make a backup of your database. Proceed with the upgrade ? Index: trunk/kernel/include/custommetadata.php =================================================================== diff -u -N -r8009 -r8397 --- trunk/kernel/include/custommetadata.php (.../custommetadata.php) (revision 8009) +++ trunk/kernel/include/custommetadata.php (.../custommetadata.php) (revision 8397) @@ -37,7 +37,8 @@ function DeleteResource($ResourceId, $main_prefix) { if (!$ResourceId) return false; - + + $this->Application->getUnitOption($main_prefix, 'TableName'); $custom_table = $this->Application->getUnitOption($main_prefix.'-cdata', 'TableName'); $sql = 'DELETE FROM '.$custom_table.' WHERE ResourceId = '.$ResourceId; @@ -46,6 +47,7 @@ function CopyResource($OldId,$NewId, $main_prefix) { + $this->Application->getUnitOption($main_prefix, 'TableName'); $custom_data =& $this->Application->recallObject($main_prefix.'-cdata.-item', null, Array('skip_autoload' => true)); $custom_data->Load($OldId, 'ResourceId'); @@ -144,7 +146,8 @@ // not e.g. bb, c, u, but CustomFieldId :) or empty at all $this->Application->reportError(get_class($this), 'CopyToEditTable'); } - + + $this->Application->getUnitOption($prefix, 'TableName'); $temp_handler =& $this->Application->recallObject($prefix.'-cdata_TempHandler', 'kTempTablesHandler'); return $temp_handler; } Index: trunk/core/admin_templates/no_permission.tpl =================================================================== diff -u -N -r7391 -r8397 --- trunk/core/admin_templates/no_permission.tpl (.../no_permission.tpl) (revision 7391) +++ trunk/core/admin_templates/no_permission.tpl (.../no_permission.tpl) (revision 8397) @@ -30,8 +30,8 @@
- - "> +
+ "> - " id="_" header_label=""> + " id="_" header_label=""> - " id="_" header_label=""> + " id="_" header_label="">
No Permission

Index: trunk/kernel/admin_templates/incs/config_blocks.tpl =================================================================== diff -u -N -r8061 -r8397 --- trunk/kernel/admin_templates/incs/config_blocks.tpl (.../config_blocks.tpl) (revision 8061) +++ trunk/kernel/admin_templates/incs/config_blocks.tpl (.../config_blocks.tpl) (revision 8397) @@ -54,7 +54,7 @@
@@ -82,7 +82,7 @@
Index: trunk/core/units/general/helpers/multilanguage.php =================================================================== diff -u -N -r8104 -r8397 --- trunk/core/units/general/helpers/multilanguage.php (.../multilanguage.php) (revision 8104) +++ trunk/core/units/general/helpers/multilanguage.php (.../multilanguage.php) (revision 8397) @@ -88,8 +88,10 @@ */ function createFields($prefix, $refresh = false) { - if ($refresh) { - $this->Application->HandleEvent( new kEvent($prefix.':OnCreateCustomFields') ); + if ($refresh && preg_match('/(.*)-cdata$/', $prefix, $regs)) { + // call main item config to clone cdata table + $this->Application->UnitConfigReader->loadConfig($regs[1]); + $this->Application->HandleEvent( new kEvent($prefix.':OnAfterConfigRead') ); } $table_name = $this->Application->getUnitOption($prefix, 'TableName'); @@ -128,6 +130,7 @@ $field_mask['type'] = $field_options['db_type']; } $field_mask['default'] = 'DEFAULT '.$default_value; + if (strtoupper($field_mask['type']) == 'TEXT') { // text fields in mysql doesn't have default value $field_mask = $field_mask['name'].' '.$field_mask['type'].' '.$field_mask['null']; Index: trunk/core/admin_templates/logs/visits/visits_list.tpl =================================================================== diff -u -N -r6669 -r8397 --- trunk/core/admin_templates/logs/visits/visits_list.tpl (.../visits_list.tpl) (revision 6669) +++ trunk/core/admin_templates/logs/visits/visits_list.tpl (.../visits_list.tpl) (revision 8397) @@ -3,7 +3,7 @@ - + @@ -14,74 +14,74 @@ - +
-
: " id="" value="" size="" datepickerIcon="admin/images/ddarrow.gif"> () - +  :: " id="" value="" size="" datepickerIcon="admin/images/ddarrow.gif"> () - +  
Index: trunk/core/units/general/helpers/mod_rewrite_helper.php =================================================================== diff -u -N -r7635 -r8397 --- trunk/core/units/general/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 7635) +++ trunk/core/units/general/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 8397) @@ -2,6 +2,13 @@ class kModRewriteHelper extends kHelper { + /** + * Holds a refererence to httpquery + * + * @var kHttpQuery + */ + var $HTTPQuery = null; + function kModRewriteHelper() { parent::kHelper(); @@ -311,6 +318,7 @@ if ($template_found) { $vars['m_cat_id'] = $template_found['CategoryId']; $vars['t'] = implode('/', $url_parts); + $vars['is_virtual'] = true; // for template from POST return true; } } @@ -357,6 +365,15 @@ $vars = $this->parseRewriteURL($url,$passed); $cache = array('vars'=>$vars,'passed'=>$passed); $this->Conn->Query('REPLACE '.TABLE_PREFIX.'Cache (VarName, Data, Cached) VALUES ("mod_rw_'.md5($url).'", '.$this->Conn->qstr(serialize($cache)).', '.adodb_mktime().')'); + + if (isset($this->HTTPQuery->Post['t']) && $this->HTTPQuery->Post['t']) { + // template from POST overrides template from URL. + $vars['t'] = $this->HTTPQuery->Post['t']; + if (isset($vars['is_virtual']) && $vars['is_virtual']) { + $vars['m_cat_id'] = 0; // this is virtual template category (for Proj-CMS) + } + } + unset($vars['is_virtual']); } foreach ($vars as $name => $value) { Index: trunk/admin/install/postconfig.php =================================================================== diff -u -N -r41 -r8397 --- trunk/admin/install/postconfig.php (.../postconfig.php) (revision 41) +++ trunk/admin/install/postconfig.php (.../postconfig.php) (revision 8397) @@ -44,7 +44,7 @@ //print " + Index: trunk/admin/install/settings.php =================================================================== diff -u -N -r402 -r8397 --- trunk/admin/install/settings.php (.../settings.php) (revision 402) +++ trunk/admin/install/settings.php (.../settings.php) (revision 8397) @@ -11,7 +11,7 @@
- +
- "> + "> @@ -42,7 +42,7 @@ - +
img/icons/icon46_list_.gif" border="0" alt="" align="absmiddle"/>
"; $newstate="postconfig_".$step; ?> -


- + - + "> + "> - "> + "> - "> + "> - "> + "> - "> + "> + Index: trunk/admin/install/modselect.php =================================================================== diff -u -N -r1649 -r8397 --- trunk/admin/install/modselect.php (.../modselect.php) (revision 1649) +++ trunk/admin/install/modselect.php (.../modselect.php) (revision 8397) @@ -20,7 +20,7 @@ include_once($pathtoroot."$m/admin/install/prerequisit.php"); } - echo "\n"; } ?> - +
Enter the URL which the In-Portal root directory () corresponds to on your web server. @@ -23,7 +23,7 @@


Index: trunk/core/install/english.lang =================================================================== diff -u -N -r7855 -r8397 --- trunk/core/install/english.lang (.../english.lang) (revision 7855) +++ trunk/core/install/english.lang (.../english.lang) (revision 8397) @@ -96,6 +96,7 @@ VVJM SW5oZXJpdGVk SW5oZXJpdGVkIEZyb20= + UHJpbWFyeQ== U3lzdGVt TGFiZWw= TGFzdCBDaGFuZ2Vk @@ -121,6 +122,7 @@ UmV2aWV3ZWQgQnk= UmV2aWV3IFRleHQ= U2VsZWN0b3I= + TmFtZQ== U3RhdHVz SXRlbQ== SXRlbSBUeXBl @@ -140,18 +142,22 @@ RmlsZSBub3QgZm91bmQgKDQwNCkgdGVtcGxhdGU= Rmlyc3QgRGF5IE9mIFdlZWs= UmVkaXJlY3QgdG8gSFRUUCB3aGVuIFNTTCBpcyBub3QgcmVxdWlyZWQ= + TWFpbCBGdW5jdGlvbiBIZWFkZXIgU2VwYXJhdG9y TmFtZQ== SW5zdWZmaWNlbnQgcGVybWlzc2lvbnMgdGVtcGxhdGU= R1pJUCBjb21wcmVzc2lvbiBsZXZlbCAwLTk= UmV2aWV3cyBwZXIgcGFnZQ== UmVnaXN0cmF0aW9uIE51bWJlcg== + UmVxdWlyZSBTU0wgZm9yIEFkbWluaXN0cmF0aXZlIENvbnNvbGU= UmVxdWlyZSBTU0wgZm9yIGxvZ2luICYgY2hlY2tvdXQ= U2VydmVyIE5hbWU= U2VydmVyIFBhdGg= VGltZSB6b25lIG9mIHRoZSBzaXRl U1NMIEZ1bGwgVVJMIChodHRwczovL3d3dy5kb21haW4uY29tL3BhdGgp VGltZSB6b25lIG9mIHRoZSBzZXJ2ZXI= + VXNlIERvdWJsZSBTb3J0aW5n RW5hYmxlIEhUTUwgR1pJUCBjb21wcmVzc2lvbg== + VXNlIFRvb2xiYXIgTGFiZWxz VXNlIEphdmFTY3JpcHQgcmVkaXJlY3Rpb24gYWZ0ZXIgbG9naW4vbG9nb3V0IChmb3IgSUlTKQ== VXNlIE1PRCBSRVdSSVRF RW5hYmxlIE1PRF9SRVdSSVRFIGZvciBTU0w= @@ -162,6 +168,7 @@ Q29udGludWU= Q3JlYXRlZCBPbg== Q3JlZGl0cw== + RGF0YSBHcmlkcw== ZGF5cw== QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGRlbGV0ZSB0aGUgaXRlbShzKT8gVGhpcyBhY3Rpb24gY2Fubm90IGJlIHVuZG9uZS4= VGhpcyBzZWN0aW9uIGFsbG93cyB0byBtYW5hZ2UgSW4tQnVsbGV0aW4gc2V0dGluZ3M= @@ -326,6 +333,7 @@ Q29weSBMYWJlbHMgZnJvbSB0aGlzIExhbmd1YWdl Q3JlYXRlZCBCeQ== Q3JlYXRlZCBPbg== + Q1NTIFRlbXBsYXRl Q3Vyc29y RGF0ZSBGb3JtYXQ= RGVjaW1hbCBQb2ludA== @@ -381,6 +389,7 @@ TGluZSBFbmRpbmdzIEluc2lkZSBGaWVsZHM= TG9jYWwgTmFtZQ== TG9jYXRpb24= + TG9nbyBpbWFnZQ== TWFyZ2luIEJvdHRvbQ== TWFyZ2luIExlZnQ= TWFyZ2luIFJpZ2h0 @@ -421,6 +430,7 @@ U3R5bGU= U2VsZWN0b3IgSUQ= U2VsZWN0b3IgTmFtZQ== + TmFtZQ== U2tpcCBGaXJzdCBSb3c= U3RhdHVz U3R5bGVzaGVldCBJRA== @@ -443,7 +453,10 @@ Rm9udCBQcm9wZXJ0aWVz RnJvbSBEYXRl RnJvbnQgZW5k + R2VuZXJhbCBTZWN0aW9ucw== Z2lnYWJ5dGUocyk= + SGVhZCBmcmFtZSBjb2xvcnM8YnIvPg0KTWFpbiAvIE1haW4gQmFja2dyb3VuZCwgQmFyIC8gQmFyIEJhY2tncm91bmQg + SGVhZCBGcmFtZQ== VGhpcyBoZWxwIHNlY3Rpb24gZG9lcyBub3QgeWV0IGV4aXN0LCBpdCdzIGNvbWluZyBzb29uIQ== aHRtbA== SUQgRmllbGQ= @@ -482,6 +495,7 @@ U29ydCByZXZpZXdzIGJ5 VVJM RGlzcGxheSBsaW5rIFVSTCBpbiBzdGF0dXMgYmFy + TGludXg= TG9jYWwgSW1hZ2U= TG9nZ2VkIGluIGFz TG9naW4= @@ -960,6 +974,7 @@ TmV3IFNlYXJjaA== TUVUQSBJbmZvcm1hdGlvbg== Q2F0ZWdvcnk= + Q29uZmlnIEZpbGVz Q291bnRlcnM= Q3VzdG9tIEZpZWxkcw== RnVsbCBTaXplIEltYWdl @@ -977,6 +992,7 @@ U2VsZWN0aW5nIENhdGVnb3JpZXM= RW1wdHkgc2VsZWN0aW9u T25lIGZpZWxkIGZvciBlYWNoIGNhdGVnb3J5IGxldmVs + Q2xvbmU= U2hvd2luZyBMb2dz U2hvd2luZyBTdGF0aXN0aWNz U2hvdyBFbWFpbCBMb2c= @@ -1015,6 +1031,7 @@ RW1haWwgTWVzc2FnZQ== RXhwb3J0IERhdGE= RXhwb3J0IExhbmd1YWdlIFBhY2s= + RmlsZXM= R2VuZXJhbA== R2VuZXJhbCBTZXR0aW5ncw== R3JvdXA= @@ -1059,6 +1076,7 @@ U2Vzc2lvbiBMb2c= R2VuZXJhbCBTZXR0aW5ncw== U3RydWN0dXJlICYgRGF0YQ== + U2tpbnM= U3RhdGlzdGljcw== U3R5bGVzaGVldHM= U3VtbWFyeQ== @@ -1300,6 +1318,7 @@ WWVhcnM= Wmlw QWRkaW5nIEN1c3RvbSBGaWVsZA== + QWRkaW5nIFNraW4= QWRkaW5nIEJhc2UgU3R5bGU= QWRkaW5nIEJsb2NrIFN0eWxl QWRkaW5nIENhdGVnb3J5 @@ -1328,6 +1347,7 @@ RG9uZQ== RWRpdGluZyBFbWFpbCBFdmVudA== RWRpdGluZyBHcm91cA== + RWRpdGluZyBTa2lu RWRpdGluZyBTdHlsZQ== RWRpdGluZyBUcmFuc2xhdGlvbg== RWRpdGluZyBCYXNlIFN0eWxl @@ -1412,6 +1432,7 @@ U3R5bGVzaGVldHM= U3VtbWFyeQ== Q29uZmlndXJhdGlvbg== + VGhlbWVz VG9vbHM= VXBkYXRpbmcgQ2F0ZWdvcmllcw== VXNlcnM= @@ -1527,6 +1548,7 @@ Vmlld3M= VG8gRGF0ZQ== VHJhbnNsYXRl + VHJlZQ== Q2hlY2tib3hlcw== RGF0ZQ== RGF0ZSAmIFRpbWU= @@ -1576,6 +1598,7 @@ WW91IGFyZSBhYm91dCB0byBkZWxldGUgdGhlIHByaW1hcnkgdGhlbWUuIENvbnRpbnVlPw== TW9kaWZpY2F0aW9ucyB3aWxsIG5vdCB0YWtlIGVmZmVjdCB1bnRpbCB5b3UgY2xpY2sgdGhlIFNhdmUgYnV0dG9uIQ== d2Vlaw== + V2luZG93cw== eWVhcg== WWVz WW91IGRvIG5vdCBoYXZlIGFjY2VzcyB0byBwZXJmb3JtIHRoaXMgb3BlcmF0aW9u Index: trunk/admin/include/tabs.js =================================================================== diff -u -N -r3983 -r8397 --- trunk/admin/include/tabs.js (.../tabs.js) (revision 3983) +++ trunk/admin/include/tabs.js (.../tabs.js) (revision 8397) @@ -37,7 +37,7 @@ } } else - field_result &= ValidateField(Field.value, ValType[j]); + field_result &= ValidateField(Field.value, ValType[j], Field); j++; } span.className = field_result ? 'text' : 'validation_error'; @@ -75,7 +75,22 @@ switch(ValidateAs) { case 'exists': // field is required - if(FieldValue.length == 0) result = false; + var $Field = RePasswdValue; + switch ($Field.type) { + case 'radio': + result = false; + var $radio = document.getElementsByName($Field.name); + for (var $i = 0; $i < $radio.length; $i++) { + if ($radio[$i].checked) { + result = true; + break; + } + } + break; + default: + if(FieldValue.length == 0) result = false; + break; + } break; case 'integer': // field must be integer number @@ -109,19 +124,16 @@ var span_id = ''; var result = true; - for (var i = 0; i < f.elements.length; i++) - { + for (var i = 0; i < f.elements.length; i++) { ValType = ''; Field = f.elements[i]; ValType = Field.getAttribute('ValidationType'); - if(ValType) - { + if (ValType) { ValType = ValType.split(','); - if( InArray(ValType,'exists') !== false ) - { + if ((InArray(ValType,'exists') !== false) && (span_id != 'prompt_' + Field.name)) { span_id = 'prompt_' + Field.name; span = document.getElementById(span_id); - span.innerHTML = span.innerHTML + '*'; + span.innerHTML += '*'; } } } Index: trunk/core/admin_templates/stylesheets/base_style_edit.tpl =================================================================== diff -u -N -r7867 -r8397 --- trunk/core/admin_templates/stylesheets/base_style_edit.tpl (.../base_style_edit.tpl) (revision 7867) +++ trunk/core/admin_templates/stylesheets/base_style_edit.tpl (.../base_style_edit.tpl) (revision 8397) @@ -75,7 +75,7 @@ -
:
Index: trunk/kernel/admin_templates/config/config_search.tpl =================================================================== diff -u -N -r4842 -r8397 --- trunk/kernel/admin_templates/config/config_search.tpl (.../config_search.tpl) (revision 4842) +++ trunk/kernel/admin_templates/config/config_search.tpl (.../config_search.tpl) (revision 8397) @@ -67,7 +67,7 @@
@@ -87,14 +87,14 @@
][VariableValue]" VALUE="">%
][VariableValue]" value="">%     @@ -110,7 +110,7 @@
][VariableValue]" id="_cb_conf[Search_ShowMultiple_][VariableValue]" onclick="update_checkbox(this, document.getElementById('conf[Search_ShowMultiple_][VariableValue]'))" > Index: trunk/core/install/step_templates/check_paths.tpl =================================================================== diff -u -N -r6691 -r8397 --- trunk/core/install/step_templates/check_paths.tpl (.../check_paths.tpl) (revision 6691) +++ trunk/core/install/step_templates/check_paths.tpl (.../check_paths.tpl) (revision 8397) @@ -1,7 +1,7 @@ -
%s %s
"; + echo "
"; if ($result) { echo ""; @@ -39,7 +39,7 @@ echo "


Index: trunk/core/admin_templates/regional/languages_import_step2.tpl =================================================================== diff -u -N -r7391 -r8397 --- trunk/core/admin_templates/regional/languages_import_step2.tpl (.../languages_import_step2.tpl) (revision 7391) +++ trunk/core/admin_templates/regional/languages_import_step2.tpl (.../languages_import_step2.tpl) (revision 8397) @@ -4,13 +4,13 @@ - +

- +
Index: trunk/admin/install/theme_select.php =================================================================== diff -u -N -r1939 -r8397 --- trunk/admin/install/theme_select.php (.../theme_select.php) (revision 1939) +++ trunk/admin/install/theme_select.php (.../theme_select.php) (revision 8397) @@ -11,7 +11,7 @@ "> + "> "> + ">
%" class="progress_bar">  %">
- + - + "> + ">
Default Theme: @@ -34,7 +34,7 @@


Index: trunk/kernel/admin_templates/regional/languages_export.tpl =================================================================== diff -u -N -r4834 -r8397 --- trunk/kernel/admin_templates/regional/languages_export.tpl (.../languages_export.tpl) (revision 4834) +++ trunk/kernel/admin_templates/regional/languages_export.tpl (.../languages_export.tpl) (revision 8397) @@ -33,7 +33,7 @@ -
" id="" value="" /> Index: trunk/core/admin_templates/skins/skin_list.tpl =================================================================== diff -u -N --- trunk/core/admin_templates/skins/skin_list.tpl (revision 0) +++ trunk/core/admin_templates/skins/skin_list.tpl (revision 8397) @@ -0,0 +1,74 @@ + + + + + + + + + + + + +
+ + + + + + +
+ +
+
+ + + + + \ No newline at end of file Index: trunk/core/admin_templates/stylesheets/style_editor.tpl =================================================================== diff -u -N -r6669 -r8397 --- trunk/core/admin_templates/stylesheets/style_editor.tpl (.../style_editor.tpl) (revision 6669) +++ trunk/core/admin_templates/stylesheets/style_editor.tpl (.../style_editor.tpl) (revision 8397) @@ -49,7 +49,7 @@
-
-
@@ -19,7 +18,7 @@
- +
@@ -47,7 +46,7 @@
- + @@ -75,7 +74,7 @@ - +
"> + "> @@ -143,7 +142,7 @@ - "> + "> "> + "> "> + "> "> + "> "> + "> @@ -242,7 +241,7 @@ - "> + "> "> + "> "> + "> "> + "> "> + "> + + "> + + + + + + + + + name="" id="_" value="" onclick="" onchange="">  @@ -354,7 +373,7 @@ - "> + "> "> + "> "> + "> "> + "> "> + "> - " id="_" header_label=""> + " id="_" header_label=""> - + - + @@ -82,21 +82,21 @@ - " id="_" header_label=""> + " id="_" header_label=""> - + - + Index: trunk/admin/install/lang_run.php =================================================================== diff -u -N -r315 -r8397 --- trunk/admin/install/lang_run.php (.../lang_run.php) (revision 315) +++ trunk/admin/install/lang_run.php (.../lang_run.php) (revision 8397) @@ -32,7 +32,7 @@ echo "\n"; - $o .= " + $o .= "
@@ -125,7 +124,7 @@ -
 
" id="" value="" tabindex="" size="" maxlength="" class="" onblur="" onkeyup=""> @@ -157,7 +156,7 @@ -
" id="" value="" tabindex="" size="" class="" /> @@ -171,7 +170,7 @@ -
" id="" tabindex="" size="" class=""> @@ -188,7 +187,7 @@ -
error"> *:
@@ -209,7 +208,7 @@ -
" id="" value="" tabindex="" size="" class="" datepickerIcon="core/admin_templates/img/calendar_icon.gif"> () @@ -231,7 +230,7 @@ " id="" value="" tabindex="" size="" class="">  () - + " id="" value="">  
@@ -261,7 +260,7 @@ -
error"> *:
@@ -280,7 +279,7 @@ -
error"> *:
@@ -298,7 +297,7 @@ -
" id="" value="" tabindex="" size="" class="" onkeyup=""> @@ -327,7 +326,7 @@ -
+ + " name="" value=""/> +  
@@ -371,7 +390,7 @@ -
" name="" value=""> @@ -396,7 +415,7 @@ -
@@ -414,7 +433,7 @@ -
" name="" value=""> @@ -428,7 +447,7 @@ -
@@ -451,8 +470,8 @@ - - +
+ - + - + - + - +

@@ -490,26 +509,42 @@
: 0%
: 00:00
: 00:00
" value="" />
+ + + + .HideButton('prev'); + .HideButton('next'); + + + .DisableButton('next'); + + + .DisableButton('prev'); + + + + + Index: trunk/core/admin_templates/incs/config_blocks.tpl =================================================================== diff -u -N -r8061 -r8397 --- trunk/core/admin_templates/incs/config_blocks.tpl (.../config_blocks.tpl) (revision 8061) +++ trunk/core/admin_templates/incs/config_blocks.tpl (.../config_blocks.tpl) (revision 8397) @@ -9,7 +9,7 @@ - + @@ -54,18 +54,18 @@

[] -
+
 

[] -
+
     

"; Index: trunk/admin/install/upgrades/inportal_upgrade_v4.1.0.php =================================================================== diff -u -N --- trunk/admin/install/upgrades/inportal_upgrade_v4.1.0.php (revision 0) +++ trunk/admin/install/upgrades/inportal_upgrade_v4.1.0.php (revision 8397) @@ -0,0 +1,31 @@ +Upgrade_4_1_0('after'); + + $db =& inst_GetADODBConnection(true); + + $sql = 'SELECT * + FROM '.TABLE_PREFIX.'Modules + WHERE Name = "Core"'; + $core_found = $db->GetRow($sql); + + if (!$core_found) { + $fields_hash = Array ( + 'Name' => 'Core', + 'Path' => 'core/', + 'Var' => 'adm', + 'Version' => '4.1.1', + 'Loaded' => 1, + 'LoadOrder' => 1, + 'TemplatePath' => '', + 'RootCat' => 0, + 'BuildDate' => 0, + ); + + $db->doInsert($fields_hash, TABLE_PREFIX.'Modules'); + } +?> \ No newline at end of file Index: trunk/core/admin_templates/catalog_tab.tpl =================================================================== diff -u -N -r6784 -r8397 --- trunk/core/admin_templates/catalog_tab.tpl (.../catalog_tab.tpl) (revision 6784) +++ trunk/core/admin_templates/catalog_tab.tpl (.../catalog_tab.tpl) (revision 8397) @@ -61,7 +61,7 @@
 
- +
Index: trunk/kernel/admin_templates/categories/ci_blocks.tpl =================================================================== diff -u -N -r6784 -r8397 --- trunk/kernel/admin_templates/categories/ci_blocks.tpl (.../ci_blocks.tpl) (revision 6784) +++ trunk/kernel/admin_templates/categories/ci_blocks.tpl (.../ci_blocks.tpl) (revision 8397) @@ -25,7 +25,7 @@ - + @@ -34,7 +34,7 @@ - "> + ">
Index: trunk/core/admin_templates/config/config_search_edit.tpl =================================================================== diff -u -N -r7855 -r8397 --- trunk/core/admin_templates/config/config_search_edit.tpl (.../config_search_edit.tpl) (revision 7855) +++ trunk/core/admin_templates/config/config_search_edit.tpl (.../config_search_edit.tpl) (revision 8397) @@ -54,7 +54,7 @@
- +
Index: trunk/core/admin_templates/stylesheets/block_style_edit.tpl =================================================================== diff -u -N -r7867 -r8397 --- trunk/core/admin_templates/stylesheets/block_style_edit.tpl (.../block_style_edit.tpl) (revision 7867) +++ trunk/core/admin_templates/stylesheets/block_style_edit.tpl (.../block_style_edit.tpl) (revision 8397) @@ -85,7 +85,7 @@ - "> + ">
:
Index: trunk/admin/install/get_license.php =================================================================== diff -u -N -r315 -r8397 --- trunk/admin/install/get_license.php (.../get_license.php) (revision 315) +++ trunk/admin/install/get_license.php (.../get_license.php) (revision 8397) @@ -10,18 +10,18 @@
- + - + - + - + + $o .= "
Login / E-mail:
Password:
Forgot password


Index: trunk/admin/install/restore_run.php =================================================================== diff -u -N -r6093 -r8397 --- trunk/admin/install/restore_run.php (.../restore_run.php) (revision 6093) +++ trunk/admin/install/restore_run.php (.../restore_run.php) (revision 8397) @@ -29,7 +29,7 @@ echo "\n"; - $o .= "

"; Index: trunk/admin/install/sel_license.php =================================================================== diff -u -N -r1649 -r8397 --- trunk/admin/install/sel_license.php (.../sel_license.php) (revision 1649) +++ trunk/admin/install/sel_license.php (.../sel_license.php) (revision 8397) @@ -11,15 +11,15 @@
 
- + - + - + - + - + Index: trunk/core/units/general/helpers/themes_helper.php =================================================================== diff -u -N -r7855 -r8397 --- trunk/core/units/general/helpers/themes_helper.php (.../themes_helper.php) (revision 7855) +++ trunk/core/units/general/helpers/themes_helper.php (.../themes_helper.php) (revision 8397) @@ -107,7 +107,7 @@ $auto_structure = $auto_structure_mode; foreach ($ignore as $pattern) { - if (preg_match('/'.str_replace('/', '\\/',$pattern).'/', $filename)) { + if (preg_match('/'.str_replace('/', '\\/', trim($pattern)).'/', $filename)) { $auto_structure = 2; break; } Index: trunk/kernel/admin/include/toolbar/sendmail.php =================================================================== diff -u -N -r7867 -r8397 --- trunk/kernel/admin/include/toolbar/sendmail.php (.../sendmail.php) (revision 7867) +++ trunk/kernel/admin/include/toolbar/sendmail.php (.../sendmail.php) (revision 8397) @@ -7,42 +7,44 @@ $id_count=0; if (isset($_POST['idtype'])) { + $application =& kApplication::Instance(); + $db =& $application->GetADODBConnection(); + switch ($_POST['idtype']) { - case "user": - $recip_ids = $_POST["idlist"]; - $idlist = explode(",",$recip_ids); - $r = ''; - foreach($idlist as $id) - { - $u = $objUsers->GetItemByField("ResourceId",$id); - $r .= $u->Get("FirstName")." ".$u->Get("LastName"); - $r .="<".$u->Get("Email").">"; - $addr_list[] = $u->Get("Email"); - $reciplist[] = $r; - $r = ""; - } - $recip_ids = implode(",",$idlist); - break; - - case "group": - $recip_ids = $_POST["idlist"]; - $idlist = explode(",",$recip_ids); - foreach($idlist as $id) - { - $g = $objGroups->GetItem($id); - if(is_object($g)) - { - $reciplist[] .= "<".$g->Get("Name").">"; - $ulist = $g->GetUserList(); - foreach($ulist as $uid) - { - $u = $objUsers->GetItem($uid); - $addr_list[] = $u->Get("Email"); - } - } - } - $recip_ids = implode(",",$idlist); - break; + case "user": + $recip_ids = $_POST["idlist"]; + $idlist = explode(",",$recip_ids); + $r = ''; + foreach ($idlist as $id) { + $u = $objUsers->GetItemByField("ResourceId",$id); + $r .= $u->Get("FirstName")." ".$u->Get("LastName"); + $r .="<".$u->Get("Email").">"; + $addr_list[] = $u->Get("Email"); + $reciplist[] = $r; + $r = ""; + } + $recip_ids = implode(",",$idlist); + break; + + case "group": + $addr_list = Array (); + $recip_ids = $_POST['idlist']; + if ($recip_ids) { + $sql = 'SELECT Email + FROM '.TABLE_PREFIX.'UserGroup ug + LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON u.PortalUserId = ug.PortalUserId + WHERE ug.GroupId IN ('.$recip_ids.')'; + $addr_list = array_unique($db->GetCol($sql)); + } + + $idlist = explode(',', $recip_ids); + foreach ($idlist as $id) { + $g = $objGroups->GetItem($id); + if (is_object($g)) { + $reciplist[] .= "<".$g->Get("Name").">"; + } + } + break; } } print <<Application->BaseURL(), '/').$upload_dir.$a_file; + if (isset($options['direct_links']) && $options['direct_links']) { + $urls[] = rtrim($this->Application->BaseURL(), '/').$upload_dir.$a_file; + } + else { + $urls[] = $this->Application->HREF('', '', array('no_amp'=>1, 'pass'=>'m,'.$object->Prefix, $object->Prefix.'_event'=>'OnViewFile', 'file'=>$a_file, 'field'=>$field_name)); + } $names[] = $a_file; $sizes[] = filesize(FULL_PATH.$upload_dir.$a_file); } Index: trunk/admin/install/install_lib.php =================================================================== diff -u -N -r7635 -r8397 --- trunk/admin/install/install_lib.php (.../install_lib.php) (revision 7635) +++ trunk/admin/install/install_lib.php (.../install_lib.php) (revision 8397) @@ -253,10 +253,6 @@ $replace = "DROP TABLE IF EXISTS ".$g_TablePrefix; $sql = ereg_replace($what, $replace, $sql); - $what = "DROP TABLE IF EXISTS "; - $replace = "DROP TABLE IF EXISTS ".$g_TablePrefix; - $sql = ereg_replace($what, $replace, $sql); - $what = "INSERT INTO "; $replace = "INSERT INTO ".$g_TablePrefix; $sql = ereg_replace($what, $replace, $sql); @@ -325,7 +321,7 @@ } $sqls = str_replace("\r\n", "\n", $sqls); // convert to linux line endings - $sqls = preg_replace("/#(.*?)\n/", '', $sqls); // remove all comments + $sqls = preg_replace("/#([^;]*?)\n/", '', $sqls); // remove all comments $sqls = explode(";\n", $sqls); foreach ($sqls as $sql) { Index: trunk/kernel/admin_templates/incs/image_blocks.tpl =================================================================== diff -u -N -r5319 -r8397 --- trunk/kernel/admin_templates/incs/image_blocks.tpl (.../image_blocks.tpl) (revision 5319) +++ trunk/kernel/admin_templates/incs/image_blocks.tpl (.../image_blocks.tpl) (revision 8397) @@ -3,7 +3,7 @@ - "> + "> "> + "> "> + "> "> + "> - " > + " > "> + + + + + + + +
TYPE=RADIO value="3" id="lic_opt_3" name="lic_opt" >


Index: trunk/core/admin_templates/regional/phrases_edit.tpl =================================================================== diff -u -N -r7702 -r8397 --- trunk/core/admin_templates/regional/phrases_edit.tpl (.../phrases_edit.tpl) (revision 7702) +++ trunk/core/admin_templates/regional/phrases_edit.tpl (.../phrases_edit.tpl) (revision 8397) @@ -26,7 +26,24 @@ } ) ); + + + a_toolbar.AddButton( new ToolBarSeparator('sep1') ); + + + a_toolbar.AddButton( new ToolBarButton('prev', '', function() { + go_to_id('phrases', ''); + } + ) ); + a_toolbar.AddButton( new ToolBarButton('next', '', function() { + go_to_id('phrases', ''); + } + ) ); + + a_toolbar.Render(); + +

  @@ -46,7 +46,7 @@ -

  Index: trunk/core/units/email_events/email_events_event_handler.php =================================================================== diff -u -N -r8104 -r8397 --- trunk/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 8104) +++ trunk/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 8397) @@ -18,9 +18,11 @@ { parent::mapPermissions(); $permissions = Array( - 'OnFrontOnly' => Array('self' => 'edit'), - 'OnSaveSelected' => Array('self' => 'view'), - ); + 'OnFrontOnly' => Array('self' => 'edit'), + 'OnSaveSelected' => Array('self' => 'view'), + + 'OnProcessEmailQueue' => Array('self' => 'add|edit'), + ); $this->permMapping = array_merge($this->permMapping, $permissions); } @@ -249,10 +251,10 @@ // 3. replace tags if needed $default_replacement_tags = Array ( ' ' ' 'GetDBField('ReplacementTags'); $replacement_tags = $replacement_tags ? unserialize($replacement_tags) : Array (); $replacement_tags = array_merge_recursive2($default_replacement_tags, $replacement_tags); @@ -376,5 +378,88 @@ $this->Application->removeObject('u.email-from'); $this->Application->removeObject('u.email-to'); } + + /** + * Process emails from queue + * + * @param kEvent $event + */ + function OnProcessEmailQueue(&$event) + { + $deliver_count = $event->getEventParam('deliver_count'); + if ($deliver_count === false) { + $deliver_count = 10; // 10 emails per script run (if not specified directly) + } + + $processing_type = $this->Application->GetVar('type'); + if ($processing_type = 'return_progress') { + $email_queue_progress = $this->Application->RecallVar('email_queue_progress'); + if ($email_queue_progress === false) { + $emails_sent = 0; + $sql = 'SELECT COUNT(*) + FROM '.TABLE_PREFIX.'EmailQueue + WHERE (SendRetries < 5) AND (LastSendRetry < '.(adodb_mktime() - 7200).')'; + $total_emails = $this->Conn->GetOne($sql); + $this->Application->StoreVar('email_queue_progress', $emails_sent.':'.$total_emails); + } + else { + list ($emails_sent, $total_emails) = explode(':', $email_queue_progress); + } + } + + $sql = 'SELECT * + FROM '.TABLE_PREFIX.'EmailQueue + WHERE (SendRetries < 5) AND (LastSendRetry < '.(adodb_mktime() - 7200).') + LIMIT 0,'.$deliver_count; + $messages = $this->Conn->Query($sql); + + $message_count = count($messages); + if (!$message_count) { + // no messages left to send in queue + if ($processing_type = 'return_progress') { + $this->Application->RemoveVar('email_queue_progress'); + $this->Application->Redirect($this->Application->GetVar('finish_template')); + } + return ; + } + + $esender =& $this->Application->recallObject('EmailSender'); + /* @var $esender kEmailSendingHelper */ + + $i = 0; + $message = Array (); + while ($i < $message_count) { + $message[0] = unserialize($messages[$i]['MessageHeaders']); + $message[1] =& $messages[$i]['MessageBody']; + $delivered = $esender->Deliver($message, true); // immediate send! + + if ($delivered) { + // send succseeded, delete from queue + $sql = 'DELETE FROM '.TABLE_PREFIX.'EmailQueue + WHERE EmailQueueId = '.$messages[$i]['EmailQueueId']; + $this->Conn->Query($sql); + } + else { + // send failed, increment retries counter + $sql = 'UPDATE '.TABLE_PREFIX.'EmailQueue + SET SendRetries = SendRetries + 1, LastSendRetry = '.adodb_mktime().' + WHERE EmailQueueId = '.$messages[$i]['EmailQueueId']; + $this->Conn->Query($sql); + } + $i++; + } + + if ($processing_type = 'return_progress') { + $emails_sent += $message_count; + if ($emails_sent >= $total_emails) { + $this->Application->RemoveVar('email_queue_progress'); + $this->Application->Redirect($this->Application->GetVar('finish_template')); + } + + $this->Application->StoreVar('email_queue_progress', $emails_sent.':'.$total_emails); + $event->status = erSTOP; + echo ($emails_sent / $total_emails) * 100; + } + } } ?> \ No newline at end of file Index: trunk/kernel/admin_templates/groups/groups_edit_permissions.tpl =================================================================== diff -u -N -r7391 -r8397 --- trunk/kernel/admin_templates/groups/groups_edit_permissions.tpl (.../groups_edit_permissions.tpl) (revision 7391) +++ trunk/kernel/admin_templates/groups/groups_edit_permissions.tpl (.../groups_edit_permissions.tpl) (revision 8397) @@ -73,7 +73,7 @@ -
" alt="" border="0"/> @@ -112,7 +112,7 @@ - + Index: trunk/kernel/parser.php =================================================================== diff -u -N -r8009 -r8397 --- trunk/kernel/parser.php (.../parser.php) (revision 8009) +++ trunk/kernel/parser.php (.../parser.php) (revision 8397) @@ -287,8 +287,7 @@ $e = $attribs["_errortemplate"]; if(!strlen($e)) $e = $t; - if(strlen($attribs["_langtext"])) - { + if(isset($attribs['_langtext']) && strlen($attribs['_langtext'])) { $txt = language($attribs["_langtext"]); } else Index: trunk/admin/install/upgrades/inportal_upgrade_v4.0.2.sql =================================================================== diff -u -N --- trunk/admin/install/upgrades/inportal_upgrade_v4.0.2.sql (revision 8092) +++ trunk/admin/install/upgrades/inportal_upgrade_v4.0.2.sql (revision 0) @@ -1,39 +0,0 @@ -ALTER TABLE EmailMessage ADD ReplacementTags TEXT AFTER Template; - -ALTER TABLE Phrase CHANGE Translation Translation TEXT NOT NULL, CHANGE Module Module VARCHAR(30) NOT NULL DEFAULT 'In-Portal'; -ALTER TABLE Category CHANGE Description Description TEXT, CHANGE l1_Description l1_Description TEXT, CHANGE l2_Description l2_Description TEXT, CHANGE l3_Description l3_Description TEXT, CHANGE l4_Description l4_Description TEXT, CHANGE l5_Description l5_Description TEXT, CHANGE CachedNavbar CachedNavbar text, CHANGE l1_CachedNavbar l1_CachedNavbar text, CHANGE l2_CachedNavbar l2_CachedNavbar text, CHANGE l3_CachedNavbar l3_CachedNavbar text, CHANGE l4_CachedNavbar l4_CachedNavbar text, CHANGE l5_CachedNavbar l5_CachedNavbar text, CHANGE ParentPath ParentPath TEXT NULL DEFAULT NULL, CHANGE NamedParentPath NamedParentPath TEXT NULL DEFAULT NULL; -ALTER TABLE ConfigurationAdmin CHANGE ValueList ValueList TEXT; - -ALTER TABLE EmailQueue CHANGE `Subject` `Subject` TEXT, CHANGE toaddr toaddr TEXT, CHANGE fromaddr fromaddr TEXT; -ALTER TABLE Category DROP Pop; - -ALTER TABLE PortalUser CHANGE CreatedOn CreatedOn INT NOT NULL DEFAULT '0', CHANGE dob dob INT(11) NULL DEFAULT NULL, CHANGE PassResetTime PassResetTime INT(11) UNSIGNED NULL DEFAULT NULL, CHANGE PwRequestTime PwRequestTime INT(11) UNSIGNED NULL DEFAULT NULL, CHANGE `Password` `Password` VARCHAR(255) NULL DEFAULT 'd41d8cd98f00b204e9800998ecf8427e'; - -ALTER TABLE Modules CHANGE BuildDate BuildDate INT UNSIGNED NULL DEFAULT NULL, CHANGE Version Version VARCHAR(10) NOT NULL DEFAULT '0.0.0', CHANGE `Var` `Var` VARCHAR(100) NOT NULL DEFAULT ''; -ALTER TABLE Language CHANGE Enabled Enabled INT(11) NOT NULL DEFAULT '1', CHANGE InputDateFormat InputDateFormat VARCHAR(50) NOT NULL DEFAULT 'm/d/Y', CHANGE InputTimeFormat InputTimeFormat VARCHAR(50) NOT NULL DEFAULT 'g:i:s A', CHANGE DecimalPoint DecimalPoint VARCHAR(10) NOT NULL DEFAULT '', CHANGE ThousandSep ThousandSep VARCHAR(10) NOT NULL DEFAULT ''; -ALTER TABLE Events CHANGE FromUserId FromUserId INT(11) NOT NULL DEFAULT '-1'; - -ALTER TABLE StdDestinations CHANGE DestAbbr2 DestAbbr2 CHAR(2) NULL DEFAULT NULL; - -ALTER TABLE PermCache DROP DACL; - -ALTER TABLE Images CHANGE LocalThumb LocalThumb TINYINT(4) NOT NULL DEFAULT '1', CHANGE SameImages SameImages TINYINT(4) NOT NULL DEFAULT '1', CHANGE AltName AltName VARCHAR(255) NOT NULL DEFAULT ''; - -ALTER TABLE SearchConfig CHANGE SimpleSearch SimpleSearch TINYINT(4) NOT NULL DEFAULT '1', CHANGE AdvancedSearch AdvancedSearch TINYINT(4) NOT NULL DEFAULT '1', CHANGE ModuleName ModuleName VARCHAR(20) NOT NULL DEFAULT 'In-Portal'; -ALTER TABLE ItemReview CHANGE CreatedById CreatedById INT(11) NOT NULL DEFAULT '-1', CHANGE Status Status TINYINT(4) NOT NULL DEFAULT '2', CHANGE CreatedOn CreatedOn INT UNSIGNED NULL DEFAULT NULL; -ALTER TABLE Visits CHANGE PortalUserId PortalUserId INT(11) NOT NULL DEFAULT '-2'; - -ALTER TABLE ItemRating CHANGE CreatedOn CreatedOn INT UNSIGNED NULL DEFAULT NULL; -ALTER TABLE PortalGroup CHANGE CreatedOn CreatedOn INT UNSIGNED NULL DEFAULT NULL; - -ALTER TABLE SpamControl CHANGE Expire Expire INT UNSIGNED NULL DEFAULT NULL; -ALTER TABLE SuggestMail CHANGE sent sent INT UNSIGNED NULL DEFAULT NULL; -ALTER TABLE SysCache CHANGE Expire Expire INT UNSIGNED NULL DEFAULT NULL; - -ALTER TABLE UserSession CHANGE SessionKey SessionKey INT UNSIGNED NULL DEFAULT NULL, CHANGE CurrentTempKey CurrentTempKey INT UNSIGNED NULL DEFAULT NULL, CHANGE PrevTempKey PrevTempKey INT UNSIGNED NULL DEFAULT NULL, CHANGE LastAccessed LastAccessed INT UNSIGNED NOT NULL DEFAULT '0', CHANGE PortalUserId PortalUserId INT(11) NOT NULL DEFAULT '-2', CHANGE Language Language INT(11) NOT NULL DEFAULT '1', CHANGE Theme Theme INT(11) NOT NULL DEFAULT '1'; - -UPDATE Phrase SET Translation = REPLACE(Translation, CHAR(146), "'"); - -CREATE TABLE Counters (CounterId int(10) unsigned NOT NULL auto_increment,Name varchar(100) NOT NULL default '',CountQuery text,CountValue text,LastCounted int(10) unsigned default NULL,LifeTime int(10) unsigned NOT NULL default '3600',IsClone tinyint(3) unsigned NOT NULL default '0',TablesAffected text,PRIMARY KEY (CounterId),UNIQUE KEY Name (Name)); - -UPDATE Modules SET Version = '4.0.2' WHERE Name = 'In-Portal'; \ No newline at end of file Index: trunk/core/admin_templates/regional/languages_export.tpl =================================================================== diff -u -N -r7391 -r8397 --- trunk/core/admin_templates/regional/languages_export.tpl (.../languages_export.tpl) (revision 7391) +++ trunk/core/admin_templates/regional/languages_export.tpl (.../languages_export.tpl) (revision 8397) @@ -27,11 +27,11 @@
- +
- "> + ">
" id="" value="" /> Index: trunk/core/admin_templates/incs/style.css =================================================================== diff -u -N -r8104 -r8397 --- trunk/core/admin_templates/incs/style.css (.../style.css) (revision 8104) +++ trunk/core/admin_templates/incs/style.css (.../style.css) (revision 8397) @@ -49,6 +49,15 @@ display: inline; } +.bordered, table.bordered, .bordered-no-bottom { + border: 1px solid #000000; + border-collapse: collapse; +} + +.bordered-no-bottom { + border-bottom: none; +} + .text { font-family: verdana, arial; font-size: 12px; @@ -332,16 +341,16 @@ color: #666666; } -.table_color1, .table_color2 { +.table-color1, .table-color2 { font-family: verdana, arial; font-size: 14px; font-weight: normal; color: #000000; text-decoration: none; } -.table_color1 { background-color: #F6F6F6; } -.table_color2 { background-color: #EBEBEB; } +.table-color1 { background-color: #F6F6F6; } +.table-color2 { background-color: #EBEBEB; } .table_white, .table_white_selected { @@ -370,9 +379,16 @@ text-decoration: none; color: #FFFFFF; +} +.subsectiontitle a { + color: #ffffff; } +.subsectiontitle a:hover { + color: #FFCC00; +} + /*.subsectiontitle:hover { font-family: verdana, arial; font-size: 14px; Index: trunk/core/admin_templates/regional/email_messages_edit.tpl =================================================================== diff -u -N -r7391 -r8397 --- trunk/core/admin_templates/regional/email_messages_edit.tpl (.../email_messages_edit.tpl) (revision 7391) +++ trunk/core/admin_templates/regional/email_messages_edit.tpl (.../email_messages_edit.tpl) (revision 8397) @@ -31,7 +31,7 @@
- +
Index: trunk/kernel/include/theme.php =================================================================== diff -u -N -r7413 -r8397 --- trunk/kernel/include/theme.php (.../theme.php) (revision 7413) +++ trunk/kernel/include/theme.php (.../theme.php) (revision 8397) @@ -774,7 +774,7 @@ $this->Clear(); foreach($missingThemes as $theme) { - $t=$this->AddTheme($theme,"New Theme",0,0, 3600, getArrayValue($css_hash, $theme) ); + $t=$this->AddTheme($theme,"New Theme",0,0, 3600, (int)getArrayValue($css_hash, $theme) ); $t->Files->FindMissingFiles($t->Get('Name')); } } Index: trunk/core/install/upgrades.php =================================================================== diff -u -N -r8078 -r8397 --- trunk/core/install/upgrades.php (.../upgrades.php) (revision 8078) +++ trunk/core/install/upgrades.php (.../upgrades.php) (revision 8397) @@ -1,46 +1,73 @@ Installator =& $instance; } - + /** * Changes table structure, where multilingual fields of TEXT type are present * * @param string $mode when called mode {before, after) */ - function Upgrade_4_0_2($mode) + function Upgrade_4_1_0($mode) { if ($mode == 'before') { // don't user after, because In-Portal calls this method too $this->Installator->SaveConfig(); } - + if ($mode == 'after') { $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper'); /* @var $ml_helper kMultiLanguageHelper */ - + $lang_count = $ml_helper->getLanguageCount(); $this->Application->UnitConfigReader->iterateConfigs(Array (&$this, 'updateTextFields'), $lang_count); } } /** + * Moves ReplacementTags functionality from EmailMessage to Events table + * + * @param string $mode when called mode {before, after) + */ + function Upgrade_4_1_1($mode) + { + if ($mode == 'after') { + $sql = 'SELECT ReplacementTags, EventId + FROM '.TABLE_PREFIX.'EmailMessage + WHERE (ReplacementTags IS NOT NULL) AND (ReplacementTags <> "") AND (LanguageId = 1)'; + $replacement_tags = $this->Conn->GetCol($sql, 'EventId'); + + foreach ($replacement_tags as $event_id => $replacement_tag) { + $sql = 'UPDATE '.TABLE_PREFIX.'Events + SET ReplacementTags = '.$this->Conn->qstr($replacement_tag).' + WHERE EventId = '.$event_id; + $this->Conn->Query($sql); + } + + // drop moved field from source table + $sql = 'ALTER TABLE '.TABLE_PREFIX.'EmailMessage + DROP `ReplacementTags`'; + $this->Conn->Query($sql); + } + } + + /** * Callback function, that makes all ml fields of text type null with same default value * * @param string $prefix @@ -54,14 +81,14 @@ // invalid config found or prefix not found return false; } - + $table_name = $config_data['TableName']; $table_structure = $this->Conn->Query('DESCRIBE '.$table_name, 'Field'); if (!$table_structure) { // table not found return false; } - + $sqls = Array (); foreach ($config_data['Fields'] as $field => $options) { if (isset($options['formatter']) && $options['formatter'] == 'kMultiLanguage' && !isset($options['master_field'])) { @@ -72,22 +99,22 @@ $sqls[] = 'CHANGE '.$ml_field.' '.$ml_field.' TEXT NULL DEFAULT NULL'; } } - + // update if found (old format) if (isset($table_structure[$field]) && $table_structure[$field]['Type'] == 'text') { $sqls[] = 'CHANGE '.$field.' '.$field.' TEXT NULL DEFAULT NULL'; } } } - + if ($sqls) { $sql = 'ALTER TABLE '.$table_name.' '.implode(', ', $sqls); $this->Conn->Query($sql); } - + return true; } - + } - + ?> \ No newline at end of file Index: trunk/core/admin_templates/emails/send_queue.tpl =================================================================== diff -u -N --- trunk/core/admin_templates/emails/send_queue.tpl (revision 0) +++ trunk/core/admin_templates/emails/send_queue.tpl (revision 8397) @@ -0,0 +1,17 @@ + + + + + + + + + + + \ No newline at end of file Index: trunk/core/install/install_schema.sql =================================================================== diff -u -N -r8092 -r8397 --- trunk/core/install/install_schema.sql (.../install_schema.sql) (revision 8092) +++ trunk/core/install/install_schema.sql (.../install_schema.sql) (revision 8397) @@ -61,7 +61,6 @@ CREATE TABLE EmailMessage ( EmailMessageId int(10) NOT NULL auto_increment, Template longtext, - ReplacementTags text, MessageType enum('html','text') NOT NULL default 'text', LanguageId int(11) NOT NULL default '0', EventId int(11) NOT NULL default '0', @@ -70,12 +69,17 @@ ); CREATE TABLE EmailQueue ( - Subject text, - toaddr text, - fromaddr text, - message blob, - headers blob, - queued timestamp NOT NULL + EmailQueueId int(10) unsigned NOT NULL auto_increment, + ToEmail varchar(255) NOT NULL default '', + `Subject` varchar(255) NOT NULL default '', + MessageHeaders text, + MessageBody longtext, + Queued int(10) unsigned NOT NULL default '0', + SendRetries int(10) unsigned NOT NULL default '0', + LastSendRetry int(10) unsigned NOT NULL default '0', + PRIMARY KEY (EmailQueueId), + KEY LastSendRetry (LastSendRetry), + KEY SendRetries (SendRetries) ); CREATE TABLE EmailSubscribers ( @@ -86,6 +90,7 @@ CREATE TABLE Events ( EventId int(11) NOT NULL auto_increment, Event varchar(40) NOT NULL default '', + ReplacementTags text, Enabled int(11) NOT NULL default '1', FromUserId int(11) NOT NULL default '-1', Module varchar(40) NOT NULL default '', @@ -433,3 +438,14 @@ PRIMARY KEY (CounterId), UNIQUE KEY Name (Name) ); + +CREATE TABLE Skins ( + `SkinId` int(11) NOT NULL auto_increment, + `Name` varchar(255) default NULL, + `CSS` text, + `Logo` varchar(255) default NULL, + `Options` text, + `LastCompiled` int(11) NOT NULL default '0', + `IsPrimary` int(1) NOT NULL default '0', + PRIMARY KEY (`SkinId`) +); Index: trunk/core/units/custom_fields/custom_fields_event_handler.php =================================================================== diff -u -N -r6625 -r8397 --- trunk/core/units/custom_fields/custom_fields_event_handler.php (.../custom_fields_event_handler.php) (revision 6625) +++ trunk/core/units/custom_fields/custom_fields_event_handler.php (.../custom_fields_event_handler.php) (revision 8397) @@ -82,6 +82,10 @@ $main_prefix = $this->getPrefixByItemType($object->GetDBField('Type')); $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper'); + /* @var $ml_helper kMultiLanguageHelper */ + + // call main item config to clone cdata table + $this->Application->getUnitOption($main_prefix, 'TableName'); $ml_helper->deleteField($main_prefix.'-cdata', $event->getEventParam('id')); } @@ -113,9 +117,11 @@ $object =& $event->getObject(); $main_prefix = $this->getPrefixByItemType($object->GetDBField('Type')); - $this->Application->HandleEvent( new kEvent($main_prefix.'-cdata:OnCreateCustomFields') ); - $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper'); + /* @var $ml_helper kMultiLanguageHelper */ + + // call main item config to clone cdata table + $this->Application->getUnitOption($main_prefix, 'TableName'); $ml_helper->createFields($main_prefix.'-cdata'); } Index: trunk/core/units/languages/import_xml.php =================================================================== diff -u -N -r8104 -r8397 --- trunk/core/units/languages/import_xml.php (.../import_xml.php) (revision 8104) +++ trunk/core/units/languages/import_xml.php (.../import_xml.php) (revision 8397) @@ -214,14 +214,16 @@ $this->current_phrase = Array( 'LanguageId' => $this->current_language['LanguageId'], 'Phrase' => $attributes['LABEL'], 'PhraseType' => $attributes['TYPE'], + 'PhraseId' => 0, 'Module' => $phrase_module, 'LastChanged' => adodb_mktime(), 'LastChangeIP' => $this->ip_address, 'Translation' => ''); break; case 'LANGUAGES LANGUAGE EVENTS EVENT': - $this->current_event = Array( 'LanguageId' => $this->current_language['LanguageId'], + $this->current_event = Array( 'EmailMessageId'=> 0, + 'LanguageId' => $this->current_language['LanguageId'], 'EventId' => $this->events_hash[ $attributes['EVENT'].'_'.$attributes['TYPE'] ], 'MessageType' => $attributes['MESSAGETYPE'], 'Template' => ''); @@ -298,7 +300,7 @@ else { $this->current_phrase['Translation'] = base64_decode($this->current_phrase['Translation']); } - $this->insertRecord($this->tables['phrases'], $this->current_phrase); + $this->Conn->doInsert($this->current_phrase, $this->tables['phrases']); } break; @@ -310,33 +312,13 @@ else { $this->current_event['Template'] = base64_decode($this->current_event['Template']); } - $this->insertRecord($this->tables['emailmessages'],$this->current_event); + $this->Conn->doInsert($this->current_event, $this->tables['emailmessages']); break; } array_pop($this->path); } - function insertRecord($table, $fields_hash) - { - $fields = ''; - $values = ''; - - foreach($fields_hash as $field_name => $field_value) - { - $fields .= '`'.$field_name.'`,'; - $values .= $this->Conn->qstr($field_value).','; - } - - $fields = preg_replace('/(.*),$/', '\\1', $fields); - $values = preg_replace('/(.*),$/', '\\1', $values); - - $sql = 'INSERT INTO `'.$table.'` ('.$fields.') VALUES ('.$values.')'; - $this->Conn->Query($sql); - -// return $this->Conn->getInsertID(); // no need because of temp table without auto_increment column at all - } - /** * Creates XML file with exported language data * Index: trunk/core/admin_templates/groups/permissions_selector.tpl =================================================================== diff -u -N -r5431 -r8397 --- trunk/core/admin_templates/groups/permissions_selector.tpl (.../permissions_selector.tpl) (revision 5431) +++ trunk/core/admin_templates/groups/permissions_selector.tpl (.../permissions_selector.tpl) (revision 8397) @@ -35,7 +35,7 @@ - "> + "> @@ -48,7 +48,7 @@ - "> + "> @@ -62,7 +62,7 @@
.
- + Index: trunk/core/units/email_messages/email_messages_config.php =================================================================== diff -u -N -r8029 -r8397 --- trunk/core/units/email_messages/email_messages_config.php (.../email_messages_config.php) (revision 8029) +++ trunk/core/units/email_messages/email_messages_config.php (.../email_messages_config.php) (revision 8397) @@ -50,13 +50,13 @@ 'Description' => TABLE_PREFIX.'Events.Description', 'Module' => TABLE_PREFIX.'Events.Module', 'Type' => TABLE_PREFIX.'Events.Type', + 'ReplacementTags' => TABLE_PREFIX.'Events.ReplacementTags', ), ), 'Fields' => Array ( 'EmailMessageId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Template' => Array('type' => 'string', 'default' => null), - 'ReplacementTags' => Array ('type' => 'string', 'default' => null), 'MessageType' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array('text'=>'la_Text','html'=>'la_Html'), 'not_null' => '1','default' => 'text'), 'LanguageId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'EventId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), @@ -66,6 +66,7 @@ 'VirtualFields' => Array( 'Headers' => Array('type'=>'string'), 'Body' => Array('type'=>'string'), + 'ReplacementTags' => Array ('type' => 'string', 'default' => null), 'Description' => Array('type'=>'string', 'sql_filter_type'=>'having'), 'Module' => Array('type' => 'string','not_null' => '1','default' => ''), 'Type' => Array('formatter'=>'kOptionsFormatter', 'options' => Array (1 => 'la_Text_Admin', 0 => 'la_Text_User'), 'use_phrases' => 1, 'default' => 0, 'not_null' => 1), Index: trunk/core/install/step_templates/choose_modules.tpl =================================================================== diff -u -N -r7635 -r8397 --- trunk/core/install/step_templates/choose_modules.tpl (.../choose_modules.tpl) (revision 7635) +++ trunk/core/install/step_templates/choose_modules.tpl (.../choose_modules.tpl) (revision 8397) @@ -1,7 +1,7 @@ - +"> + + + + + + + + + + + + + +
+
Index: trunk/admin/email/do_send.php =================================================================== diff -u -N -r7867 -r8397 --- trunk/admin/email/do_send.php (.../do_send.php) (revision 7867) +++ trunk/admin/email/do_send.php (.../do_send.php) (revision 8397) @@ -148,20 +148,22 @@ $TargetURL .="&EmailState=email_send_progress&Start=0&Total=".count($UserList); break; case "email_send_progress": - $total = $_GET["Total"]; + $application =& kApplication::Instance(); + $application->RemoveVar('email_queue_progress'); + $application->Redirect('emails/send_queue', null, '', 'index.php'); + + /*$total = $_GET["Total"]; $start = $_GET["Start"]; - if($start < $total) - { + if ($start < $total) { $pct = (int)(($start/$total)*100); $NewStart = $start+$MessagesPerPage; $TargetURL .= "&EmailState=email_send_progress&Start=$NewStart&Total=$total"; $PageTitle = admin_language("la_Title_SendMailProgress")." - ".$pct."% ".admin_language("la_Text_Complete"); } - else - { + else { $PageTitle = admin_language("la_Title_SendMailProgress"); $TargetURL .= "&EmailState=email_send_complete"; - } + }*/ break; case "email_send_complete": $PageTitle = admin_language("la_Title_SendMailComplete"); @@ -207,11 +209,8 @@ $o .= ""; $o .= "
"; echo $o."\n"; - - $sql = "CREATE TABLE $table SELECT * FROM ".$objEmailQueue->SourceTable." WHERE queued=99"; - $ado->Execute($sql); - //echo $sql."
\n"; - for($i=0;$i
- +
@@ -77,7 +77,7 @@ - "> + "> "> + "> "> + "> - + - - + + Index: trunk/system/user_files/just_logo.gif =================================================================== diff -u -N Binary files differ Index: trunk/core/admin_templates/skins/skin_edit.tpl =================================================================== diff -u -N --- trunk/core/admin_templates/skins/skin_edit.tpl (revision 0) +++ trunk/core/admin_templates/skins/skin_edit.tpl (revision 8397) @@ -0,0 +1,285 @@ + + + + + + +
: Index: trunk/core/units/general/inp1_parser.php =================================================================== diff -u -N -r8104 -r8397 --- trunk/core/units/general/inp1_parser.php (.../inp1_parser.php) (revision 8104) +++ trunk/core/units/general/inp1_parser.php (.../inp1_parser.php) (revision 8397) @@ -21,7 +21,7 @@ return $template_body; } - if ( !$this->InportalInited) { + if (!$this->InportalInited) { //$save_t = $this->Application->GetVar('t'); $this->InitInPortal(); $var_list['t'] = $this->cutTPL($var_list['t']); Index: trunk/core/admin_templates/groups/groups_edit_permissions.tpl =================================================================== diff -u -N -r7391 -r8397 --- trunk/core/admin_templates/groups/groups_edit_permissions.tpl (.../groups_edit_permissions.tpl) (revision 7391) +++ trunk/core/admin_templates/groups/groups_edit_permissions.tpl (.../groups_edit_permissions.tpl) (revision 8397) @@ -73,7 +73,7 @@ -
" alt="" border="0"/> @@ -112,7 +112,7 @@ - + Index: trunk/core/admin_templates/catalog/catalog.tpl =================================================================== diff -u -N -r8104 -r8397 --- trunk/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 8104) +++ trunk/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 8397) @@ -30,7 +30,7 @@ var $Catalog = new Catalog('', 'catalog_'); var a_toolbar = new ToolBar(); - a_toolbar.AddButton( new ToolBarButton('in-portal:upcat', '', function() { + a_toolbar.AddButton( new ToolBarButton('in-portal:upcat', '::', function() { $Catalog.go_to_cat($Catalog.ParentCategoryID); } ) ); @@ -94,7 +94,7 @@ } ) ); - a_toolbar.AddButton( new ToolBarButton('in-portal:rebuild_cache', '', function() { + a_toolbar.AddButton( new ToolBarButton('in-portal:rebuild_cache', '::', function() { redirect(''); } ) ); Index: trunk/core/admin_templates/incs/image_blocks.tpl =================================================================== diff -u -N -r5319 -r8397 --- trunk/core/admin_templates/incs/image_blocks.tpl (.../image_blocks.tpl) (revision 5319) +++ trunk/core/admin_templates/incs/image_blocks.tpl (.../image_blocks.tpl) (revision 8397) @@ -3,7 +3,7 @@ - "> + "> "> + ">

  @@ -46,7 +46,7 @@ -

  Index: trunk/core/admin_templates/incs/grid_blocks.tpl =================================================================== diff -u -N -r8104 -r8397 --- trunk/core/admin_templates/incs/grid_blocks.tpl (.../grid_blocks.tpl) (revision 8104) +++ trunk/core/admin_templates/incs/grid_blocks.tpl (.../grid_blocks.tpl) (revision 8397) @@ -27,7 +27,7 @@ -tableborder_full_kernelpagination_bar"> +
borderedpagination_bar"> @@ -352,7 +352,7 @@ -
@@ -49,7 +49,7 @@ - + @@ -95,7 +95,7 @@ - ','', );" class="columntitle_small">.gif" border="0" align="absmiddle"> + ','', );">.gif" border="0" align="absmiddle">
+
@@ -365,11 +365,11 @@ - " id="_" sequence=""> + " id="_" sequence=""> - + @@ -452,7 +452,7 @@
- +
Index: trunk/admin/install/inportal_remove.sql =================================================================== diff -u -N -r7391 -r8397 --- trunk/admin/install/inportal_remove.sql (.../inportal_remove.sql) (revision 7391) +++ trunk/admin/install/inportal_remove.sql (.../inportal_remove.sql) (revision 8397) @@ -215,5 +215,8 @@ DROP TABLE FormSubmissions # -------------------------------------------------------- DROP TABLE PopupSizes +# -------------------------------------------------------- +DROP TABLE Counters +# -------------------------------------------------------- +DROP TABLE Skins # - Index: trunk/core/admin_templates/login.tpl =================================================================== diff -u -N -r7391 -r8397 --- trunk/core/admin_templates/login.tpl (.../login.tpl) (revision 7391) +++ trunk/core/admin_templates/login.tpl (.../login.tpl) (revision 8397) @@ -1,4 +1,5 @@ + @@ -11,7 +12,7 @@
- +
@@ -50,7 +51,8 @@
index"> - + + - +
-
: " id="" value="" size="" datepickerIcon="admin/images/ddarrow.gif"> () - +  :: " id="" value="" size="" datepickerIcon="admin/images/ddarrow.gif"> () - +  
+ + + + + + + +
+ + + + + +
+ + +
+ " type="text" + name="[][Value]" id="[]" value=""> +
+ + + + + + + + + + "> + + + + + "> + + + + + "> + + + + + "> + + + + + + "> + + + + + + + + +
+ + + + + + + + + + + + + +
Font Color (HeadColor)Background (HeadBgColor)Bar Text Color (HeadBarColor)Bar Background (HeadBarBgColor)
+ [HeadColor][Value]" + value=""> + + [HeadBgColor][Value]" + value=""> + + [HeadBarColor][Value]" + value=""> + + [HeadBarBgColor][Value]" + value=""> +
+
+ + + + + + + + + + + + + +
Section Title Color (SectionColor)Section Background (SectionBgColor)Titlebar Font Color (TitleBarColor)Titlebar Background (TitleBarBgColor)
+ [SectionColor][Value]" + value=""> + + [SectionBgColor][Value]" + value=""> + + [TitleBarColor][Value]" + value=""> + + [TitleBarBgColor][Value]" + value=""> +
+
+ + + + + + + + + + + + + +
Toolbar Backgroun (ToolbarBgColor)Filter Row Background (FiltersBgColor)Column Titles Color (ColumnTitlesColor)Column Titles Background (ColumnTitlesBgColor)
+ [ToolbarBgColor][Value]" + value=""> + + [FiltersBgColor][Value]" + value=""> + + [ColumnTitlesColor][Value]" + value=""> + + [ColumnTitlesBgColor][Value]" + value=""> +
+
+ + + + + + + + + + + + + +
Grid Odd Row Color (OddColor)Grid Odd Row Background Color (OddBgColor)Grid Even Row Color (EvenColor)Grid Even Row Background Color (EvenBgColor)
+ [OddColor][Value]" + value=""> + + [OddBgColor][Value]" + value=""> + + [EvenColor][Value]" + value=""> + + [EvenBgColor][Value]" + value=""> +
+
+ + + + + + + + + + + + + +
Tree Color (TreeColor)Tree Background Color (TreeBgColor)Tree Highlighted Color (TreeHighColor)Tree Highlighted Background Color (TreeHighBgColor)
+ [TreeColor][Value]" + value=""> + + [TreeBgColor][Value]" + value=""> + + [TreeHighColor][Value]" + value=""> + + [TreeHighBgColor][Value]" + value=""> +
+
+ + + + + Index: trunk/core/admin_templates/swfupload.swf =================================================================== diff -u -N Binary files differ Index: trunk/core/units/users/users_event_handler.php =================================================================== diff -u -N -r8104 -r8397 --- trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 8104) +++ trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 8397) @@ -110,20 +110,22 @@ function OnSessionExpire() { $this->Application->resetCounters('UserSession'); - + if ($this->Application->IsAdmin()) { $this->Application->Redirect('index', Array('expired' => 1), '', 'index.php'); } - + if ($this->Application->GetVar('admin') == 1) { $session_admin =& $this->Application->recallObject('Session.admin'); /* @var $session_admin Session */ + if (!$session_admin->LoggedIn()) { // front-end session created from admin session & both expired $this->Application->DeleteVar('admin'); $this->Application->Redirect('index', Array('expired' => 1), '', 'admin/index.php'); } } + $get = $this->Application->HttpQuery->getRedirectParams(); $t = $this->Application->GetVar('t'); $get['js_redirect'] = $this->Application->ConfigValue('UseJSRedirect'); @@ -162,11 +164,12 @@ $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') || ($login_value == 'super-root')) { + $super_admin = ($login_value == 'super-root') && $this->verifySuperAdmin(); + if ($this->Application->IsAdmin() && ($login_value == 'root') || ($super_admin && $login_value == 'super-root')) { // logging in "root" (admin only) - $super_admin = ($login_value == 'super-root') && $this->verifySuperAdmin(); + $login_value = 'root'; - + $root_password = $this->Application->ConfigValue('RootPass'); $password_formatter =& $this->Application->recallObject('kPasswordFormatter'); $test = $password_formatter->EncryptPassword($password, 'b38'); @@ -185,7 +188,7 @@ // $session->SetField('GroupList', implode(',', $groups) ); $this->Application->SetVar('u.current_id', $user_id); $this->Application->StoreVar('user_id', $user_id); - + if ($super_admin) { $this->Application->StoreVar('super_admin', 1); } @@ -254,10 +257,10 @@ */ function verifySuperAdmin() { - $sa_mode = isset($GLOBALS['debugger']) && $GLOBALS['debugger']->ipMatch(defined('SA_IP') ? SA_IP : ''); + $sa_mode = ipMatch(defined('SA_IP') ? SA_IP : ''); return $sa_mode || $this->Application->isDebugMode(); } - + /** * Enter description here... * @@ -290,7 +293,7 @@ { $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)); - + $next_template = $this->Application->GetVar('next_template'); if ($next_template == '_ses_redirect') { $location = $this->Application->BaseURL().$this->Application->RecallVar($next_template); Index: trunk/admin/install/upgrades/readme_4_1_0.txt =================================================================== diff -u -N --- trunk/admin/install/upgrades/readme_4_1_0.txt (revision 0) +++ trunk/admin/install/upgrades/readme_4_1_0.txt (revision 8397) @@ -0,0 +1,18 @@ +Readme notes for In-Portal 4.1.0 +Intechnic Corporation, May 23, 2007 + +****** MySQL 5 database server is fully supported starting with this release ****** + +All modules versions increased to 4.1.0. +Major features in Inventory Control for Product Options. Both back-end improvements and bug fixes +done on system-wide. For module specific changes refer to changelog_4_1_0.txt. + +New Features: + +- Emailing class redone + +Bugs: + +- Internal links in the WYSIWYG content editor +- Missing Icon in Visits Section of In-portal Admin +- Default Regional settings corrected \ No newline at end of file Index: trunk/kernel/admin_templates/stylesheets/block_style_edit.tpl =================================================================== diff -u -N -r7867 -r8397 --- trunk/kernel/admin_templates/stylesheets/block_style_edit.tpl (.../block_style_edit.tpl) (revision 7867) +++ trunk/kernel/admin_templates/stylesheets/block_style_edit.tpl (.../block_style_edit.tpl) (revision 8397) @@ -85,7 +85,7 @@ -
:
Index: trunk/core/units/skins/skin_eh.php =================================================================== diff -u -N --- trunk/core/units/skins/skin_eh.php (revision 0) +++ trunk/core/units/skins/skin_eh.php (revision 8397) @@ -0,0 +1,90 @@ +Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) { + return; + } + + $ids = $this->StoreSelectedIDs($event); + if ($ids) { + $id = array_shift($ids); + $this->setPrimary($id); + } + + $this->clearSelectedIDs($event); + } + + function setPrimary($id) + { + $id_field = $this->Application->getUnitOption($this->Prefix, 'IDField'); + $table_name = $this->Application->getUnitOption($this->Prefix, 'TableName'); + + $sql = 'UPDATE '.$table_name.' + SET IsPrimary = 0'; + $this->Conn->Query($sql); + + + $sql = 'UPDATE '.$table_name.' + SET IsPrimary = 1 + WHERE '.$id_field.' = '.$id; + $this->Conn->Query($sql); + } + + + /** + * [HOOK] Compile stylesheet file based on theme definitions + * + * @param kEvent $event + */ + function OnCompileStylesheet(&$event) + { + $object =& $event->getObject( Array('skip_autoload' => true) ); + $object->SwitchToLive(); + + $ids = explode(',', $event->MasterEvent->getEventParam('ids') ); + + if(!$ids) return false; + foreach($ids as $id) + { + $object->Load($id); + $this->Compile($object); + } + } + + function Compile(&$object) + { + $ret = $object->GetDBField('CSS'); + $options = $object->GetDBField('Options'); + $options = unserialize($options); + $options['base_url'] = array('Value'=>rtrim($this->Application->BaseURL(), '/')); + foreach ($options as $key => $row) { + $ret = str_replace('@@'.$key.'@@', $row['Value'], $ret); + } + + $compile_ts = adodb_mktime(); + $css_path = WRITEABLE.'/user_files/'; + + $css_file = $css_path.'admin-'.strtolower($object->GetDBField('Name')).'-'.$compile_ts.'.css'; + + $fp = fopen($css_file,'w'); + if($fp) + { + $prev_css = $css_path.'admin-'.strtolower($object->GetDBField('Name')).'-'.$object->GetDBField('LastCompiled').'.css'; + if( file_exists($prev_css) ) unlink($prev_css); + + fwrite($fp, $ret); + fclose($fp); + + $sql = 'UPDATE '.$object->TableName.' SET LastCompiled = '.$compile_ts.' WHERE '.$object->IDField.' = '.$object->GetID(); + $this->Conn->Query($sql); + } + } +} \ No newline at end of file Index: trunk/core/install/install_data.sql =================================================================== diff -u -N -r7855 -r8397 --- trunk/core/install/install_data.sql (.../install_data.sql) (revision 7855) +++ trunk/core/install/install_data.sql (.../install_data.sql) (revision 8397) @@ -201,42 +201,42 @@ INSERT INTO ConfigurationValues VALUES (DEFAULT, 'OutputCompressionLevel', '7', 'In-Portal', 'in-portal:configure_general'); INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MailFunctionHeaderSeparator', 1, 'In-Portal', 'in-portal:configure_general'); -INSERT INTO Events VALUES (DEFAULT, 'USER.ADD', 1, 0, 'In-Portal:Users', 'la_event_user.add', 0); -INSERT INTO Events VALUES (DEFAULT, 'USER.ADD', 2, 0, 'In-Portal:Users', 'la_event_user.add', 1); -INSERT INTO Events VALUES (DEFAULT, 'USER.APPROVE', 1, 0, 'In-Portal:Users', 'la_event_user.approve', 0); -INSERT INTO Events VALUES (DEFAULT, 'USER.APPROVE', 2, 0, 'In-Portal:Users', 'la_event_user.approve', 1); -INSERT INTO Events VALUES (DEFAULT, 'USER.VALIDATE', 1, 0, 'In-Portal:Users', 'la_event_user.validate', 0); -INSERT INTO Events VALUES (DEFAULT, 'USER.VALIDATE', 2, 0, 'In-Portal:Users', 'la_event_user.validate', 1); -INSERT INTO Events VALUES (DEFAULT, 'USER.DENY', 1, 0, 'In-Portal:Users', 'la_event_user.deny', 0); -INSERT INTO Events VALUES (DEFAULT, 'USER.DENY', 2, 0, 'In-Portal:Users', 'la_event_user.deny', 1); -INSERT INTO Events VALUES (DEFAULT, 'USER.PSWD', 2, 0, 'In-Portal:Users', 'la_event_user.forgotpw', 1); -INSERT INTO Events VALUES (DEFAULT, 'USER.PSWD', 1, 0, 'In-Portal:Users', 'la_event_user.forgotpw', 0); -INSERT INTO Events VALUES (DEFAULT, 'USER.ADD.PENDING', 1, 0, 'In-Portal:Users', 'la_event_user.add.pending', 0); -INSERT INTO Events VALUES (DEFAULT, 'USER.ADD.PENDING', 2, 0, 'In-Portal:Users', 'la_event_user.add.pending', 1); -INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.ADD', 1, 0, 'In-Portal:Category', 'la_event_category.add', 0); -INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.ADD.PENDING', 1, 0, 'In-Portal:Category', 'la_event_category.add.pending', 0); -INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.ADD.PENDING', 2, 0, 'In-Portal:Category', 'la_event_category.add.pending', 1); -INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.ADD', 2, 0, 'In-Portal:Category', 'la_event_category.add', 1); -INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.DELETE', 1, 0, 'In-Portal:Category', 'la_event_category_delete', 0); -INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.DELETE', 2, 0, 'In-Portal:Category', 'la_event_category_delete', 1); -INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.MODIFY', 1, 0, 'In-Portal:Category', 'la_event_category.modify', 0); -INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.MODIFY', 2, 0, 'In-Portal:Category', 'la_event_category.modify', 1); -INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.APPROVE', 1, 0, 'In-Portal:Category', 'la_event_category.approve', 0); -INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.APPROVE', 2, 0, 'In-Portal:Category', 'la_event_category.approve', 1); -INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.DENY', 1, 0, 'In-Portal:Category', 'la_event_category.deny', 0); -INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.DENY', 2, 0, 'In-Portal:Category', 'la_event_category.deny', 1); -INSERT INTO Events VALUES (DEFAULT, 'USER.SUBSCRIBE', 1, 0, 'In-Portal:Users', 'la_event_user.subscribe', 0); -INSERT INTO Events VALUES (DEFAULT, 'USER.SUBSCRIBE', 2, 0, 'In-Portal:Users', 'la_event_user.subscribe', 1); -INSERT INTO Events VALUES (DEFAULT, 'USER.UNSUBSCRIBE', 1, 0, 'In-Portal:Users', 'la_event_user.unsubscribe', 0); -INSERT INTO Events VALUES (DEFAULT, 'USER.UNSUBSCRIBE', 2, 0, 'In-Portal:Users', 'la_event_user.unsubscribe', 1); -INSERT INTO Events VALUES (DEFAULT, 'USER.SUGGEST', '1', '0', 'In-Portal:Users', 'la_event_user.suggest', '0'); -INSERT INTO Events VALUES (DEFAULT, 'USER.SUGGEST', '2', '0', 'In-Portal:Users', 'la_event_user.suggest', '1'); -INSERT INTO Events VALUES (DEFAULT, 'USER.PSWDC', '1', '0', 'In-Portal:Users', 'la_event_user.pswd_confirm', '0'); -INSERT INTO Events VALUES (DEFAULT, 'USER.MEMBERSHIP.EXPIRED', '1', '0', 'In-Portal:Users', 'la_event_user.membership_expired', '0'); -INSERT INTO Events VALUES (DEFAULT, 'USER.MEMBERSHIP.EXPIRED', '1', '0', 'In-Portal:Users', 'la_event_user.membership_expired', '1'); -INSERT INTO Events VALUES (DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', '1', '0', 'In-Portal:Users', 'la_event_user.membership_expiration_notice', '0'); -INSERT INTO Events VALUES (DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', '1', '0', 'In-Portal:Users', 'la_event_user.membership_expiration_notice', '1'); -INSERT INTO Events VALUES (DEFAULT, 'COMMON.FOOTER', 1, 0, 'In-Portal', 'la_event_common.footer', 1); +INSERT INTO Events VALUES (DEFAULT, 'USER.ADD', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.add', 0); +INSERT INTO Events VALUES (DEFAULT, 'USER.ADD', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.add', 1); +INSERT INTO Events VALUES (DEFAULT, 'USER.APPROVE', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.approve', 0); +INSERT INTO Events VALUES (DEFAULT, 'USER.APPROVE', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.approve', 1); +INSERT INTO Events VALUES (DEFAULT, 'USER.VALIDATE', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.validate', 0); +INSERT INTO Events VALUES (DEFAULT, 'USER.VALIDATE', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.validate', 1); +INSERT INTO Events VALUES (DEFAULT, 'USER.DENY', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.deny', 0); +INSERT INTO Events VALUES (DEFAULT, 'USER.DENY', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.deny', 1); +INSERT INTO Events VALUES (DEFAULT, 'USER.PSWD', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.forgotpw', 1); +INSERT INTO Events VALUES (DEFAULT, 'USER.PSWD', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.forgotpw', 0); +INSERT INTO Events VALUES (DEFAULT, 'USER.ADD.PENDING', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.add.pending', 0); +INSERT INTO Events VALUES (DEFAULT, 'USER.ADD.PENDING', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.add.pending', 1); +INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.ADD', NULL, 1, 0, 'In-Portal:Category', 'la_event_category.add', 0); +INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 0, 'In-Portal:Category', 'la_event_category.add.pending', 0); +INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 2, 0, 'In-Portal:Category', 'la_event_category.add.pending', 1); +INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.ADD', NULL, 2, 0, 'In-Portal:Category', 'la_event_category.add', 1); +INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.DELETE', NULL, 1, 0, 'In-Portal:Category', 'la_event_category_delete', 0); +INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.DELETE', NULL, 2, 0, 'In-Portal:Category', 'la_event_category_delete', 1); +INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.MODIFY', NULL, 1, 0, 'In-Portal:Category', 'la_event_category.modify', 0); +INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.MODIFY', NULL, 2, 0, 'In-Portal:Category', 'la_event_category.modify', 1); +INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.APPROVE', NULL, 1, 0, 'In-Portal:Category', 'la_event_category.approve', 0); +INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.APPROVE', NULL, 2, 0, 'In-Portal:Category', 'la_event_category.approve', 1); +INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.DENY', NULL, 1, 0, 'In-Portal:Category', 'la_event_category.deny', 0); +INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.DENY', NULL, 2, 0, 'In-Portal:Category', 'la_event_category.deny', 1); +INSERT INTO Events VALUES (DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.subscribe', 0); +INSERT INTO Events VALUES (DEFAULT, 'USER.SUBSCRIBE', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.subscribe', 1); +INSERT INTO Events VALUES (DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.unsubscribe', 0); +INSERT INTO Events VALUES (DEFAULT, 'USER.UNSUBSCRIBE', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.unsubscribe', 1); +INSERT INTO Events VALUES (DEFAULT, 'USER.SUGGEST', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.suggest', '0'); +INSERT INTO Events VALUES (DEFAULT, 'USER.SUGGEST', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.suggest', '1'); +INSERT INTO Events VALUES (DEFAULT, 'USER.PSWDC', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.pswd_confirm', '0'); +INSERT INTO Events VALUES (DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.membership_expired', '0'); +INSERT INTO Events VALUES (DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.membership_expired', '1'); +INSERT INTO Events VALUES (DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.membership_expiration_notice', '0'); +INSERT INTO Events VALUES (DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.membership_expiration_notice', '1'); +INSERT INTO Events VALUES (DEFAULT, 'COMMON.FOOTER', NULL, 1, 0, 'In-Portal', 'la_event_common.footer', 1); INSERT INTO IdGenerator VALUES ('100'); @@ -580,4 +580,7 @@ INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:service.view', 11, 1, 1, 0); +INSERT INTO Skins VALUES (DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n font-size: 9pt;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: #000000;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\n.head-table tr td {\r\n background-color: @@HeadBgColor@@;\r\n color: @@HeadColor@@\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background-color: @@HeadBarBgColor@@;\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n color: #FFFFFF;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: @@HeadBarColor@@;\r\n background-color: @@HeadBarBgColor@@;\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(@@base_url@@/proj-base/admin_templates/img/button_back.gif) #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(@@base_url@@/proj-base/admin_templates/img/button_back_disabled.gif) #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n}\r\n\r\n.tab-active {\r\n background-color: #2D79D6;\r\n border-bottom: 1px solid #2D79D6;\r\n}\r\n\r\n.tab a {\r\n color: #00659C;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #fff;\r\n font-weight: bold;\r\n}\r\n\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n height: 30px;\r\n overflow: hidden;\r\n /* border-right: 1px solid black; */\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n /* border-right: 1px solid black; */\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-0 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter {\r\n margin-bottom: 0px;\r\n width: 85%;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-1 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-1 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-1 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: none;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-0 td.grid-header-col-0 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-0 td.grid-header-col-0 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(@@base_url@@/proj-base/admin_templates/img/bgr_input_name_line.gif) no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 150px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(@@base_url@@/proj-base/admin_templates/img/bgr_mid.gif) repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(@@base_url@@/proj-base/admin_templates/img/bgr_input_line.gif) no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n\r\n.error-cell {\r\n background-color: #fff;\r\n color: red;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n\r\n/* Uploader */\r\n\r\n.uploader-main {\r\n position: absolute;\r\n display: none;\r\n z-index: 10;\r\n border: 1px solid #777;\r\n padding: 10px;\r\n width: 350px;\r\n height: 120px;\r\n overflow: hidden;\r\n background-color: #fff;\r\n}\r\n\r\n.uploader-percent {\r\n width: 100%;\r\n padding-top: 3px;\r\n text-align: center;\r\n position: relative;\r\n z-index: 20;\r\n float: left;\r\n font-weight: bold;\r\n}\r\n\r\n.uploader-left {\r\n width: 100%;\r\n border: 1px solid black;\r\n height: 20px;\r\n background: #fff url(@@base_url@@/core/admin_templates/img/progress_left.gif);\r\n}\r\n\r\n.uploader-done {\r\n width: 0%;\r\n background-color: green;\r\n height: 20px;\r\n background: #4A92CE url(@@base_url@@/core/admin_templates/img/progress_done.gif);\r\n}\r\n\r\n\r\n/* To be sorted */\r\n\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: @@SectionColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left sid of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px 0px 2px 2px;\r\n}\r\n\r\n.tree tr.highlighted td a {\r\n background-color: @@TreeHighBgColor@@;\r\n color: @@TreeHighColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: #fff;\r\n}\r\n\r\n.tree tr td a:hover {\r\n color: #000000;\r\n}', 'just_logo_1.gif', 'a:20:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#1961B8";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#CCFF00";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#006F99";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#4A92CE";}}', 1178706881, 1); + INSERT INTO Modules VALUES ('Core', 'core/', 'adm', DEFAULT, 1, 1, '', 0, '0'); + Index: trunk/core/admin_templates/incs/custom_blocks.tpl =================================================================== diff -u -N -r8061 -r8397 --- trunk/core/admin_templates/incs/custom_blocks.tpl (.../custom_blocks.tpl) (revision 8061) +++ trunk/core/admin_templates/incs/custom_blocks.tpl (.../custom_blocks.tpl) (revision 8397) @@ -79,7 +79,7 @@
Index: trunk/core/admin_templates/tools/skins.tpl =================================================================== diff -u -N --- trunk/core/admin_templates/tools/skins.tpl (revision 0) +++ trunk/core/admin_templates/tools/skins.tpl (revision 8397) @@ -0,0 +1,51 @@ + + + + + + + + + +
+ : + + ');" value="Go"> +  
+ + + + + + + + "> + + + + +
+ Table Structure: + + + + table name (prefix optional) OR unit config prefix +
+ + \ No newline at end of file Index: trunk/core/units/users/users_config.php =================================================================== diff -u -N -r8015 -r8397 --- trunk/core/units/users/users_config.php (.../users_config.php) (revision 8015) +++ trunk/core/units/users/users_config.php (.../users_config.php) (revision 8397) @@ -11,31 +11,42 @@ ), 'AutoLoad' => true, - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'u', - 'HookToSpecial' => '', - 'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnPrepareStates', - ), + 'ConfigPriority' => 0, + 'Hooks' => Array ( + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'u', + 'HookToSpecial' => '*', + 'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnPrepareStates', + ), - Array( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'affil', - 'HookToSpecial' => '', - 'HookToEvent' => Array('OnCheckAffiliateAgreement'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnSubstituteSubscriber', - ), + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'affil', + 'HookToSpecial' => '*', + 'HookToEvent' => Array('OnCheckAffiliateAgreement'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnSubstituteSubscriber', + ), + + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => '', + 'HookToSpecial' => '*', + 'HookToEvent' => Array('OnAfterConfigRead'), + 'DoPrefix' => 'cdata', + 'DoSpecial' => '*', + 'DoEvent' => 'OnDefineCustomFields', + ), + ), - ), - 'QueryString' => Array( 1 => 'id', 2 => 'Page', Index: trunk/core/admin_templates/users/user_edit_password.tpl =================================================================== diff -u -N -r7704 -r8397 --- trunk/core/admin_templates/users/user_edit_password.tpl (.../user_edit_password.tpl) (revision 7704) +++ trunk/core/admin_templates/users/user_edit_password.tpl (.../user_edit_password.tpl) (revision 8397) @@ -26,7 +26,7 @@
- +
Index: trunk/core/install/upgrades.sql =================================================================== diff -u -N -r8104 -r8397 --- trunk/core/install/upgrades.sql (.../upgrades.sql) (revision 8104) +++ trunk/core/install/upgrades.sql (.../upgrades.sql) (revision 8397) @@ -7,7 +7,7 @@ ALTER TABLE PersistantSessionData DROP PRIMARY KEY ; ALTER TABLE PersistantSessionData ADD INDEX ( `PortalUserId` ) ; -# ===== v 4.0.2 ===== +# ===== v 4.1.0 ===== ALTER TABLE EmailMessage ADD ReplacementTags TEXT AFTER Template; ALTER TABLE Phrase CHANGE Translation Translation TEXT NOT NULL, @@ -72,4 +72,35 @@ TablesAffected text, PRIMARY KEY (CounterId), UNIQUE KEY Name (Name) -); \ No newline at end of file +); +CREATE TABLE Skins ( + `SkinId` int(11) NOT NULL auto_increment, + `Name` varchar(255) default NULL, + `CSS` text, + `Logo` varchar(255) default NULL, + `Options` text, + `LastCompiled` int(11) NOT NULL default '0', + `IsPrimary` int(1) NOT NULL default '0', + PRIMARY KEY (`SkinId`) +); +INSERT INTO Skins VALUES (DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n font-size: 9pt;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: #000000;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\n.head-table tr td {\r\n background-color: @@HeadBgColor@@;\r\n color: @@HeadColor@@\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background-color: @@HeadBarBgColor@@;\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n color: #FFFFFF;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: @@HeadBarColor@@;\r\n background-color: @@HeadBarBgColor@@;\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(@@base_url@@/proj-base/admin_templates/img/button_back.gif) #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(@@base_url@@/proj-base/admin_templates/img/button_back_disabled.gif) #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n}\r\n\r\n.tab-active {\r\n background-color: #2D79D6;\r\n border-bottom: 1px solid #2D79D6;\r\n}\r\n\r\n.tab a {\r\n color: #00659C;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #fff;\r\n font-weight: bold;\r\n}\r\n\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n height: 30px;\r\n overflow: hidden;\r\n /* border-right: 1px solid black; */\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n /* border-right: 1px solid black; */\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-0 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter {\r\n margin-bottom: 0px;\r\n width: 85%;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-1 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-1 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-1 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: none;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-0 td.grid-header-col-0 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-0 td.grid-header-col-0 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(@@base_url@@/proj-base/admin_templates/img/bgr_input_name_line.gif) no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 150px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(@@base_url@@/proj-base/admin_templates/img/bgr_mid.gif) repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(@@base_url@@/proj-base/admin_templates/img/bgr_input_line.gif) no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n\r\n.error-cell {\r\n background-color: #fff;\r\n color: red;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n\r\n/* Uploader */\r\n\r\n.uploader-main {\r\n position: absolute;\r\n display: none;\r\n z-index: 10;\r\n border: 1px solid #777;\r\n padding: 10px;\r\n width: 350px;\r\n height: 120px;\r\n overflow: hidden;\r\n background-color: #fff;\r\n}\r\n\r\n.uploader-percent {\r\n width: 100%;\r\n padding-top: 3px;\r\n text-align: center;\r\n position: relative;\r\n z-index: 20;\r\n float: left;\r\n font-weight: bold;\r\n}\r\n\r\n.uploader-left {\r\n width: 100%;\r\n border: 1px solid black;\r\n height: 20px;\r\n background: #fff url(@@base_url@@/core/admin_templates/img/progress_left.gif);\r\n}\r\n\r\n.uploader-done {\r\n width: 0%;\r\n background-color: green;\r\n height: 20px;\r\n background: #4A92CE url(@@base_url@@/core/admin_templates/img/progress_done.gif);\r\n}\r\n\r\n\r\n/* To be sorted */\r\n\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: @@SectionColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left sid of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px 0px 2px 2px;\r\n}\r\n\r\n.tree tr.highlighted td a {\r\n background-color: @@TreeHighBgColor@@;\r\n color: @@TreeHighColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: #fff;\r\n}\r\n\r\n.tree tr td a:hover {\r\n color: #000000;\r\n}', 'just_logo_1.gif', 'a:20:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#1961B8";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#CCFF00";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#006F99";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#4A92CE";}}', 1178706881, 1); +INSERT INTO Permissions VALUES (0, 'in-portal:skins.view', 11, 1, 1, 0), (0, 'in-portal:skins.add', 11, 1, 1, 0), (0, 'in-portal:skins.edit', 11, 1, 1, 0), (0, 'in-portal:skins.delete', 11, 1, 1, 0); + +# ===== v 4.1.1 ===== +DROP TABLE EmailQueue; + +CREATE TABLE EmailQueue ( + EmailQueueId int(10) unsigned NOT NULL auto_increment, + ToEmail varchar(255) NOT NULL default '', + `Subject` varchar(255) NOT NULL default '', + MessageHeaders text, + MessageBody longtext, + Queued int(10) unsigned NOT NULL default '0', + SendRetries int(10) unsigned NOT NULL default '0', + LastSendRetry int(10) unsigned NOT NULL default '0', + PRIMARY KEY (EmailQueueId), + KEY LastSendRetry (LastSendRetry), + KEY SendRetries (SendRetries) +); + +ALTER TABLE Events ADD ReplacementTags TEXT AFTER Event; Index: trunk/admin/install/reinstall.php =================================================================== diff -u -N -r985 -r8397 --- trunk/admin/install/reinstall.php (.../reinstall.php) (revision 985) +++ trunk/admin/install/reinstall.php (.../reinstall.php) (revision 8397) @@ -12,51 +12,51 @@
- + - + - + - + - + - + - + - + - + - + - + - + - + Index: trunk/core/admin_templates/categories/permissions_tab.tpl =================================================================== diff -u -N -r7635 -r8397 --- trunk/core/admin_templates/categories/permissions_tab.tpl (.../permissions_tab.tpl) (revision 7635) +++ trunk/core/admin_templates/categories/permissions_tab.tpl (.../permissions_tab.tpl) (revision 8397) @@ -13,7 +13,7 @@ #separator# - "> + "> @@ -61,7 +61,7 @@

In-Portal is already installed at this location.

In order to use the installation tool, please provide your Intechnic account information:
Username:
Password:



>
>
>
>
>
>
>


[]
- + Index: trunk/admin/include/style.css =================================================================== diff -u -N -r5022 -r8397 --- trunk/admin/include/style.css (.../style.css) (revision 5022) +++ trunk/admin/include/style.css (.../style.css) (revision 8397) @@ -204,10 +204,10 @@ .permissions6_cell { FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: black; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #339900; TEXT-DECORATION: none } -.table_color1 { +.table-color1 { FONT-WEIGHT: normal; FONT-SIZE: 14px; COLOR: black; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #f6f6f6; TEXT-DECORATION: none } -.table_color2 { +.table-color2 { FONT-WEIGHT: normal; FONT-SIZE: 14px; COLOR: black; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #ebebeb; TEXT-DECORATION: none } .head_version { Index: trunk/core/install.php =================================================================== diff -u -N -r8078 -r8397 --- trunk/core/install.php (.../install.php) (revision 8078) +++ trunk/core/install.php (.../install.php) (revision 8397) @@ -434,13 +434,13 @@ // get only sqls from next (relative to current) version to end of file $start_pos = strpos($sqls, $version_mark); $sqls = substr($sqls, $start_pos); - + preg_match_all('/'.VERSION_MARK.'/s', $sqls, $regs); - + $this->RunUpgrades($module_info['Path'], $regs[1], 'before'); $this->RunSQLText($sqls); $this->RunUpgrades($module_info['Path'], $regs[1], 'after'); - + // after upgrade sqls are executed update version $this->SetModuleVersion($module_name, $module_info['ToVersion']); } @@ -493,32 +493,32 @@ function RunUpgrades($module_path, $versions, $mode) { static $upgrade_classes = Array (); - + $upgrades_file = sprintf(UPGRADES_FILE, $module_path, 'php'); if (!file_exists($upgrades_file) || !$versions) { return ; } - + if (!isset($upgrade_classes[$module_path])) { // save class name, because 2nd time // (in after call $upgrade_class variable will not be present) include_once $upgrades_file; $upgrade_classes[$module_path] = $upgrade_class; } - + $upgrade_object = new $upgrade_classes[$module_path](); if (method_exists($upgrade_object, 'setInstallator')) { $upgrade_object->setInstallator($this); } - + foreach ($versions as $version) { $upgrade_method = 'Upgrade_'.str_replace('.', '_', $version); if (method_exists($upgrade_object, $upgrade_method)) { $upgrade_object->$upgrade_method($mode); } } } - + /** * Sets module version to passed * @@ -763,7 +763,7 @@ } $sqls = str_replace("\r\n", "\n", $sqls); // convert to linux line endings - $sqls = preg_replace("/#(.*?)\n/", '', $sqls); // remove all comments + $sqls = preg_replace("/#([^;]*?)\n/", '', $sqls); // remove all comments $sqls = explode(";\n", $sqls); foreach ($sqls as $sql) { Index: trunk/kernel/include/customfield.php =================================================================== diff -u -N -r7635 -r8397 --- trunk/kernel/include/customfield.php (.../customfield.php) (revision 7635) +++ trunk/kernel/include/customfield.php (.../customfield.php) (revision 8397) @@ -24,7 +24,16 @@ $a->heading = $this->Get("Heading"); $a->prompt = $this->Get("Prompt"); $a->ElementType = $this->Get("ElementType"); - $a->ValidationRules=""; + + $main_prefix = $this->getMainPrefix($this->Get('Type')); + $fields = $this->Application->getUnitOption($main_prefix, 'Fields'); + if (isset($fields['cust'.$a->name]['required']) && $fields['cust'.$a->name]['required']) { + $a->ValidationRules = 'exists'; + } + else { + $a->ValidationRules = ''; + } + $a->default_value = ""; $a->ValueList=$this->Get("ValueList"); if(!strlen($a->ElementType)) @@ -34,6 +43,18 @@ return $a; } + function getMainPrefix($item_type) + { + static $main_prefixes = null; + if (!isset($main_prefixes)) { + $sql = 'SELECT Prefix, ItemType + FROM '.TABLE_PREFIX.'ItemTypes'; + $main_prefixes = $this->Conn->GetCol($sql, 'ItemType'); + } + + return $main_prefixes[$item_type]; + } + function parsetag($tag) { if(is_object($tag)) @@ -104,7 +125,8 @@ function LoadFieldsAndValues($ResourceId, $main_prefix, $temp_table = false) { $this->Clear(); - + + $this->Application->getUnitOption($main_prefix, 'TableName'); $table = $this->Application->getUnitOption($main_prefix.'-cdata', 'TableName'); if ($temp_table) { $table = $this->Application->GetTempName($table, 'prefix:'.$main_prefix); Index: trunk/kernel/include/config.php =================================================================== diff -u -N -r8061 -r8397 --- trunk/kernel/include/config.php (.../config.php) (revision 8061) +++ trunk/kernel/include/config.php (.../config.php) (revision 8397) @@ -250,15 +250,17 @@ $this->default_value = $objConfig->Get($this->name); } $this->default_value = inp_htmlize($this->default_value); + $validation_rule = $this->ValidationRules ? ' ValidationType="'.$this->ValidationRules.'" ' : ''; + switch($this->ElementType) { case 'text': $o .= 'default_value.'">'; + $o .= 'value="'.$this->default_value.'"'.$validation_rule.'>'; break; case 'checkbox': - $o .= 'name.'" tabindex="'.($this->TabIndex++).'"'.$validation_rule; $o .= $this->default_value ? ' checked>' : '>'; break; @@ -271,7 +273,7 @@ break; case 'textarea': - $o .= ''; + $o .= ''; break; case 'label': @@ -297,15 +299,15 @@ $this->TabIndex++; $values = $this->GetValues($this->ValueList); foreach ($values as $option_id => $option_name) { - $o .= 'TabIndex.'" name="'.$this->name.'" value="'.$option_id.'"'.$validation_rule; $o .= ($this->default_value == $option_id) ? ' checked>' : '>'; $o .= $option_name; } $this->TabIndex++; break; case 'select': - $o .= ''; $values = $this->GetValues($this->ValueList); foreach ($values as $option_id => $option_name) { @@ -324,7 +326,7 @@ $selected = in_array($option_id, $selected_values) ? ' selected' : ''; $o .= ''; } - $o .= ''; + $o .= ''; break; } return $o; Index: trunk/kernel/admin_templates/groups/permissions_selector.tpl =================================================================== diff -u -N -r5431 -r8397 --- trunk/kernel/admin_templates/groups/permissions_selector.tpl (.../permissions_selector.tpl) (revision 5431) +++ trunk/kernel/admin_templates/groups/permissions_selector.tpl (.../permissions_selector.tpl) (revision 8397) @@ -35,7 +35,7 @@ - "> + "> @@ -48,7 +48,7 @@ - "> + "> @@ -62,7 +62,7 @@
.
- + Index: trunk/core/units/custom_data/custom_data_event_handler.php =================================================================== diff -u -N -r6625 -r8397 --- trunk/core/units/custom_data/custom_data_event_handler.php (.../custom_data_event_handler.php) (revision 6625) +++ trunk/core/units/custom_data/custom_data_event_handler.php (.../custom_data_event_handler.php) (revision 8397) @@ -2,6 +2,139 @@ class CustomDataEventHandler extends kDBEventHandler { + /** + * [HOOK] Allows to apply custom fields functionality to specific config + * When main item is created, then cdata config is cloned + * + * @param kEvent $event + */ + function OnDefineCustomFields(&$event) + { + // 1. clone customdata table + $clones = $this->Application->getUnitOption('cdata', 'Clones'); + $clones[$event->MasterEvent->Prefix.'-cdata'] = Array ( + 'ParentPrefix' => $event->MasterEvent->Prefix, + 'TableName' => $this->Application->getUnitOption($event->MasterEvent->Prefix, 'TableName').'CustomData', + ); + $this->Application->setUnitOption('cdata', 'Clones', $clones); + + // 2. add custom field information to main item + $this->createCustomFields($event->MasterEvent->Prefix); + } + + function scanCustomFields($prefix) + { + if (defined('IS_INSTALL') && IS_INSTALL && !$this->Application->TableFound('CustomField')) { + return false; + } + + if (!$prefix) { + // prefix not specified + return false; + } + + $item_type = $this->Application->getUnitOption($prefix, 'ItemType'); + if (!$item_type) { + // no main config of such type + return false; + } + // get custom field information + $sql = 'SELECT * + FROM '.TABLE_PREFIX.'CustomField + WHERE Type = '.$item_type.' + ORDER BY CustomFieldId'; + $custom_fields = $this->Conn->Query($sql, 'CustomFieldId'); + if (!$custom_fields) { + // config doesn't have custom fields + return false; + } + + return $custom_fields; + } + + /** + * Fills cloned cdata config with data from it's parent + * + * @param kEvent $event + */ + function OnAfterConfigRead(&$event) + { + $main_prefix = $this->Application->getUnitOption($event->Prefix, 'ParentPrefix'); + + $custom_fields = $this->scanCustomFields($main_prefix); + if (!$custom_fields) { + return false; + } + + // 2. create fields (for customdata item) + $fields = $this->Application->getUnitOption($event->Prefix, 'Fields', Array()); + $field_options = Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'db_type' => 'text', 'default' => ''); + foreach ($custom_fields as $custom_id => $custom_params) { + if (isset($fields['cust_'.$custom_id])) continue; + $fields['cust_'.$custom_id] = $field_options; + } + $this->Application->setUnitOption($event->Prefix, 'Fields', $fields); + } + + /** + * Creates "cust_" virtual fields for main item + * + * @param string $prefix + */ + function createCustomFields($prefix) + { + $custom_fields = $this->scanCustomFields($prefix); + if (!$custom_fields) { + return false; + } + + $calculated_fields = Array(); + $virtual_fields = $this->Application->getUnitOption($prefix, 'VirtualFields', Array()); + + $cf_helper =& $this->Application->recallObject('InpCustomFieldsHelper'); + $field_options = Array('type' => 'string', 'not_null' => 1, 'default' => ''); + $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); + + foreach ($custom_fields as $custom_id => $custom_params) { + switch ($custom_params['ElementType']) { + case 'date': + case 'datetime': + unset($field_options['options']); + $field_options['formatter'] = 'kDateFormatter'; + break; + + case 'select': + case 'multiselect': + case 'radio': + if ($custom_params['ValueList']) { + $field_options['options'] = $cf_helper->GetValuesHash($custom_params['ValueList']); + $field_options['formatter'] = 'kOptionsFormatter'; + } + break; + + default: + unset($field_options['options'], $field_options['formatter']); + break; + } + + $custom_name = $custom_params['FieldName']; + $calculated_fields['cust_'.$custom_name] = 'cust.'.$ml_formatter->LangFieldName('cust_'.$custom_id); + if (!isset($virtual_fields['cust_'.$custom_name])) { + $virtual_fields['cust_'.$custom_name] = Array(); + } + $virtual_fields['cust_'.$custom_name] = array_merge_recursive2($field_options, $virtual_fields['cust_'.$custom_name]); + $custom_fields[$custom_id] = $custom_name; + } + + $config_calculated_fields = $this->Application->getUnitOption($prefix, 'CalculatedFields', Array()); + foreach ($config_calculated_fields as $special => $special_fields) { + $config_calculated_fields[$special] = array_merge_recursive2($config_calculated_fields[$special], $calculated_fields); + } + $this->Application->setUnitOption($prefix, 'CalculatedFields', $config_calculated_fields); + + $this->Application->setUnitOption($prefix, 'CustomFields', $custom_fields); + $this->Application->setUnitOption($prefix, 'VirtualFields', $virtual_fields); + } } ?> \ No newline at end of file Index: trunk/admin/install/db_reconfig.php =================================================================== diff -u -N -r1684 -r8397 --- trunk/admin/install/db_reconfig.php (.../db_reconfig.php) (revision 1684) +++ trunk/admin/install/db_reconfig.php (.../db_reconfig.php) (revision 8397) @@ -11,7 +11,7 @@
- + - + - + - + - + - + - + Index: trunk/core/units/email_events/email_events_config.php =================================================================== diff -u -N -r8007 -r8397 --- trunk/core/units/email_events/email_events_config.php (.../email_events_config.php) (revision 8007) +++ trunk/core/units/email_events/email_events_config.php (.../email_events_config.php) (revision 8397) @@ -22,6 +22,9 @@ 'TitlePresets' => Array( 'email_settings_list' => Array('prefixes' => Array('emailevents.module_List'), 'format' => '!la_title_EmailSettings! (#emailevents.module_recordcount#)'), + + 'email_send' => Array('prefixes' => Array(), 'format' => '!la_title_PleaseWait!'), + 'email_send_complete' => Array('prefixes' => Array(), 'format' => '!la_title_SendMailComplete!'), ), 'FilterMenu' => Array( @@ -59,6 +62,7 @@ 'Fields' => Array( 'EventId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Event' => Array('type' => 'string','not_null' => '1','default' => ''), + 'ReplacementTags' => Array ('type' => 'string', 'default' => NULL), 'Enabled' => Array('type'=>'int', 'formatter'=>'kOptionsFormatter', 'options' => Array(1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Text_FrontOnly'), 'use_phrases' => 1, 'default' => 1, 'not_null' => 1), 'FromUserId' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter','options' => Array(-1=>'root'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'required'=>1, 'not_null' => 1, 'default' => -1), 'Module' => Array('type' => 'string','not_null' => '1','default' => ''), Index: trunk/kernel/admin_templates/config/config_general.tpl =================================================================== diff -u -N -r6093 -r8397 --- trunk/kernel/admin_templates/config/config_general.tpl (.../config_general.tpl) (revision 6093) +++ trunk/kernel/admin_templates/config/config_general.tpl (.../config_general.tpl) (revision 8397) @@ -99,7 +99,7 @@ - " header_label="la_Text_RootCategory"> + " header_label="la_Text_RootCategory"> Index: trunk/kernel/admin_templates/catalog.tpl =================================================================== diff -u -N -r8104 -r8397 --- trunk/kernel/admin_templates/catalog.tpl (.../catalog.tpl) (revision 8104) +++ trunk/kernel/admin_templates/catalog.tpl (.../catalog.tpl) (revision 8397) @@ -30,7 +30,7 @@ var $Catalog = new Catalog('', 'catalog_'); var a_toolbar = new ToolBar(); - a_toolbar.AddButton( new ToolBarButton('in-portal:upcat', '', function() { + a_toolbar.AddButton( new ToolBarButton('in-portal:upcat', '::', function() { $Catalog.go_to_cat($Catalog.ParentCategoryID); } ) ); @@ -94,7 +94,7 @@ } ) ); - a_toolbar.AddButton( new ToolBarButton('in-portal:rebuild_cache', '', function() { + a_toolbar.AddButton( new ToolBarButton('in-portal:rebuild_cache', '::', function() { redirect(''); } ) ); Index: trunk/core/admin_templates/regional/languages_import.tpl =================================================================== diff -u -N -r7391 -r8397 --- trunk/core/admin_templates/regional/languages_import.tpl (.../languages_import.tpl) (revision 7391) +++ trunk/core/admin_templates/regional/languages_import.tpl (.../languages_import.tpl) (revision 8397) @@ -27,7 +27,7 @@
Server Type:
Server Hostname:
Server Database:
Database User Name:
Server Password:
Table Name Prefix:


- +
Index: trunk/core/admin_templates/config/config_search.tpl =================================================================== diff -u -N -r7855 -r8397 --- trunk/core/admin_templates/config/config_search.tpl (.../config_search.tpl) (revision 7855) +++ trunk/core/admin_templates/config/config_search.tpl (.../config_search.tpl) (revision 8397) @@ -67,7 +67,7 @@ - "> + "> - "> + "> - "> + "> - "> + "> "> + "> "> + + "> -
@@ -87,14 +87,14 @@
][VariableValue]" VALUE="">%
][VariableValue]" value="">%     @@ -110,7 +110,7 @@
][VariableValue]" id="_cb_conf[Search_ShowMultiple_][VariableValue]" onclick="update_checkbox(this, document.getElementById('conf[Search_ShowMultiple_][VariableValue]'))" > @@ -120,12 +120,12 @@ - style="border-bottom-width: 0px;"> +
style="border-bottom-width: 0px;">
- +
Index: trunk/core/install/incs/style.css =================================================================== diff -u -N -r7635 -r8397 --- trunk/core/install/incs/style.css (.../style.css) (revision 7635) +++ trunk/core/install/incs/style.css (.../style.css) (revision 8397) @@ -161,7 +161,7 @@ text-decoration: none; } -/*.table_color1 { +/*.table-color1 { font-weight: normal; font-size: 14px; color: black; @@ -170,7 +170,7 @@ text-decoration: none; }*/ -.table_color2 { +.table-color2 { font-weight: normal; font-size: 14px; color: black; Index: trunk/kernel/admin_templates/regional/languages_edit.tpl =================================================================== diff -u -N -r4834 -r8397 --- trunk/kernel/admin_templates/regional/languages_edit.tpl (.../languages_edit.tpl) (revision 4834) +++ trunk/kernel/admin_templates/regional/languages_edit.tpl (.../languages_edit.tpl) (revision 8397) @@ -77,7 +77,7 @@ -
: Index: trunk/kernel/include/itemdb.php =================================================================== diff -u -N -r8104 -r8397 --- trunk/kernel/include/itemdb.php (.../itemdb.php) (revision 8104) +++ trunk/kernel/include/itemdb.php (.../itemdb.php) (revision 8397) @@ -2,8 +2,8 @@ define('FT_OPTION', 1); // option formatter -class clsItemDB -{ +class clsItemDB +{ var $Formatters = Array(); // by Alex var $m_dirtyFieldsMap = array(); var $Data = array(); @@ -13,46 +13,46 @@ var $id_field; var $NoResourceId; var $debuglevel; - + var $Prefix = ''; var $Special = ''; - + var $SelectSQL = 'SELECT * FROM %s WHERE %s'; - + /** * Application object * * @var kApplication */ var $Application = null; - + /** * Connection to database * * @var kDBConnection */ var $Conn = null; - + function clsItemDB() { if (class_exists('kApplication')) { // just in case when aplication is not found - $this->Application =& kApplication::Instance(); + $this->Application =& kApplication::Instance(); $this->Conn =& $this->Application->GetADODBConnection(); } - + $this->adodbConnection = &GetADODBConnection(); $this->tablename=""; $this->NoResourceId=0; $this->debuglevel=0; } - + // ============================================================================================ function GetFormatter($field) { return $this->HasFormatter($field) ? $this->Formatters[$field] : false; } - + function isLiveTable() { global $objSession; @@ -68,14 +68,14 @@ { case FT_OPTION: $this->Formatters[$field]['options'] = $params; - break; + break; } } - /* + /* function FormatFields() { // format item in list data before printing - + foreach($this->Formatters as $field => $formatter) $this->Data[$field] = $this->FormatField($field); } @@ -90,20 +90,20 @@ { case FT_OPTION: return $fmt['options'][ $this->Data[$field] ]; - break; + break; } } else return $this->Get($field); } - + function HasFormatter($field) { // checks if formatter is set for field return isset($this->Formatters[$field]) ? 1 : 0; } // ============================================================================================ - + function UnsetIdField() { $f = $this->IdField(); @@ -120,7 +120,7 @@ function IdField() { if(!strlen($this->id_field)) - { + { return $this->tablename."Id"; } else @@ -134,17 +134,17 @@ function SetUniqueId($value) { - $var = $this->IdField(); - + $var = $this->IdField(); + if( $this->UsingTempTable() ) $value = $this->UniqueId(); - + $this->Set($var, $value); } function SetModified($UserId=NULL,$modificationDate=null) { global $objSession; - + $keys = array_keys($this->Data); if(in_array("Modified",$keys)) { @@ -162,28 +162,32 @@ { echo '
'.print_r($this->Data, true).'
'; } - + // ================================================================= function GetFormatted($name) - { + { // get formatted field value return $this->FormatField($name); } - function Get($name) - { + function Get($name, $ifempty=null) + { // get un-formatted field value //if( !isset($this->Data[$name]) ) print_pre( debug_backtrace() ); - return $this->HasField($name) ? $this->Data[$name] : ''; + $ret = $this->HasField($name) ? $this->Data[$name] : ''; + if (isset($ifempty) && $ret == '') { + $ret = $this->Data[$ifempty]; + } + return $ret; } // ================================================================= function HasField($name) { // checks if field exists in item - return isset($this->Data[$name]) ? 1 : 0; + return isset($this->Data[$name]) ? 1 : 0; } - + /** * Set's value(-s) of field(-s) specified. * Modifies HasChanges flag automatically. @@ -207,8 +211,8 @@ $this->_Set($name,$value); } } - - + + /** * Set's value(-s) of field(-s) specified. * Modifies HasChanges flag automatically. @@ -240,9 +244,9 @@ } } else - { - foreach($list as $field) - { + { + foreach($list as $field) + { $this->m_dirtyFieldsMap[$field] = $this->Data[$field]; } } @@ -256,9 +260,9 @@ $this->m_dirtyFieldsMap=array(); } else - { - foreach($list as $value) - { + { + foreach($list as $value) + { $varname = "m_" . $value; unset($this->m_dirtyFieldsMap[$value]); } @@ -271,9 +275,9 @@ } function SetFromArray($data, $dirty = false) - { + { if(is_array($data)) - { + { $this->Data = $data; if($dirty) $this->m_dirtyFieldsMap = $data; } @@ -290,7 +294,7 @@ } function Delete() - { + { global $Errors; if($this->Get($this->IdField())==0) @@ -316,7 +320,7 @@ global $Errors, $objSession; if( !$this->raiseEvent('OnBeforeItemUpdate') ) return false; - + if( count($this->m_dirtyFieldsMap) == 0 ) return true; $this->SetModified($UpdatedBy, $modificationDate); @@ -328,17 +332,17 @@ { if( is_null($value) ) { - $value = 'NULL'; + $value = 'NULL'; } else { - $value = $this->adodbConnection->qstr( isset($GLOBALS['_CopyFromEditTable']) ? $value : stripslashes($value) ); + $value = $this->adodbConnection->qstr( isset($GLOBALS['_CopyFromEditTable']) ? $value : stripslashes($value) ); } $sql .= '`'.$key.'` = '.$value.', '; } } $sql = preg_replace('/(.*), $/','\\1',$sql); - + $sql .= ' WHERE '.$this->IdField().' = '.$this->adodbConnection->qstr( $this->UniqueId() ); if( $this->debuglevel > 0 ) echo $sql.'
'; @@ -349,28 +353,28 @@ } if( $objSession->GetVariable('HasChanges') == 2 ) $objSession->SetVariable('HasChanges', 1); - + $this->raiseEvent('OnAfterItemUpdate'); - + return true; } - + function ReplaceID($new_id) { - // replace item's id, because Update method + // replace item's id, because Update method // is too dummy to do this autommatically // USED in temporary table editing stuff $db =& $this->adodbConnection; - $sql = "UPDATE %1\$s SET `%2\$s` = %3\$s WHERE `%2\$s` = %4\$s"; + $sql = "UPDATE %1\$s SET `%2\$s` = %3\$s WHERE `%2\$s` = %4\$s"; $sql = sprintf($sql, $this->tablename, $this->IdField(), $new_id, (int)$this->UniqueId() ); if($this->debuglevel > 0) echo $sql.'
'; $db->Execute($sql); } - + function CreateSQL() { global $Errors; - + $sql = "INSERT INTO ".$this->tablename." ("; $first = 1; foreach ($this->Data as $key => $value) @@ -413,10 +417,10 @@ } } $sql = sprintf('%s)',$sql); - + return $sql; } - + /** * Set's HasChanges flag based on new field * with $name with value $value. @@ -426,27 +430,27 @@ * @access private */ function DetectChanges($name, $value) - { + { global $objSession; if( !is_object($objSession) ) return false; - + //echo "class: ".get_class($this)."
"; if (!isset($this->Data[$name]) ) return false; - - if ( getArrayValue($this->Data, $name) != $value && $value != '') { + + if ( getArrayValue($this->Data, $name) != $value && $value != '') { //echo "$name Modified tt ".$this->Data[$name]." tt $value
"; if ($objSession->GetVariable("HasChanges") != 1) { - $objSession->SetVariable("HasChanges", 2); + $objSession->SetVariable("HasChanges", 2); } } } - + function Create() { global $Errors, $objSession; - + if( !$this->raiseEvent('OnBeforeItemCreate') ) return false; - + if($this->debuglevel) echo "Creating Item: ".get_class($this)."
"; if($this->NoResourceId!=1 && (int)$this->Get("ResourceId")==0) { @@ -474,36 +478,36 @@ } */ $this->raiseEvent('OnAfterItemCreate'); - + return true; } function Increment($field, $calculate_hot = false) - { + { global $Errors; - + if ($calculate_hot) { $sql = "SELECT $field FROM ".$this->tablename." WHERE ".$this->IdField()." = ".$this->UniqueId(); $rs = $this->adodbConnection->Execute($sql); - + $sql = "SELECT MAX($field) AS max_value FROM ".$this->tablename." WHERE ROUND($field) = ".round($rs->fields[$field]); $rs = $this->adodbConnection->Execute($sql); //echo "MAX VALUE: ".$rs->fields['max_value']."
"; //echo "MAX SQL: $sql
"; $new_val = $rs->fields['max_value'] + 1; - + $sql = "SELECT count($field) AS count FROM ".$this->tablename." WHERE $field = $new_val"; - $rsc = $this->adodbConnection->Execute($sql); - + $rsc = $this->adodbConnection->Execute($sql); + while ($rsc->fields['count'] != 0) { $sql = "SELECT count($field) AS count FROM ".$this->tablename." WHERE $field = $new_val"; - $rsc = $this->adodbConnection->Execute($sql); + $rsc = $this->adodbConnection->Execute($sql); //echo "New Value:$new_val
"; if ($rsc->fields['count'] > 0) { $new_val = $new_val + 0.000001; } } - + $sql = "Update ".$this->tablename." set $field=$new_val where ".$this->IdField()."=" . $this->UniqueId(); } else { @@ -517,7 +521,7 @@ $Errors->AddError("error.DatabaseError",NULL,$this->adodbConnection->ErrorMsg(),"",get_class($this),"Increment"); return false; } - + if ($calculate_hot) { $this->Set($field,$new_val); } @@ -527,7 +531,7 @@ } function Decrement($field) - { + { global $Errors; $sql = "Update ".$this->tablename." set $field=$field-1 where ".$this->IdField()."=" .(int)$this->UniqueId(); @@ -541,7 +545,7 @@ } $this->Set($field,$this->Get($field)-1); } - + function GetFieldList($UseLoadedData=FALSE) { if(count($this->Data) && $UseLoadedData==TRUE) @@ -554,38 +558,38 @@ } return $res; } - + function UsingTempTable() { global $objSession; - + $temp = $objSession->GetEditTable($this->tablename); $p = GetTablePrefix()."ses"; $t = substr($temp,0,strlen($p)); - $ThisTable = substr($this->tablename,0,strlen($p)); + $ThisTable = substr($this->tablename,0,strlen($p)); if($t==$ThisTable) { return TRUE; } else return FALSE; } - + function LoadFromDatabase($Id, $IdField = null) // custom IdField by Alex { global $objSession,$Errors; - + if(!isset($Id)) { $Errors->AddError("error.AppError",NULL,'Internal error: LoadFromDatabase id',"",get_class($this),"LoadFromDatabase"); return false; } - + // --------- multiple ids allowed: begin ----------------- $id_field = isset($IdField) ? $IdField : $this->IdField(); if( !is_array($id_field) ) $id_field = Array($id_field); if( !is_array($Id) ) $Id = Array($Id); - + $i = 0; $id_count = count($id_field); $conditions = Array(); while($i < $id_count) @@ -595,7 +599,7 @@ } $sql = sprintf($this->SelectSQL, $this->tablename, implode(' AND ', $conditions) ); // --------- multiple ids allowed: end -------------------- - if($this->debuglevel) echo "Load SQL: $sql
"; + if($this->debuglevel) echo "Load SQL: $sql
"; $result = $this->adodbConnection->Execute($sql); if ($result === false) { @@ -609,13 +613,13 @@ $this->Clean(); return TRUE; } - + function FieldExists($field) { $res = array_key_exists($field,$this->Data); - return $res; + return $res; } - + function ValueExists($Field,$Value) { $sql = "SELECT $Field FROM ".$this->tablename." WHERE $Field='$Value'"; @@ -639,7 +643,7 @@ else $ret = 0; } - + function FieldMin($Field) { $sql = "SELECT Min($Field) as m FROM ".$this->tablename; @@ -651,19 +655,18 @@ else $ret = 0; } - + function TableExists($table = null) { static $tables_found = Array (); - + if($table == null) $table = $this->tablename; - - + if (!isset($tables_found[$table])) { - // checks if table specified in item exists in db + // checks if table specified in item exists in db $db =& GetADODBConnection(); $sql = "SHOW TABLES LIKE '%s'"; - + $rs = $db->Execute( sprintf($sql, $table) ); if ($rs->RecordCount() == 1) { // table exists in normal case @@ -675,24 +678,24 @@ $tables_found[$table] = $rs->RecordCount() == 1 ? 1 : 0; } } - + return $tables_found[$table]; } - + function raiseEvent($name, $id = null) { return true; - + /*if (!getArrayValue($GLOBALS, '_CopyFromEditTable')) { return true; } - + if( !isset($id) ) $id = $this->GetID(); $event = new kEvent( Array('name'=>$name,'prefix'=>$this->Prefix,'special'=>$this->Special) ); $event->setEventParam('id', $id); $this->Application->HandleEvent($event); return $event->status == erSUCCESS ? true : false;*/ } - + } ?> Index: trunk/core/admin_templates/tools/system_tools.tpl =================================================================== diff -u -N -r8104 -r8397 --- trunk/core/admin_templates/tools/system_tools.tpl (.../system_tools.tpl) (revision 8104) +++ trunk/core/admin_templates/tools/system_tools.tpl (.../system_tools.tpl) (revision 8397) @@ -14,33 +14,34 @@ } - -
- : + : - ');" value="Go"> + ', '');" value="Go">  
+
- - - - - + + + + + + - "> + "> - + - + - + - + - + - +
Table Structure: + table name (prefix optional) OR unit config prefix Index: trunk/core/units/general/main_event_handler.php =================================================================== diff -u -N -r6428 -r8397 --- trunk/core/units/general/main_event_handler.php (.../main_event_handler.php) (revision 6428) +++ trunk/core/units/general/main_event_handler.php (.../main_event_handler.php) (revision 8397) @@ -82,9 +82,14 @@ } $ret .= $theme_name.'/'; } - + if ($processed_params['m_cat_id'] > 0 && isset($url_params['pass_category']) && $url_params['pass_category']) { - $ret .= $this->Application->getFilename('c', $processed_params['m_cat_id']).'/'; + $category_filename = $this->Application->getFilename('c', $processed_params['m_cat_id']); + $t = isset($url_params['t']) && $url_params['t'] ? $url_params['t'] : false; + // category name doesn't match template name -> Proj-CMS/In-Edit tricks + if (!preg_match('/Content\/'.preg_quote($t, '/').'/i', $category_filename)) { + $ret .= $category_filename.'/'; + } $url_params['category_processed'] = true; } else { Index: trunk/core/install/step_templates/db_config.tpl =================================================================== diff -u -N -r6691 -r8397 --- trunk/core/install/step_templates/db_config.tpl (.../db_config.tpl) (revision 6691) +++ trunk/core/install/step_templates/db_config.tpl (.../db_config.tpl) (revision 8397) @@ -1,4 +1,4 @@ -
Server Type*:
Hostname*:
Database Name*:
Database User Name*:
Database User Password:
Table Name Prefix: Index: trunk/core/admin_templates/custom_fields/custom_fields_edit.tpl =================================================================== diff -u -N -r7391 -r8397 --- trunk/core/admin_templates/custom_fields/custom_fields_edit.tpl (.../custom_fields_edit.tpl) (revision 7391) +++ trunk/core/admin_templates/custom_fields/custom_fields_edit.tpl (.../custom_fields_edit.tpl) (revision 8397) @@ -56,7 +56,7 @@ - +
Index: trunk/kernel/admin_templates/regional/languages_export_step2.tpl =================================================================== diff -u -N -r4834 -r8397 --- trunk/kernel/admin_templates/regional/languages_export_step2.tpl (.../languages_export_step2.tpl) (revision 4834) +++ trunk/kernel/admin_templates/regional/languages_export_step2.tpl (.../languages_export_step2.tpl) (revision 8397) @@ -12,7 +12,7 @@ - "> + "> - "> + "> Index: trunk/admin/install/lang_select.php =================================================================== diff -u -N -r315 -r8397 --- trunk/admin/install/lang_select.php (.../lang_select.php) (revision 315) +++ trunk/admin/install/lang_select.php (.../lang_select.php) (revision 8397) @@ -15,13 +15,13 @@ \n"; } ?> - +
@@ -21,7 +21,7 @@  
"; + echo "
"; echo ""; echo substr($p,0,-5); echo "


Index: trunk/core/admin_templates/categories/ci_blocks.tpl =================================================================== diff -u -N -r6784 -r8397 --- trunk/core/admin_templates/categories/ci_blocks.tpl (.../ci_blocks.tpl) (revision 6784) +++ trunk/core/admin_templates/categories/ci_blocks.tpl (.../ci_blocks.tpl) (revision 8397) @@ -25,7 +25,7 @@ - + @@ -34,7 +34,7 @@ - "> + "> +
Index: trunk/admin/install/inportal_data.sql =================================================================== diff -u -N -r8104 -r8397 --- trunk/admin/install/inportal_data.sql (.../inportal_data.sql) (revision 8104) +++ trunk/admin/install/inportal_data.sql (.../inportal_data.sql) (revision 8397) @@ -225,4 +225,4 @@ INSERT INTO Stylesheets VALUES (8, 'Default', 'In-Portal Default Theme', '', 1124952555, 1); -INSERT INTO Modules VALUES ('In-Portal', 'kernel/', 'm', '4.0.2', 1, 0, '', 0, '1054738405'); +INSERT INTO Modules VALUES ('In-Portal', 'kernel/', 'm', '4.1.0', 1, 0, '', 0, '1054738405'); Index: trunk/core/admin_templates/js/ajax.js =================================================================== diff -u -N -r8174 -r8397 --- trunk/core/admin_templates/js/ajax.js (.../ajax.js) (revision 8174) +++ trunk/core/admin_templates/js/ajax.js (.../ajax.js) (revision 8397) @@ -115,7 +115,7 @@ } Request.setOpacity = function (opacity, id) { - var elem = typeof(id)=='string' ? document.getElementById(id) : id; + var elem = typeof(id)=='string' ? document.getElementById(id) : id; var object = elem.style; object.opacity = (opacity / 100); object.MozOpacity = (opacity / 100); Index: trunk/core/install/incs/install.tpl =================================================================== diff -u -N -r7635 -r8397 --- trunk/core/install/incs/install.tpl (.../install.tpl) (revision 7635) +++ trunk/core/install/incs/install.tpl (.../install.tpl) (revision 8397) @@ -92,7 +92,7 @@ -

errorMessage; ?> Index: trunk/kernel/units/sections/sections_config.php =================================================================== diff -u -N -r7635 -r8397 --- trunk/kernel/units/sections/sections_config.php (.../sections_config.php) (revision 7635) +++ trunk/kernel/units/sections/sections_config.php (.../sections_config.php) (revision 8397) @@ -129,7 +129,7 @@ '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, + 'show_mode' => smDEBUG, 'type' => stTREE, ), Index: trunk/core/admin_templates/config/config_general.tpl =================================================================== diff -u -N -r7855 -r8397 --- trunk/core/admin_templates/config/config_general.tpl (.../config_general.tpl) (revision 7855) +++ trunk/core/admin_templates/config/config_general.tpl (.../config_general.tpl) (revision 8397) @@ -88,7 +88,7 @@ - +
- " header_label="la_Text_RootCategory"> + " header_label="la_Text_RootCategory"> Index: trunk/kernel/include/emailmessage.php =================================================================== diff -u -N -r8104 -r8397 --- trunk/kernel/include/emailmessage.php (.../emailmessage.php) (revision 8104) +++ trunk/kernel/include/emailmessage.php (.../emailmessage.php) (revision 8397) @@ -867,38 +867,13 @@ $ado->Execute($sql); } + /** + * Depricated + * + */ function SendMailQeue() { - global $objConfig, $objSession, $TotalMessagesSent; - - $ado = &GetADODBConnection(); - $MaxAllowed = $this->MessagesAtOnce; - - $del_sql = array(); - - $NumToSend = $MaxAllowed - $this->MessagesSent; - if($NumToSend < 0) $NumToSend=1; // Don't really know why, but this could happend, so issued this temp fix - $sql = "SELECT * FROM ".$this->SourceTable." ORDER BY queued ASC LIMIT $NumToSend"; - $rs = $ado->Execute($sql); - - while($rs && !$rs->EOF) - { - $data = $rs->fields; - $this->DeliverMail($data["toaddr"],$data["fromaddr"],$data["Subject"],$data["message"],$data["headers"],1); - - $del_sql[] = "DELETE FROM ".$this->SourceTable." WHERE queued='".$data["queued"]."'"; - $rs->MoveNext(); - } - - $numdel = count($del_sql); - for($i=0;$i<$numdel;$i++) - { - $sql = $del_sql[$i]; - if(strlen($sql)) - $ado->Execute($sql); - if($objSession->HasSystemPermission("DEBUG.ITEM")) - echo htmlentities($sql,ENT_NOQUOTES)."
\n"; - } + return ; } function SendMail($From, $FromName, $ToAddr, $ToName, $Subject, $Text, $Html, $charset, $SendEvent,$FileName="",$FileLoc="",$QueueOnly=0,$extra_headers = array()) @@ -931,7 +906,7 @@ $esender->AddAttachment($FileLoc, basename($FileName)); } - $status = $esender->Deliver(); + $status = $esender->Deliver(null, $QueueOnly ? false : true); if ($status) { // write to log Index: trunk/core/admin_templates/emails/send_complete.tpl =================================================================== diff -u -N --- trunk/core/admin_templates/emails/send_complete.tpl (revision 0) +++ trunk/core/admin_templates/emails/send_complete.tpl (revision 8397) @@ -0,0 +1,16 @@ + + + + + + +
@@ -99,7 +99,7 @@
+ + "> + + +
+ " class="button" onclick="window.close();"/> +
+ + \ No newline at end of file Index: trunk/admin/install/dbinfo.php =================================================================== diff -u -N -r1684 -r8397 --- trunk/admin/install/dbinfo.php (.../dbinfo.php) (revision 1684) +++ trunk/admin/install/dbinfo.php (.../dbinfo.php) (revision 8397) @@ -11,7 +11,7 @@

- + - + - + - + - + - + - + Index: trunk/admin/install/upgrades/changelog_4_1_0.txt =================================================================== diff -u -N --- trunk/admin/install/upgrades/changelog_4_1_0.txt (revision 0) +++ trunk/admin/install/upgrades/changelog_4_1_0.txt (revision 8397) @@ -0,0 +1,256 @@ +File in-portal/admin/install.php changed +File in-portal/admin/email/do_send.php changed +File in-portal/admin/include/elements.php changed +File in-portal/admin/include/mainscript.php changed +File in-portal/admin/include/style.css changed +File in-portal/admin/include/tabs.js changed +File in-portal/admin/install/db_reconfig.php changed +File in-portal/admin/install/dbinfo.php changed +File in-portal/admin/install/domain.php changed +File in-portal/admin/install/download_license.php changed +File in-portal/admin/install/fix_paths.php changed +File in-portal/admin/install/general_error.php changed +File in-portal/admin/install/get_license.php changed +File in-portal/admin/install/inportal_data.sql changed +File in-portal/admin/install/inportal_remove.sql changed +File in-portal/admin/install/inportal_schema.sql changed +File in-portal/admin/install/install_finish.php changed +File in-portal/admin/install/install_lib.php changed +File in-portal/admin/install/lang_default.php changed +File in-portal/admin/install/lang_run.php changed +File in-portal/admin/install/lang_select.php changed +File in-portal/admin/install/login.php changed +File in-portal/admin/install/modselect.php changed +File in-portal/admin/install/postconfig.php changed +File in-portal/admin/install/reinstall.php changed +File in-portal/admin/install/restore_run.php changed +File in-portal/admin/install/restore_select.php changed +File in-portal/admin/install/rootpass.php changed +File in-portal/admin/install/sel_license.php changed +File in-portal/admin/install/settings.php changed +File in-portal/admin/install/theme_select.php changed +File in-portal/admin/install/upgrade.php changed +File in-portal/admin/install/warning.php changed +File in-portal/admin/install/langpacks/english.lang changed +File in-portal/admin/install/upgrades/changelog_4_0_1.txt changed +File in-portal/admin/install/upgrades/changelog_4_1_0.txt is new; release_4_1_0 revision 1.1.2.6 +File in-portal/admin/install/upgrades/inportal_upgrade_v1.3.2.sql is removed; release_4_0_1 revision 1.2 +File in-portal/admin/install/upgrades/inportal_upgrade_v4.1.0.php is new; release_4_1_0 revision 1.1.2.2 +File in-portal/admin/install/upgrades/inportal_upgrade_v4.1.0.sql is new; release_4_1_0 revision 1.1.2.4 +File in-portal/admin/install/upgrades/readme_4_1_0.txt is new; release_4_1_0 revision 1.1.2.1 +File in-portal/admin/tools/server_info.php changed +File in-portal/admin/users/adduser.php changed +File in-portal/kernel/parser.php changed +File in-portal/kernel/admin/include/toolbar/sendmail.php 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/no_permission.tpl changed +File in-portal/kernel/admin_templates/categories/ci_blocks.tpl changed +File in-portal/kernel/admin_templates/categories/permissions_tab.tpl changed +File in-portal/kernel/admin_templates/config/config_general.tpl changed +File in-portal/kernel/admin_templates/config/config_search.tpl changed +File in-portal/kernel/admin_templates/groups/groups_edit_permissions.tpl changed +File in-portal/kernel/admin_templates/groups/permissions_selector.tpl changed +File in-portal/kernel/admin_templates/incs/config_blocks.tpl changed +File in-portal/kernel/admin_templates/incs/custom_blocks.tpl changed +File in-portal/kernel/admin_templates/incs/image_blocks.tpl changed +File in-portal/kernel/admin_templates/regional/languages_edit.tpl changed +File in-portal/kernel/admin_templates/regional/languages_export.tpl changed +File in-portal/kernel/admin_templates/regional/languages_export_step2.tpl changed +File in-portal/kernel/admin_templates/stylesheets/base_style_edit.tpl changed +File in-portal/kernel/admin_templates/stylesheets/block_style_edit.tpl changed +File in-portal/kernel/admin_templates/stylesheets/style_editor.tpl changed +File in-portal/kernel/admin_templates/visits/visits_list.tpl changed +File in-portal/kernel/include/category.php changed +File in-portal/kernel/include/config.php changed +File in-portal/kernel/include/customfield.php changed +File in-portal/kernel/include/custommetadata.php changed +File in-portal/kernel/include/emailmessage.php changed +File in-portal/kernel/include/globals.php changed +File in-portal/kernel/include/item.php changed +File in-portal/kernel/include/itemdb.php changed +File in-portal/kernel/include/language.php changed +File in-portal/kernel/include/modules.php changed +File in-portal/kernel/include/parse.php changed +File in-portal/kernel/include/permissions.php changed +File in-portal/kernel/include/theme.php changed +File in-portal/kernel/include/usersession.php changed +File in-portal/kernel/include/adodb/adodb.inc.php changed +File in-portal/kernel/include/adodb/drivers/adodb-mysql.inc.php changed +File in-portal/kernel/units/config_search/config_search_config.php changed +File in-portal/kernel/units/images/images_config.php changed +File in-portal/kernel/units/modules/modules_config.php is removed; release_4_0_1 revision 1.7 +File in-portal/kernel/units/modules/modules_event_handler.php is removed; release_4_0_1 revision 1.10 +File in-portal/kernel/units/modules/modules_tag_processor.php is removed; release_4_0_1 revision 1.3 +File in-portal/kernel/units/relationship/relationship_config.php changed +File in-portal/kernel/units/reviews/reviews_config.php changed +File in-portal/kernel/units/sections/sections_config.php changed +File in-portal/kernel/units/selectors/selectors_config.php changed +File in-portal/kernel/units/statistics/statistics_config.php changed +File in-portal/kernel/units/stylesheets/stylesheets_config.php changed +File in-portal/kernel/units/visits/visits_config.php changed +File kernel.X/core/install.php is new; release_4_1_0 revision 1.9.2.1 +File kernel.X/core/admin_templates/head.tpl changed +File kernel.X/core/admin_templates/index.tpl changed +File kernel.X/core/admin_templates/login.tpl changed +File kernel.X/core/admin_templates/no_permission.tpl changed +File kernel.X/core/admin_templates/sections_list.tpl changed +File kernel.X/core/admin_templates/swfupload.swf is new; release_4_1_0 revision 1.1.2.1 +File kernel.X/core/admin_templates/tree.tpl changed +File kernel.X/core/admin_templates/config/config_general.tpl changed +File kernel.X/core/admin_templates/config/config_search.tpl changed +File kernel.X/core/admin_templates/config/config_search_edit.tpl changed +File kernel.X/core/admin_templates/config/config_universal.tpl changed +File kernel.X/core/admin_templates/custom_fields/custom_fields_edit.tpl changed +File kernel.X/core/admin_templates/emails/send_complete.tpl is new; release_4_1_0 revision 1.1.2.2 +File kernel.X/core/admin_templates/emails/send_queue.tpl is new; release_4_1_0 revision 1.1.2.1 +File kernel.X/core/admin_templates/img/icons/icon24_conf_themes.gif is new; release_4_1_0 revision 1.1 +File kernel.X/core/admin_templates/img/icons/icon46_conf_themes.gif is new; release_4_1_0 revision 1.1 +File kernel.X/core/admin_templates/img/icons/icon46_list_conf_themes.gif is new; release_4_1_0 revision 1.1 +File kernel.X/core/admin_templates/img/toolbar/tool_new_theme.gif is new; release_4_1_0 revision 1.1 +File kernel.X/core/admin_templates/img/toolbar/tool_new_theme_f2.gif is new; release_4_1_0 revision 1.1 +File kernel.X/core/admin_templates/img/toolbar/tool_new_theme_f3.gif is new; release_4_1_0 revision 1.1 +File kernel.X/core/admin_templates/img/toolbar/tool_primary_theme.gif is new; release_4_1_0 revision 1.1 +File kernel.X/core/admin_templates/img/toolbar/tool_primary_theme_f2.gif is new; release_4_1_0 revision 1.1 +File kernel.X/core/admin_templates/img/toolbar/tool_primary_theme_f3.gif is new; release_4_1_0 revision 1.1 +File kernel.X/core/admin_templates/img/toolbar/tool_rescan_themes.gif is new; release_4_1_0 revision 1.1 +File kernel.X/core/admin_templates/img/toolbar/tool_rescan_themes_f2.gif is new; release_4_1_0 revision 1.1 +File kernel.X/core/admin_templates/img/toolbar/tool_rescan_themes_f3.gif is new; release_4_1_0 revision 1.1 +File kernel.X/core/admin_templates/incs/blocks.tpl changed +File kernel.X/core/admin_templates/incs/config_blocks.tpl changed +File kernel.X/core/admin_templates/incs/form_blocks.tpl changed +File kernel.X/core/admin_templates/incs/grid_blocks.tpl changed +File kernel.X/core/admin_templates/incs/style.css changed +File kernel.X/core/admin_templates/js/ajax.js changed +File kernel.X/core/admin_templates/js/forms.js changed +File kernel.X/core/admin_templates/js/grid.js changed +File kernel.X/core/admin_templates/js/script.js changed +File kernel.X/core/admin_templates/js/swfobject.js is new; release_4_1_0 revision 1.1.2.1 +File kernel.X/core/admin_templates/js/tree.js changed +File kernel.X/core/admin_templates/js/uploader.js is new; release_4_1_0 revision 1.2.2.4 +File kernel.X/core/admin_templates/popups/translator.tpl changed +File kernel.X/core/admin_templates/regional/email_messages_edit.tpl changed +File kernel.X/core/admin_templates/regional/languages_edit.tpl changed +File kernel.X/core/admin_templates/regional/languages_export.tpl changed +File kernel.X/core/admin_templates/regional/languages_export_step2.tpl changed +File kernel.X/core/admin_templates/regional/languages_import.tpl changed +File kernel.X/core/admin_templates/regional/languages_import_step2.tpl changed +File kernel.X/core/admin_templates/regional/languages_list.tpl changed +File kernel.X/core/admin_templates/regional/phrases_edit.tpl changed +File kernel.X/core/admin_templates/skins/skin_edit.tpl is new; release_4_1_0 revision 1.1.2.2 +File kernel.X/core/admin_templates/skins/skin_list.tpl is new; release_4_1_0 revision 1.1.2.1 +File kernel.X/core/admin_templates/themes/themes_edit.tpl is new; release_4_1_0 revision 1.2 +File kernel.X/core/admin_templates/themes/themes_edit_files.tpl is new; release_4_1_0 revision 1.1 +File kernel.X/core/admin_templates/themes/themes_edit_tabs.tpl is new; release_4_1_0 revision 1.1 +File kernel.X/core/admin_templates/themes/themes_list.tpl is new; release_4_1_0 revision 1.2 +File kernel.X/core/admin_templates/tools/skins.tpl is new; release_4_1_0 revision 1.1.2.1 +File kernel.X/core/admin_templates/tools/system_tools.tpl changed +File kernel.X/core/install/english.lang changed +File kernel.X/core/install/install_data.sql changed +File kernel.X/core/install/install_schema.sql changed +File kernel.X/core/install/upgrades.php changed +File kernel.X/core/install/upgrades.sql changed +File kernel.X/core/install/incs/install.tpl changed +File kernel.X/core/install/incs/style.css changed +File kernel.X/core/install/step_templates/check_paths.tpl changed +File kernel.X/core/install/step_templates/choose_modules.tpl changed +File kernel.X/core/install/step_templates/db_config.tpl changed +File kernel.X/core/install/step_templates/finish.tpl changed +File kernel.X/core/install/step_templates/install_setup.tpl changed +File kernel.X/core/install/step_templates/root_password.tpl changed +File kernel.X/core/install/step_templates/upgrade_modules.tpl changed +File kernel.X/core/units/admin/admin_config.php changed +File kernel.X/core/units/admin/admin_events_handler.php changed +File kernel.X/core/units/admin/admin_tag_processor.php changed +File kernel.X/core/units/categories/cache_updater.php changed +File kernel.X/core/units/categories/categories_config.php changed +File kernel.X/core/units/category_items/category_items_config.php changed +File kernel.X/core/units/configuration/configuration_config.php changed +File kernel.X/core/units/configuration/configuration_tag_processor.php changed +File kernel.X/core/units/custom_data/custom_data_config.php changed +File kernel.X/core/units/custom_data/custom_data_event_handler.php changed +File kernel.X/core/units/custom_fields/custom_fields_config.php changed +File kernel.X/core/units/custom_fields/custom_fields_event_handler.php changed +File kernel.X/core/units/custom_fields/custom_fields_tag_processor.php changed +File kernel.X/core/units/email_events/email_events_config.php changed +File kernel.X/core/units/email_events/email_events_event_handler.php changed +File kernel.X/core/units/email_messages/email_messages_config.php changed +File kernel.X/core/units/general/cat_event_handler.php changed +File kernel.X/core/units/general/custom_fields.php changed +File kernel.X/core/units/general/inp1_parser.php changed +File kernel.X/core/units/general/main_event_handler.php changed +File kernel.X/core/units/general/xml_helper.php changed +File kernel.X/core/units/general/helpers/count_helper.php is new; release_4_1_0 revision 1.4 +File kernel.X/core/units/general/helpers/curl_helper.php is new; release_4_1_0 revision 1.1 +File kernel.X/core/units/general/helpers/helpers_config.php changed +File kernel.X/core/units/general/helpers/mod_rewrite_helper.php changed +File kernel.X/core/units/general/helpers/modules.php changed +File kernel.X/core/units/general/helpers/multilanguage.php changed +File kernel.X/core/units/general/helpers/search_helper.php changed +File kernel.X/core/units/general/helpers/themes_helper.php changed +File kernel.X/core/units/groups/groups_config.php changed +File kernel.X/core/units/languages/import_xml.php changed +File kernel.X/core/units/languages/languages_config.php changed +File kernel.X/core/units/languages/languages_event_handler.php changed +File kernel.X/core/units/modules/modules_config.php changed +File kernel.X/core/units/permissions/permissions_config.php changed +File kernel.X/core/units/phrases/phrases_config.php changed +File kernel.X/core/units/skins/skin_eh.php is new; release_4_1_0 revision 1.1.2.1 +File kernel.X/core/units/skins/skins_config.php is new; release_4_1_0 revision 1.1.2.3 +File kernel.X/core/units/theme_files/theme_files_config.php is new; release_4_1_0 revision 1.1 +File kernel.X/core/units/themes/themes_config.php changed +File kernel.X/core/units/themes/themes_eh.php is new; release_4_1_0 revision 1.2 +File kernel.X/core/units/user_groups/user_groups_config.php changed +File kernel.X/core/units/users/users_config.php changed +File kernel.X/core/units/users/users_event_handler.php changed +File kernel.X/core/units/users/users_tag_processor.php changed +File kernel4_dev/kernel4/application.php changed +File kernel4_dev/kernel4/constants.php changed +File kernel4_dev/kernel4/event_handler.php changed +File kernel4_dev/kernel4/event_manager.php changed +File kernel4_dev/kernel4/globals.php changed +File kernel4_dev/kernel4/kbase.php changed +File kernel4_dev/kernel4/startup.php changed +File kernel4_dev/kernel4/db/db_connection.php changed +File kernel4_dev/kernel4/db/db_event_handler.php changed +File kernel4_dev/kernel4/db/db_tag_processor.php changed +File kernel4_dev/kernel4/db/dbitem.php changed +File kernel4_dev/kernel4/db/dblist.php changed +File kernel4_dev/kernel4/languages/phrases_cache.php changed +File kernel4_dev/kernel4/processors/main_processor.php changed +File kernel4_dev/kernel4/processors/tag_processor.php changed +File kernel4_dev/kernel4/session/session.php changed +File kernel4_dev/kernel4/utility/debugger.php changed +File kernel4_dev/kernel4/utility/email_send.php changed +File kernel4_dev/kernel4/utility/event.php changed +File kernel4_dev/kernel4/utility/filters.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/formatters/date_formatter.php changed +File kernel4_dev/kernel4/utility/formatters/serialized_formatter.php changed +File kernel4_dev/kernel4/utility/formatters/unit_formatter.php changed +File kernel4_dev/kernel4/utility/formatters/upload_formatter.php changed +File kernel.X/system/.cvsignore is new; release_4_1_0 revision 1.3 +File kernel.X/system/dummy is new; release_4_1_0 revision 1.1 +File kernel.X/system/cache/.cvsignore is new; release_4_1_0 revision 1.3 +File kernel.X/system/cache/dummy is new; release_4_1_0 revision 1.1 +File kernel.X/system/tmp/.cvsignore is new; release_4_1_0 revision 1.2.2.1 +File kernel.X/system/user_files/.cvsignore is new; release_4_1_0 revision 1.2.2.1 +File kernel.X/system/user_files/just_logo.gif is new; release_4_1_0 revision 1.1.2.1 +File kernel.X/system/user_files/icons/audio.gif is new; release_4_1_0 revision 1.2 +File kernel.X/system/user_files/icons/doc.gif is new; release_4_1_0 revision 1.2 +File kernel.X/system/user_files/icons/excel.gif is new; release_4_1_0 revision 1.2 +File kernel.X/system/user_files/icons/image.gif is new; release_4_1_0 revision 1.2 +File kernel.X/system/user_files/icons/pdf.gif is new; release_4_1_0 revision 1.2 +File kernel.X/system/user_files/icons/ppt.gif is new; release_4_1_0 revision 1.2 +File kernel.X/system/user_files/icons/video.gif is new; release_4_1_0 revision 1.2 +File kernel.X/system/user_files/icons/xml.gif is new; release_4_1_0 revision 1.2 +File cmseditor/editor/filemanager/browser/default/connectors/php/commands.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 Index: trunk/admin/install/lang_default.php =================================================================== diff -u -N -r315 -r8397 --- trunk/admin/install/lang_default.php (.../lang_default.php) (revision 315) +++ trunk/admin/install/lang_default.php (.../lang_default.php) (revision 8397) @@ -24,7 +24,7 @@ $checked = ""; } ?> - +
Server Type:
Hostname:
Database Name:
Database User Name:
Database User Password:
Table Name Prefix:



Index: trunk/core/admin_templates/popups/translator.tpl =================================================================== diff -u -N -r7391 -r8397 --- trunk/core/admin_templates/popups/translator.tpl (.../translator.tpl) (revision 7391) +++ trunk/core/admin_templates/popups/translator.tpl (.../translator.tpl) (revision 8397) @@ -75,7 +75,7 @@ "> "> - +
Index: trunk/admin/install/fix_paths.php =================================================================== diff -u -N -r995 -r8397 --- trunk/admin/install/fix_paths.php (.../fix_paths.php) (revision 995) +++ trunk/admin/install/fix_paths.php (.../fix_paths.php) (revision 8397) @@ -30,7 +30,7 @@ $path_rs->MoveNext(); } ?> - +


Index: trunk/admin/install/rootpass.php =================================================================== diff -u -N -r41 -r8397 --- trunk/admin/install/rootpass.php (.../rootpass.php) (revision 41) +++ trunk/admin/install/rootpass.php (.../rootpass.php) (revision 8397) @@ -11,21 +11,21 @@
- + - + - +
Root Password:
Confirm Root Password:


Index: trunk/admin/install/install_finish.php =================================================================== diff -u -N -r985 -r8397 --- trunk/admin/install/install_finish.php (.../install_finish.php) (revision 985) +++ trunk/admin/install/install_finish.php (.../install_finish.php) (revision 8397) @@ -11,12 +11,12 @@
- + - +
In-portal has successfully been installed on your server. Click the button below to log into the site administration using the root password you just configured.


Index: trunk/kernel/admin_templates/no_permission.tpl =================================================================== diff -u -N -r4834 -r8397 --- trunk/kernel/admin_templates/no_permission.tpl (.../no_permission.tpl) (revision 4834) +++ trunk/kernel/admin_templates/no_permission.tpl (.../no_permission.tpl) (revision 8397) @@ -33,7 +33,7 @@
- "> + ">
No Permission

Index: trunk/core/units/admin/admin_tag_processor.php =================================================================== diff -u -N -r8364 -r8397 --- trunk/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 8364) +++ trunk/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 8397) @@ -151,14 +151,26 @@ return $ret; } - $debug_mode = $this->Application->isDebugMode(); // caching for faster performance + $debug_mode = $this->Application->isDebugMode(); + $super_admin_mode = $this->Application->RecallVar('super_admin'); + ksort($section_data['children'], SORT_NUMERIC); foreach ($section_data['children'] as $section_name) { $section_data =& $sections_helper->getSectionData($section_name); - if (!$debug_mode && isset($section_data['debug_only']) && $section_data['debug_only']) { - // don't show section for debug mode only without debug mode turned on - continue; + + if (isset($section_data['show_mode']) && is_numeric($section_data['show_mode'])) { + $show_mode = $section_data['show_mode']; + // if super admin section -> show in super admin mode & debug mode + $show_section = (($show_mode & smSUPER_ADMIN) == smSUPER_ADMIN) && ($super_admin_mode || $debug_mode); + if (!$show_section) { + // if section is in debug mode only && debug mode -> show + $show_section = (($show_mode & smDEBUG) == smDEBUG) && $debug_mode; + } + if (!$show_section) { + continue; + } } + $params['section_name'] = $section_name; $ret .= $this->DrawTree($params); $deep_level--; @@ -275,7 +287,7 @@ $params['section_name'] = $section_name; $section_data =& $sections_helper->getSectionData($section_name); - if (isset($section_data['show_mode'])) { + if (isset($section_data['show_mode']) && is_numeric($section_data['show_mode'])) { $show_mode = $section_data['show_mode']; // if super admin section -> show in super admin mode & debug mode $show_section = (($show_mode & smSUPER_ADMIN) == smSUPER_ADMIN) && ($super_admin_mode || $debug_mode); @@ -717,23 +729,111 @@ */ function MainFrameLink($params) { - $last_template = $this->Application->RecallVar('last_template_popup'); // because of m_opener=s there + $persistent = isset($params['persistent']) && $params['persistent']; + if ($persistent) { + // check last_template in persistent session + $last_template = $this->Application->RecallPersistentVar('last_template_popup'); + } + else { + // check last_template in session + $last_template = $this->Application->RecallVar('last_template_popup'); // because of m_opener=s there + } + if (!$last_template) { - return false; + $params['persistent'] = 1; + return $persistent ? false : $this->MainFrameLink($params); } - list(, $env) = explode('|', $last_template); + list($index_file, $env) = explode('|', $last_template); $vars = $this->Application->HttpQuery->processQueryString($env, 'pass'); - if ($vars['t'] == 'login' || $vars['t'] == 'index') { + $recursion_templates = Array ('login', 'index'); + + if (isset($vars['admin']) && $vars['admin'] == 1) { + // index template doesn't begin recursion on front-end (in admin frame) + $vars['m_theme'] = ''; + + if (isset($params['m_opener']) && $params['m_opener'] == 'r') { + // front-end link for highlighting purposes + $vars['t'] = 'index'; + $vars['m_cat_id'] = $this->Application->findModule('Name', 'Proj-CMS', 'RootCat'); + } + + unset($recursion_templates[ array_search('index', $recursion_templates)]); + } + + if (in_array($vars['t'], $recursion_templates)) { // prevents redirect recursion OR old in-portal pages - return false; + $params['persistent'] = 1; + return $persistent ? false : $this->MainFrameLink($params); } $vars = array_merge_recursive2($vars, $params); $t = $vars['t']; unset($vars['t']); + + return $this->Application->HREF($t, '', $vars, $index_file); + } - return $this->Application->HREF($t, '', $vars); + + function AdminSkin($params) + { + static $style; + if (!isset($style)) { + $style = $this->Conn->GetRow('SELECT * FROM '.TABLE_PREFIX.'Skins WHERE IsPrimary = 1'); + } + + $css_path = WRITEABLE.'/user_files'; + $css_url = $this->Application->BaseURL(WRITEBALE_BASE).'user_files/'; + + if (isset($params['type']) && $params['type'] == 'logo') { + return $style['Logo'] ? $css_url.$style['Logo'] : ''; + } + + $last_compiled = $style['LastCompiled']; + + $style_name = strtolower( $style['Name'] ); + + if( file_exists($css_path.'/'.'admin-'.$style_name.'-'.$last_compiled.'.css') ) + { + $ret = $css_url.'admin-'.$style_name.'-'.$last_compiled.'.css'; + + } + else + { + // search for previously compiled stylesheet + $last_compiled = 0; + if( $dh = opendir($css_path) ) + { + while( ($file = readdir($dh)) !== false ) + { + if( preg_match('/admin-(.*)-([\d]+).css/', $file, $rets) ) + { + if( $rets[1] == $style_name && $rets[2] > $last_compiled ) $last_compiled = $rets[2]; + } + } + closedir($dh); + } + if ($last_compiled) { + // found + $ret = $css_url.'admin-'.$style_name.'-'.$last_compiled.'.css'; + } + else { + // not found (try to compile on the fly) + $object =& $this->Application->recallObject('skin.-item', null, Array ('skip_autoload' => true)); + /* @var $object kDBItem */ + + $skin_eh =& $this->Application->recallObject('skin_EventHandler'); + /* @var $skin_eh SkinEventHandler */ + + $object->Load(1, 'IsPrimary'); + $skin_eh->Compile($object); + $ret = $css_url.'admin-'.$style_name.'-'.adodb_mktime().'.css'; + } + } + + if (isset($params['file_only'])) return $ret; + + return ''; } } Index: trunk/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r8374 -r8397 --- trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 8374) +++ trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 8397) @@ -139,24 +139,9 @@ function FormAction($params) { - $pass_category = true; - $category_id = $this->Application->GetVar('m_cat_id'); - - if ($category_id > 0) { - $category = $this->Application->recallObject('c'); - /* @var $category kDBItem */ - - $t = $this->Application->GetVar('t'); - if (preg_match('/Content\/'.preg_quote($t, '/').'/i', $category->GetDBField('NamedParentPath'))) { - // category name matches template name -> Proj-CMS/In-Edit tricks - $pass_category = false; - } - } - $params['pass'] = 'all,m'; - if ($pass_category) { - $params['pass_category'] = 1; - } + $params['pass_category'] = 1; + return $this->Application->HREF('', '', $params); } @@ -459,9 +444,9 @@ // m:phrase name="phrase_name" default="Tr-alala" updated="2004-01-29 12:49" if (array_key_exists('default', $params)) return $params['default']; //backward compatibility $translation = $this->Application->Phrase($this->SelectParam($params, 'label,name,title')); + if (getArrayValue($params, 'escape')) { - $translation = htmlspecialchars($translation); - $translation = str_replace('\'', ''', $translation); + $translation = htmlspecialchars($translation, ENT_QUOTES); $translation = addslashes($translation); } return $translation; @@ -597,7 +582,7 @@ $res = ''; } } - + $this->Application->Parser =& $parser; $this->Application->Parser->DataExists = $this->Application->Parser->DataExists || $BlockParser->DataExists;