Index: trunk/kernel/include/parseditem.php =================================================================== diff -u -N -r342 -r348 --- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 342) +++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 348) @@ -1166,16 +1166,18 @@ $edit_table = $objSession->GetEditTable($this->SourceTable); $sql = "SELECT * FROM $edit_table"; $rs = $this->adodbConnection->Execute($sql); - echo $sql."
"; + //echo "In Main CopyFromEditTable in class ".get_class($this).'
'; + //echo $sql."
"; + while($rs && !$rs->EOF) { $data = $rs->fields; $c = new $this->classname; $c->SetFromArray($data); $c->idfield = $idfield; $c->Dirty(); - if($c->Get($idfield)<1) + if($c->Get($idfield) < 1) { $old_id = $c->Get($idfield); $c->UnsetIdField(); Index: trunk/globals.php =================================================================== diff -u -N -r329 -r348 --- trunk/globals.php (.../globals.php) (revision 329) +++ trunk/globals.php (.../globals.php) (revision 348) @@ -1402,6 +1402,10 @@ return isset($update[$name]) ? $update[$name] : ( isset($main[$name]) ? $main[$name] : ''); } +function IsDebugMode() +{ + return defined('DEBUG_MODE') && constant('DEBUG_MODE') == 1 ? 1 : 0; +} ?> Index: trunk/kernel/include/itemreview.php =================================================================== diff -u -N -r330 -r348 --- trunk/kernel/include/itemreview.php (.../itemreview.php) (revision 330) +++ trunk/kernel/include/itemreview.php (.../itemreview.php) (revision 348) @@ -508,15 +508,17 @@ function CopyFromEditTable($ResourceId) { global $objSession; - + //echo "ToLive [Reviews]
"; $edit_table = $objSession->GetEditTable($this->SourceTable); $idlist = array(); $sql = "SELECT * FROM $edit_table"; $this->Clear(); + // get all items in edit-table $rs = $this->adodbConnection->Execute($sql); while($rs && !$rs->EOF) { - $data = $rs->fields; + $data =& $rs->fields; + $c = $this->AddItemFromArray($data); $c->Dirty(); @@ -532,6 +534,7 @@ $idlist[] = $c->Get("ReviewId"); $rs->MoveNext(); } + //print_pre($idlist); $sql = "DELETE FROM ".$this->SourceTable." WHERE ItemId=$ResourceId AND ReviewId NOT IN (".implode(",",$idlist).")"; $this->adodbConnection->Execute($sql); @$this->adodbConnection->Execute("DROP TABLE IF EXISTS ".$edit_table); Index: trunk/kernel/include/portalgroup.php =================================================================== diff -u -N -r278 -r348 --- trunk/kernel/include/portalgroup.php (.../portalgroup.php) (revision 278) +++ trunk/kernel/include/portalgroup.php (.../portalgroup.php) (revision 348) @@ -306,10 +306,9 @@ } else $limit = NULL; - - if(strlen($where)==0) - $where = "1"; - $this->QueryItemCount=TableCount($this->SourceTable,$where,0); + + if(strlen($where) == 0) $where = '1'; + $this->QueryItemCount=TableCount($this->SourceTable, $where, 0); //echo $this->QueryItemCount."
\n"; if ($orderBy!="") @@ -323,7 +322,7 @@ } - function Query_PortalGroup($whereClause=NULL,$orderByClause=NULL) + function Query_PortalGroup($whereClause=NULL,$orderByClause=NULL,$limit=null) { global $m_var_list,$objSession,$Errors; @@ -335,7 +334,8 @@ if(strlen($orderByClause)) if(strlen(trim($orderByClause))) $sql = sprintf('%s ORDER BY %s',$sql,$orderByClause); - + + if( isset($limit) ) $sql .= ' '.$limit; return $this->Query_Item($sql); } Index: trunk/admin/include/elements.php =================================================================== diff -u -N -r302 -r348 --- trunk/admin/include/elements.php (.../elements.php) (revision 302) +++ trunk/admin/include/elements.php (.../elements.php) (revision 348) @@ -302,14 +302,14 @@ //*********************************** //SubSection Title -function int_subsection_title($caption) +function int_subsection_title($caption, $ColSpan = 5) { int_table_color(1); print << - $caption + $caption END; } Index: trunk/kernel/admin/include/toolbar/groupselect.php =================================================================== diff -u -N -r13 -r348 --- trunk/kernel/admin/include/toolbar/groupselect.php (.../groupselect.php) (revision 13) +++ trunk/kernel/admin/include/toolbar/groupselect.php (.../groupselect.php) (revision 348) @@ -43,17 +43,11 @@ $varname = "m_user_perpage_" . $m_user_perpage; $$varname = 1; -$destform = $_POST["destform"]; +$destform = GetVar('destform', true); +$destfield = GetVar('destfield'); -if ($destform == '') { - $destform = $_GET["destform"]; -} - -$destfield = $_GET["destfield"]; - $User_Page = (int)$objConfig->Get("Perpage_Grouplist"); -if(!$User_Page) - $User_Page = 10; +if(!$User_Page) $User_Page = 10; /* Set the sort values */ $SortField = trim($objConfig->Get("GroupSelect_SortField")); Index: trunk/kernel/admin/include/toolbar/main_import.php =================================================================== diff -u -N -r338 -r348 --- trunk/kernel/admin/include/toolbar/main_import.php (.../main_import.php) (revision 338) +++ trunk/kernel/admin/include/toolbar/main_import.php (.../main_import.php) (revision 348) @@ -13,6 +13,17 @@ if(!$ro_perm) { ?> + var StepInfo = Array(); + + function InitStep(step_id, step_name, total_recs) + { + StepInfo[step_id] = Array(); + StepInfo[step_id]['total'] = total_recs; + StepInfo[step_id]['current'] = 0; + StepInfo[step_id]['name'] = step_name; + SetTotal(step_name); + } + function PageOnLoad(step_no) { if( step_no == 1 ) @@ -74,18 +85,26 @@ } } - function SetPercent(step_id, new_percent, additional, time_str) + function SetPercent(step_id, new_percent, current_rec, time_str) { var step_element = document.getElementById(step_id); step_element.innerHTML = new_percent; var add_element = document.getElementById(step_id+'_additional'); - add_element.innerHTML = additional; + StepInfo[step_id]['current'] = current_rec; + add_element.innerHTML = '('+StepInfo[step_id]['current']+' of '+StepInfo[step_id]['total']+')'; + var time_element = document.getElementById('total_time'); - time_element.innerHTML = time_str; + time_element.innerHTML = time_str+'s'; } + function SetTotal(text) + { + var txt = document.getElementById('import_totals'); + if(txt) txt.innerHTML = text; + } + Index: trunk/kernel/action.php =================================================================== diff -u -N -r313 -r348 --- trunk/kernel/action.php (.../action.php) (revision 313) +++ trunk/kernel/action.php (.../action.php) (revision 348) @@ -55,7 +55,7 @@ if( isset($_POST['grouplist1']) ) { $group_id = $_POST['grouplist1']; - $group = $objGroups->GetItem($group_id); + $group = $objGroups->GetItemByField('ResourceId',$group_id); $objSession->SetVariable('user_admin_names', $group->Get('Name')); $objSession->SetVariable('user_admin_values', $group->Get('GroupId')); $objSession->SetVariable('grouplist1', $_POST['grouplist1']); @@ -65,7 +65,7 @@ if( isset($_POST['grouplist2']) ) { $group_id = $_POST['grouplist2']; - $group = $objGroups->GetItem($group_id); + $group = $objGroups->GetItemByField('ResourceId', $group_id); $objSession->SetVariable('user_regular_names', $group->Get('Name')); $objSession->SetVariable('user_regular_values', $group->Get('GroupId')); $objSession->SetVariable('grouplist2', $_POST['grouplist2']); Index: trunk/admin/import/step4.php =================================================================== diff -u -N -r338 -r348 --- trunk/admin/import/step4.php (.../step4.php) (revision 338) +++ trunk/admin/import/step4.php (.../step4.php) (revision 348) @@ -114,7 +114,7 @@ } $import_script = GetImportScript( $objSession->GetVariable('ImportScriptID') ); - + $var = "?env=".BuildEnv(); // Previous Button