Index: branches/unlabeled/unlabeled-1.1.2/admin/install/upgrades/changelog_1_1_7.txt =================================================================== diff -u -r4086 -r4152 --- branches/unlabeled/unlabeled-1.1.2/admin/install/upgrades/changelog_1_1_7.txt (.../changelog_1_1_7.txt) (revision 4086) +++ branches/unlabeled/unlabeled-1.1.2/admin/install/upgrades/changelog_1_1_7.txt (.../changelog_1_1_7.txt) (revision 4152) @@ -16,16 +16,16 @@ File in-portal/admin/install/inportal_schema.sql changed File in-portal/admin/install/inst_ado.php changed File in-portal/admin/install/langpacks/english.lang changed -File in-portal/admin/install/upgrades/changelog_1_1_7.txt is new; release_1_1_7 revision 1.1.2.4 +File in-portal/admin/install/upgrades/changelog_1_1_7.txt is new; release_1_1_7 revision 1.1.2.5 File in-portal/admin/install/upgrades/inportal_upgrade_v1.1.7.sql is new; release_1_1_7 revision 1.4.2.3 -File in-portal/admin/install/upgrades/readme_1_1_7.txt is new; release_1_1_7 revision 1.3.2.2 +File in-portal/admin/install/upgrades/readme_1_1_7.txt is new; release_1_1_7 revision 1.3.2.3 File in-portal/admin/logs/session_list.php changed File in-portal/admin/users/adduser.php changed File in-portal/kernel/action.php changed File in-portal/kernel/frontaction.php changed File in-portal/kernel/parser.php changed File in-portal/kernel/startup.php changed -File in-portal/kernel/admin_templates/incs/export.js is new; release_1_1_7 revision 1.1.2.1 +File in-portal/kernel/admin_templates/incs/export.js is new; release_1_1_7 revision 1.1.2.2 File in-portal/kernel/admin_templates/incs/form_blocks.tpl changed File in-portal/kernel/admin_templates/incs/grid_blocks.tpl changed File in-portal/kernel/admin_templates/incs/script.js changed Index: branches/unlabeled/unlabeled-1.14.2/kernel/units/general/cat_dbitem_export.php =================================================================== diff -u -r4066 -r4152 --- branches/unlabeled/unlabeled-1.14.2/kernel/units/general/cat_dbitem_export.php (.../cat_dbitem_export.php) (revision 4066) +++ branches/unlabeled/unlabeled-1.14.2/kernel/units/general/cat_dbitem_export.php (.../cat_dbitem_export.php) (revision 4152) @@ -1,7 +1,7 @@ cacheTable = TABLE_PREFIX.'ImportCache'; } - + /** * Returns value from cache if found or false otherwise * @@ -103,7 +103,7 @@ function storeCache($cache_types) { $cache_types = explode(',', $cache_types); - + $values_sql = ''; foreach ($cache_types as $cache_type) { $sql_mask = '('.$this->Conn->qstr($cache_type).',%s,%s),'; @@ -119,20 +119,20 @@ $sql = 'INSERT INTO '.$this->cacheTable.'(`CacheName`,`VarName`,`VarValue`) VALUES '.$values_sql; $this->Conn->Query($sql); } - + } - + function loadCache() { $sql = 'SELECT * FROM '.$this->cacheTable; $records = $this->Conn->Query($sql); - + $this->cache = Array(); foreach ($records as $record) { $this->addToCache($record['CacheName'], $record['VarName'], $record['VarValue'], false); } } - + /** * Fill required fields with dummy values * @@ -546,7 +546,7 @@ else { $this->loadCache(); } - + $this->exportFields = $this->exportOptions['ExportColumns']; $this->addToCache('category_parent_path', $this->Application->GetVar('m_cat_id'), $this->exportOptions['ImportCategoryPath']); @@ -573,13 +573,13 @@ $this->exportOptions['start_from'] += $bytes_imported; $this->storeCache('new_ids'); - + $this->saveOptions($event); - + if ($this->exportOptions['start_from'] == $this->exportOptions['total_records']) { $this->Conn->Query('TRUNCATE TABLE '.$this->cacheTable); } - + return $this->exportOptions; } @@ -653,14 +653,14 @@ $this->setCurrentID(); } - + function getItemCategory() { $backup_category_id = $this->Application->GetVar('m_cat_id'); foreach ($this->curItem->CategoryPath as $category_index => $category_name) { if (!$category_name) continue; $category_key = crc32( implode(':', array_slice($this->curItem->CategoryPath, 0, $category_index + 1) ) ); - + $category_id = $this->getFromCache('category_names', $category_key); if ($category_id === false) { // get parent category path to search only in it @@ -697,10 +697,10 @@ if (!$this->curItem->CategoryPath) { $category_id = $backup_category_id; } - + return $category_id; } - + /** * Enter description here... * @@ -710,10 +710,10 @@ { $save_method = 'Create'; $load_keys = Array(); - + // create/update categories $backup_category_id = $this->Application->GetVar('m_cat_id'); - + // perform replace duplicates code if ($this->exportOptions['ReplaceDuplicates']) { // get replace keys first, then reset current item to empty one @@ -763,7 +763,7 @@ $this->resetImportObject($event, IMPORT_LIVE, $record_data); $category_id = $this->getItemCategory(); } - + // create main record if ($save_method == 'Create') { $this->fillRequiredFields($this->false, $this->curItem, true); @@ -775,7 +775,7 @@ } // $sql_end = getmicrotime(); // $this->saveLog('SQL ['.$save_method.'] Time: '.($sql_end - $sql_start).'s'); - + if ($load_keys && ($save_method == 'Create') && $this->exportOptions['ReplaceDuplicates']) { // map new id to old id $this->addToCache('new_ids', crc32($where_clause), $this->curItem->GetID() ); @@ -793,14 +793,14 @@ $this->Application->SetVar('m_cat_id', $backup_category_id); return true; } - + /*function saveLog($msg) { $fp = fopen(FULL_PATH.'/sqls.log', 'a'); fwrite($fp, $msg."\n"); fclose($fp); }*/ - + /** * Returns category parent path, if possible, then from cache * @@ -1044,15 +1044,15 @@ { return fgetcsv($this->filePointer, 10000, $this->exportOptions['FieldsSeparatedBy'], $this->exportOptions['FieldsEnclosedBy']); } - + function saveOptions(&$event, $options = null) { if (!isset($options)) { $options = $this->exportOptions; } $this->Application->StoreVar($event->getPrefixSpecial().'_options', serialize($options) ); } - + function loadOptions(&$event) { return unserialize($this->Application->RecallVar($event->getPrefixSpecial().'_options')); Index: branches/unlabeled/unlabeled-1.14.2/core/units/general/cat_dbitem_export.php =================================================================== diff -u -r4066 -r4152 --- branches/unlabeled/unlabeled-1.14.2/core/units/general/cat_dbitem_export.php (.../cat_dbitem_export.php) (revision 4066) +++ branches/unlabeled/unlabeled-1.14.2/core/units/general/cat_dbitem_export.php (.../cat_dbitem_export.php) (revision 4152) @@ -1,7 +1,7 @@ cacheTable = TABLE_PREFIX.'ImportCache'; } - + /** * Returns value from cache if found or false otherwise * @@ -103,7 +103,7 @@ function storeCache($cache_types) { $cache_types = explode(',', $cache_types); - + $values_sql = ''; foreach ($cache_types as $cache_type) { $sql_mask = '('.$this->Conn->qstr($cache_type).',%s,%s),'; @@ -119,20 +119,20 @@ $sql = 'INSERT INTO '.$this->cacheTable.'(`CacheName`,`VarName`,`VarValue`) VALUES '.$values_sql; $this->Conn->Query($sql); } - + } - + function loadCache() { $sql = 'SELECT * FROM '.$this->cacheTable; $records = $this->Conn->Query($sql); - + $this->cache = Array(); foreach ($records as $record) { $this->addToCache($record['CacheName'], $record['VarName'], $record['VarValue'], false); } } - + /** * Fill required fields with dummy values * @@ -546,7 +546,7 @@ else { $this->loadCache(); } - + $this->exportFields = $this->exportOptions['ExportColumns']; $this->addToCache('category_parent_path', $this->Application->GetVar('m_cat_id'), $this->exportOptions['ImportCategoryPath']); @@ -573,13 +573,13 @@ $this->exportOptions['start_from'] += $bytes_imported; $this->storeCache('new_ids'); - + $this->saveOptions($event); - + if ($this->exportOptions['start_from'] == $this->exportOptions['total_records']) { $this->Conn->Query('TRUNCATE TABLE '.$this->cacheTable); } - + return $this->exportOptions; } @@ -653,14 +653,14 @@ $this->setCurrentID(); } - + function getItemCategory() { $backup_category_id = $this->Application->GetVar('m_cat_id'); foreach ($this->curItem->CategoryPath as $category_index => $category_name) { if (!$category_name) continue; $category_key = crc32( implode(':', array_slice($this->curItem->CategoryPath, 0, $category_index + 1) ) ); - + $category_id = $this->getFromCache('category_names', $category_key); if ($category_id === false) { // get parent category path to search only in it @@ -697,10 +697,10 @@ if (!$this->curItem->CategoryPath) { $category_id = $backup_category_id; } - + return $category_id; } - + /** * Enter description here... * @@ -710,10 +710,10 @@ { $save_method = 'Create'; $load_keys = Array(); - + // create/update categories $backup_category_id = $this->Application->GetVar('m_cat_id'); - + // perform replace duplicates code if ($this->exportOptions['ReplaceDuplicates']) { // get replace keys first, then reset current item to empty one @@ -763,7 +763,7 @@ $this->resetImportObject($event, IMPORT_LIVE, $record_data); $category_id = $this->getItemCategory(); } - + // create main record if ($save_method == 'Create') { $this->fillRequiredFields($this->false, $this->curItem, true); @@ -775,7 +775,7 @@ } // $sql_end = getmicrotime(); // $this->saveLog('SQL ['.$save_method.'] Time: '.($sql_end - $sql_start).'s'); - + if ($load_keys && ($save_method == 'Create') && $this->exportOptions['ReplaceDuplicates']) { // map new id to old id $this->addToCache('new_ids', crc32($where_clause), $this->curItem->GetID() ); @@ -793,14 +793,14 @@ $this->Application->SetVar('m_cat_id', $backup_category_id); return true; } - + /*function saveLog($msg) { $fp = fopen(FULL_PATH.'/sqls.log', 'a'); fwrite($fp, $msg."\n"); fclose($fp); }*/ - + /** * Returns category parent path, if possible, then from cache * @@ -1044,15 +1044,15 @@ { return fgetcsv($this->filePointer, 10000, $this->exportOptions['FieldsSeparatedBy'], $this->exportOptions['FieldsEnclosedBy']); } - + function saveOptions(&$event, $options = null) { if (!isset($options)) { $options = $this->exportOptions; } $this->Application->StoreVar($event->getPrefixSpecial().'_options', serialize($options) ); } - + function loadOptions(&$event) { return unserialize($this->Application->RecallVar($event->getPrefixSpecial().'_options')); Index: branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/incs/export.js =================================================================== diff -u -r4039 -r4152 --- branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/incs/export.js (.../export.js) (revision 4039) +++ branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/incs/export.js (.../export.js) (revision 4152) @@ -21,47 +21,65 @@ return $to_seconds - $from_seconds; } +var $aborting = false; function queryProgress($url, $responce_func) { +// alert('queryProgress'); if ($http_request && $http_request.readyState != 0) { +// alert('aborting'); + $aborting = true; $http_request.abort(); +// alert('After Abort: readyState: '+$http_request.readyState+' status: '+$http_request.status); + $aborting = false; } - - $http_request.onreadystatechange = function() { eval($responce_func + '(\'' + $url + '\',\'' + $responce_func + '\');'); }; + +// alert('opening'); $http_request.open('POST', $url, true); $http_request.setRequestHeader("referer", $url); + $http_request.onreadystatechange = function() { processExportResponce($url, $responce_func); }; +// alert('sending new req'); $http_request.send('is_xml=1'); $last_responce = new Date(); } function setProgress($percent) { $percent = parseInt($percent); - document.getElementById('percent_done').style.width = $percent + '%'; - document.getElementById('percent_left').style.width = (100 - $percent) + '%'; - document.getElementById('progress_display').innerHTML = $percent; + document.getElementById('percent_done').style.width = $percent + '%'; + document.getElementById('percent_left').style.width = (100 - $percent) + '%'; + document.getElementById('progress_display').innerHTML = $percent; document.getElementById('progress_time').innerHTML = '[' + $phrase_LastResponce + ': ' + formatDate($last_responce) + ']'; } function processExportResponce($url, $responce_func) { +// alert('processExportResponce ready: '+$http_request.readyState); + if ($aborting) return; if ($http_request.readyState == 4) { if ($http_request.status == 200) { +// alert('readyState: '+$http_request.readyState+' status: '+$http_request.status); var $progress = parseFloat($http_request.responseText); if ($progress) { setProgress($progress); if ($progress < 100) { // proceed to next import step - queryProgress($url, $responce_func); + //alert('ANOTHER abort'); + //$http_request.abort(); + //alert('After ANOTHER Abort: readyState: '+$http_request.readyState+' status: '+$http_request.status); + setTimeout( function() { +// alert('quering after timeout'); + queryProgress($url, $responce_func); + }, 500) } else { // proceed to finish screen window.location.href = $finish_template; } - } - else { - alert($phrase_ResponceError); - } + } + else { +// alert('progress: '+$progress+' ('+$http_request.responseText+')'); + alert($phrase_ResponceError); + } } - } + } } \ No newline at end of file Index: branches/unlabeled/unlabeled-1.3.2/admin/install/upgrades/readme_1_1_7.txt =================================================================== diff -u -r4041 -r4152 --- branches/unlabeled/unlabeled-1.3.2/admin/install/upgrades/readme_1_1_7.txt (.../readme_1_1_7.txt) (revision 4041) +++ branches/unlabeled/unlabeled-1.3.2/admin/install/upgrades/readme_1_1_7.txt (.../readme_1_1_7.txt) (revision 4152) @@ -1,7 +1,13 @@ -0011144 search log record is created/updated when simple search is made from onlinestore theme -0011217 error message was not shown on search form (on front, default theme) -0011210 custom field values were not stripslashed after submit -0011209 mod_rewrite now works a bit faster -0011211 category sorting in admin in case when we have non-editor pics new categories and already edited ones -0011367 system permissions with DENIED value are not saved to db (e.g. LOGIN) + upgrade script that fixes perms -0011358 import export for modules, that use it changed to use AJAX technology \ No newline at end of file +Readme notes for In-Portal 1.1.7 +Intechnic Corporation, April 4, 2006 + +New features: + - Import/Export progress bars are now using AJAX technology to allow smooth progress bar display and eliminate possible browser redirection limit error when importing or exporting large databases + +Bug fixes: + - Logging of advanced searche queries + - Error message was not displayed on the quick search form in default theme + - Special characaters, quotes and slashes handling for custom fields were handled incorrectly + - Incorrect category sorting in administrative console after creating new non editor pick category + - Incorrect group permissions treating when user is a member of two or more groups and the groups have different settings for the same permission + - Standard error messages were hardcoded in english