Index: branches/5.3.x/core/kernel/utility/email.php =================================================================== diff -u -N -r16395 -r16503 --- branches/5.3.x/core/kernel/utility/email.php (.../email.php) (revision 16395) +++ branches/5.3.x/core/kernel/utility/email.php (.../email.php) (revision 16503) @@ -1,6 +1,6 @@ fromEmail = $user_info['Email']; $this->fromName = trim($user_info['FirstName'] . ' ' . $user_info['LastName']); - $user = $this->Application->recallObject('u.email-from', null, Array ('skip_autoload' => true)); + $user = $this->Application->recallObject( + 'u.email-from', + null, + array('live_table' => true, 'skip_autoload' => true) + ); /* @var $user UsersItem */ $user->Load($user_info['PortalUserId']); @@ -602,7 +606,11 @@ array_unshift($this->recipients[EmailTemplate::RECIPIENT_TYPE_TO], $add_recipient); - $user = $this->Application->recallObject('u.email-to', null, Array('skip_autoload' => true)); + $user = $this->Application->recallObject( + 'u.email-to', + null, + array('live_table' => true, 'skip_autoload' => true) + ); /* @var $user UsersItem */ $user->Load($this->recipientUserId); Index: branches/5.3.x/core/kernel/db/db_event_handler.php =================================================================== diff -u -N -r16395 -r16503 --- branches/5.3.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 16395) +++ branches/5.3.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 16503) @@ -1,6 +1,6 @@ Update() ) { - $event->status = kEvent::erSUCCESS; - } - else { - $event->status = kEvent::erFAIL; - $event->redirect = false; - break; - } + $object->Update(); } } Index: branches/5.3.x/core/units/users/users_event_handler.php =================================================================== diff -u -N -r16395 -r16503 --- branches/5.3.x/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 16395) +++ branches/5.3.x/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 16503) @@ -1,6 +1,6 @@ Name == 'OnUpdate' && $user_id > 0 ) { + if ( substr($event->Name, 0, 8) == 'OnUpdate' && $user_id > 0 ) { $user_dummy = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true)); /* @var $user_dummy UsersItem */ @@ -186,7 +186,7 @@ return is_numeric($this->getPassedID($event)); } - if ( $event->Name == 'OnUpdate' && $user_id <= 0 ) { + if ( substr($event->Name, 0, 8) == 'OnUpdate' && $user_id <= 0 ) { // guests are not allowed to update their record, because they don't have it :) return false; } @@ -908,6 +908,20 @@ } /** + * Updates kDBItem via AJAX. + * + * @param kEvent $event Event. + * + * @return void + */ + protected function OnUpdateAjax(kEvent $event) + { + /** @var AjaxFormHelper $ajax_form_helper */ + $ajax_form_helper = $this->Application->recallObject('AjaxFormHelper'); + $ajax_form_helper->transitEvent($event, 'OnUpdate'); + } + + /** * Checks state against country * * @param kEvent $event Index: branches/5.3.x/index.php =================================================================== diff -u -N -r16440 -r16503 --- branches/5.3.x/index.php (.../index.php) (revision 16440) +++ branches/5.3.x/index.php (.../index.php) (revision 16503) @@ -1,6 +1,6 @@ = 8 ) && attributes.name != element.getAttribute( 'name' ) ) - { - var newElement = new CKEDITOR.dom.element( '', - editor.document ); + element.setAttributes(attributes); + element.removeAttributes(removeAttributes); - selection = editor.getSelection(); - - element.copyAttributes( newElement, { name : 1 } ); - element.moveChildren( newElement ); - newElement.replace( element ); - element = newElement; - - selection.selectElement( element ); + if ( data.adv && data.adv.advName && CKEDITOR.plugins.link.synAnchorSelector ) { + element.addClass(element.getChildCount() ? 'cke_anchor' : 'cke_anchor_empty'); } - element.setAttributes( attributes ); - element.removeAttributes( removeAttributes ); // Update text view when user changes protocol (#4612). - if ( href == textView || data.type == 'email' && textView.indexOf( '@' ) != -1 ) - { + if ( href == textView || data.type == 'email' && textView.indexOf('@') != -1 ) { // Short mailto link text view (#5736). - element.setHtml( data.type == 'email' ? - data.email.address : attributes[ 'data-cke-saved-href' ] ); + element.setHtml(data.type == 'email' ? data.email.address : attributes['data-cke-saved-href']); } - // Make the element display as an anchor if a name has been set. - if ( element.getAttribute( 'name' ) ) - element.addClass( 'cke_anchor' ); - else - element.removeClass( 'cke_anchor' ); - if ( this.fakeObj ) - editor.createFakeElement( element, 'cke_anchor', 'anchor' ).replace( this.fakeObj ); - + selection.selectElement(element); delete this._.selectedElement; } }; Index: branches/5.3.x/core/install/upgrades.sql =================================================================== diff -u -N -r16395 -r16503 --- branches/5.3.x/core/install/upgrades.sql (.../upgrades.sql) (revision 16395) +++ branches/5.3.x/core/install/upgrades.sql (.../upgrades.sql) (revision 16503) @@ -2934,6 +2934,7 @@ WHERE TemplateName LIKE 'USER%'; UPDATE SystemSettings SET VariableValue = 1 WHERE VariableName = 'CSVExportEncoding'; +ALTER TABLE Semaphores ADD MainIDs INT NULL DEFAULT NULL AFTER MainPrefix; # ===== v 5.3.0-B1 ===== ALTER TABLE ScheduledTasks ADD Settings TEXT NULL; Index: branches/5.3.x/core/install/install_schema.sql =================================================================== diff -u -N -r16328 -r16503 --- branches/5.3.x/core/install/install_schema.sql (.../install_schema.sql) (revision 16328) +++ branches/5.3.x/core/install/install_schema.sql (.../install_schema.sql) (revision 16503) @@ -1319,6 +1319,7 @@ SessionKey int(10) unsigned NOT NULL DEFAULT '0', `Timestamp` int(10) unsigned NOT NULL DEFAULT '0', MainPrefix varchar(255) NOT NULL DEFAULT '', + MainIDs text, PRIMARY KEY (SemaphoreId), KEY SessionKey (SessionKey), KEY `Timestamp` (`Timestamp`), Index: branches/5.3.x/core/kernel/utility/logger.php =================================================================== diff -u -N -r16395 -r16503 --- branches/5.3.x/core/kernel/utility/logger.php (.../logger.php) (revision 16395) +++ branches/5.3.x/core/kernel/utility/logger.php (.../logger.php) (revision 16503) @@ -1,6 +1,6 @@ 'logger.php', + 'kErrorHandlerStack' => 'logger.php', + 'kExceptionHandlerStack' => 'logger.php', + 'kDBConnection' => 'db_connection.php', + 'kDBConnectionDebug' => 'db_connection.php', + 'kDBLoadBalancer' => 'db_load_balancer.php', + ); /** * Create event log @@ -581,11 +587,14 @@ } if ( isset($files) && is_array($files) ) { - while (true) { + $classes = array_keys($files); + + while ( true ) { $trace_info = $trace[0]; $file = isset($trace_info['file']) ? basename($trace_info['file']) : ''; + $class = isset($trace_info['class']) ? $trace_info['class'] : ''; - if ( !in_array($file, $files) ) { + if ( ($file && !in_array($file, $files)) || ($class && !in_array($class, $classes)) ) { break; } Index: branches/5.3.x/core/units/helpers/deployment_helper.php =================================================================== diff -u -N -r16111 -r16503 --- branches/5.3.x/core/units/helpers/deployment_helper.php (.../deployment_helper.php) (revision 16111) +++ branches/5.3.x/core/units/helpers/deployment_helper.php (.../deployment_helper.php) (revision 16503) @@ -1,6 +1,6 @@ $match ) { $revision = $match[1][0]; - if ( $this->revisionApplied($revision) ) { - // skip applied revisions - continue; - } - - if ( isset($this->revisionSqls[$revision]) ) { - // duplicate revision among non-applied ones + if ( in_array($revision, $revision_numbers) ) { $this->displayStatus('FAILED' . PHP_EOL . 'Duplicate revision #' . $revision . ' found'); return false; } - // get revision sqls + $revision_numbers[] = $revision; + + if ( $this->revisionApplied($revision) ) { + // Skip applied revisions. + continue; + } + + // Get revision sqls. $start_pos = $match[0][1] + strlen($match[0][0]); $end_pos = isset($matches[$index + 1]) ? $matches[$index + 1][0][1] : strlen($sqls); $revision_sqls = substr($sqls, $start_pos, $end_pos - $start_pos); Index: branches/5.3.x/core/admin_templates/js/jquery/thickbox/thickbox.css =================================================================== diff -u -N -r16395 -r16503 --- branches/5.3.x/core/admin_templates/js/jquery/thickbox/thickbox.css (.../thickbox.css) (revision 16395) +++ branches/5.3.x/core/admin_templates/js/jquery/thickbox/thickbox.css (.../thickbox.css) (revision 16503) @@ -172,7 +172,7 @@ clear:both; border:none; margin-bottom:-1px; - /*margin-top:1px;*/ + margin-top:0; _margin-bottom:1px; } Index: branches/5.3.x/core/admin_templates/config/config_universal.tpl =================================================================== diff -u -N -r16111 -r16503 --- branches/5.3.x/core/admin_templates/config/config_universal.tpl (.../config_universal.tpl) (revision 16111) +++ branches/5.3.x/core/admin_templates/config/config_universal.tpl (.../config_universal.tpl) (revision 16503) @@ -1,6 +1,6 @@ - + Index: branches/5.3.x/core/kernel/utility/formatters/password_formatter.php =================================================================== diff -u -N -r16111 -r16503 --- branches/5.3.x/core/kernel/utility/formatters/password_formatter.php (.../password_formatter.php) (revision 16111) +++ branches/5.3.x/core/kernel/utility/formatters/password_formatter.php (.../password_formatter.php) (revision 16503) @@ -1,6 +1,6 @@ _phpPass->hashPassword($this->_md5hash($password, $salt, true)); + $password_hashed = preg_match('/^[a-f0-9]{32}$/', $password); + return $this->_phpPass->hashPassword($this->_md5hash($password, $salt, $password_hashed)); break; case PasswordHashingMethod::PHPPASS: Index: branches/5.3.x/core/units/categories/categories_event_handler.php =================================================================== diff -u -N -r16395 -r16503 --- branches/5.3.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 16395) +++ branches/5.3.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 16503) @@ -1,6 +1,6 @@ Conn->Query($sql); } - $event->status = kEvent::erSUCCESS; - $email_event = $event->Name == 'OnMassApprove' ? 'CATEGORY.APPROVE' : 'CATEGORY.DENY'; $this->Application->emailUser($email_event, $object->GetDBField('CreatedById'), $object->getEmailParams()); } - else { - $event->status = kEvent::erFAIL; - $event->redirect = false; - break; - } } } @@ -1835,9 +1828,6 @@ $object = $event->getObject(); /* @var $object CategoriesItem */ - $object->checkFilename(); - $object->generateFilename(); - $now = time(); if ( !$this->Application->isDebugMode() && strpos($event->Special, 'rebuild') === false ) { @@ -1852,6 +1842,9 @@ } } + $object->checkFilename(); + $object->generateFilename(); + // Don't allow creating records on behalf of another user. if ( !$this->Application->isAdminUser && !defined('CRON') ) { $object->SetDBField('CreatedById', $object->GetOriginalField('CreatedById')); Index: branches/5.3.x/core/units/visits/visits_tag_processor.php =================================================================== diff -u -N -r16395 -r16503 --- branches/5.3.x/core/units/visits/visits_tag_processor.php (.../visits_tag_processor.php) (revision 16395) +++ branches/5.3.x/core/units/visits/visits_tag_processor.php (.../visits_tag_processor.php) (revision 16503) @@ -1,6 +1,6 @@ SelectParam($params, 'list_name,name'); + $list_name = array_key_exists('list_name', $params) ? $params['list_name'] : ''; + if ( !$list_name ) { $list_name = $this->Application->Parser->GetParam('list_name'); } Index: branches/5.3.x/core/admin_templates/head.tpl =================================================================== diff -u -N -r16111 -r16503 --- branches/5.3.x/core/admin_templates/head.tpl (.../head.tpl) (revision 16111) +++ branches/5.3.x/core/admin_templates/head.tpl (.../head.tpl) (revision 16503) @@ -110,13 +110,16 @@ } function change_password() { - getFrame('main').set_hidden_field('u_id', ); + var $user_id = Number(''); - - open_popup('u', '', 'users/root_edit_password'); - - open_popup('u', '', 'users/user_edit_password'); - + if ( $modal_windows ) { + getFrame('main').set_hidden_field('u_id', $user_id); + } + else { + set_hidden_field('u_id', $user_id); + } + + open_popup('u', '', 'users/root_edit_passwordusers/user_edit_password'); } $FrameResizer = new FrameResizer('', '', window.parent, '', ); Index: branches/5.3.x/core/install/upgrades.css =================================================================== diff -u -N -r15914 -r16503 --- branches/5.3.x/core/install/upgrades.css (.../upgrades.css) (revision 15914) +++ branches/5.3.x/core/install/upgrades.css (.../upgrades.css) (revision 16503) @@ -818,15 +818,32 @@ /* Right side of bluebar */ +# ===== v 5.2.2-B1 ===== +Index: style_template.css +=================================================================== +--- style_template.css (revision 16300) ++++ style_template.css (working copy) +@@ -549,6 +549,10 @@ + border-collapse: separate + } + ++label.checkbox { ++ white-space: nowrap; ++} ++ + /* Uploader */ + .uploader-queue div.file { + font-size: 11px; + # ===== v 5.3.0-B1 ===== Index: style_template.css =================================================================== ---- style_template.css (revision 15483) +--- style_template.css (revision 16502) +++ style_template.css (working copy) @@ -487,6 +487,14 @@ vertical-align: middle; } - + +.CodeMirror { + font-size: 13px; + border: 1px solid black; @@ -838,12 +855,10 @@ .label-cell-filler { background: #DEE7F6 none; } -@@ -496,6 +504,18 @@ - } - .control-cell-filler { +@@ -498,6 +506,18 @@ background: #fff none; -+} -+ + } + +.highlight-area, .code-highlight-area { + border: 1px solid black; + padding: 8px; @@ -854,7 +869,8 @@ + +.code-highlight-area { + background-color: #F6F6F6; - } - ++} ++ .error { -\ No newline at end of file + color: red; + } Index: branches/5.3.x/core/admin_templates/incs/style_template.css =================================================================== diff -u -N -r15914 -r16503 --- branches/5.3.x/core/admin_templates/incs/style_template.css (.../style_template.css) (revision 15914) +++ branches/5.3.x/core/admin_templates/incs/style_template.css (.../style_template.css) (revision 16503) @@ -569,6 +569,10 @@ border-collapse: separate } +label.checkbox { + white-space: nowrap; +} + /* Uploader */ .uploader-queue div.file { font-size: 11px; @@ -816,4 +820,4 @@ border-width: 0px !important; -moz-border-radius: 0px !important; -webkit-border-radius: 0px !important; -} \ No newline at end of file +} Index: branches/5.3.x/core/ckeditor/ckfinder/config.php =================================================================== diff -u -N -r16395 -r16503 --- branches/5.3.x/core/ckeditor/ckfinder/config.php (.../config.php) (revision 16395) +++ branches/5.3.x/core/ckeditor/ckfinder/config.php (.../config.php) (revision 16503) @@ -221,7 +221,7 @@ 'url' => $baseUrl . 'Files', 'directory' => $baseDir . 'Files', 'maxSize' => 0, - 'allowedExtensions' => 'jpg,gif,jpeg,png,swf,fla,jpg,gif,jpeg,png,avi,mpg,mpeg,zip,rar,arj,gz,tar,doc,pdf,ppt,rdp,swf,swt,txt,vsd,xls,csv,odt', + 'allowedExtensions' => 'jpg,gif,jpeg,png,swf,fla,jpg,gif,jpeg,png,avi,mpg,mpeg,zip,rar,arj,gz,tar,doc,docx,dotx,docm,dotm,pdf,ppt,pptx,potx,ppsx,ppam,pptm,potm,ppsm,rdp,swf,swt,txt,vsd,xls,xlsx,xltx,xlsm,xltm,xlam,xlsb,csv,odt', 'deniedExtensions' => 'php,asp,aspx,ascx,jsp,cfm,cfc,pl,bat,exe,dll,reg'); $config['ResourceType'][] = Array( @@ -253,7 +253,7 @@ 'url' => $baseUrl . 'Documents', 'directory' => $baseDir . 'Documents', 'maxSize' => 0, - 'allowedExtensions' => 'doc,pdf,ppt,rdp,swf,swt,txt,vsd,xls,csv,zip,odt', + 'allowedExtensions' => 'doc,docx,dotx,docm,dotm,pdf,ppt,pptx,potx,ppsx,ppam,pptm,potm,ppsm,rdp,swf,swt,txt,vsd,xls,xlsx,xltx,xlsm,xltm,xlam,xlsb,csv,zip,odt', 'deniedExtensions' => 'php,asp,aspx,ascx,jsp,cfm,cfc,pl,bat,exe,dll,reg'); /* Index: branches/5.3.x/core/kernel/db/db_tag_processor.php =================================================================== diff -u -N -r16395 -r16503 --- branches/5.3.x/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 16395) +++ branches/5.3.x/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 16503) @@ -1,6 +1,6 @@ SelectParam($params, 'list_name,name'); + $list_name = array_key_exists('list_name', $params) ? $params['list_name'] : ''; + if ( !$list_name ) { $list_name = $this->Application->Parser->GetParam('list_name'); } @@ -2105,6 +2106,9 @@ case 'total': return $object->GetRecordsCount(false); + case 'selected': + return $object->GetSelectedCount(); + case 'from': return $object->GetRecordsCount() ? $object->GetOffset() + 1 : 0; //0-based @@ -2295,6 +2299,20 @@ } /** + * Returns selected records count. + * + * @param array $params Tag params. + * + * @return string + */ + protected function SelectedRecords(array $params) + { + $list =& $this->GetList($params); + + return $list->GetSelectedCount(); + } + + /** * Range filter field name * * @param Array $params @@ -2656,7 +2674,7 @@ } $icon_url = $this->Application->BaseURL() . 'core/admin_templates/img/top_frame/icons/' . $button_icon; - $button_onclick = '$form_name = ' . json_encode($form_name) . '; std_edit_item(' . json_encode($item_prefix) . ', ' . json_encode($template) . ');'; + $button_onclick = '$form_name = ' . json_encode($form_name) . '; std_edit_item(' . json_encode($item_prefix) . ', ' . json_encode($template) . '); return false;'; $button_code = '