Index: branches/RC/core/kernel/db/db_event_handler.php =================================================================== diff -u -N -r11751 -r11758 --- branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 11751) +++ branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 11758) @@ -1499,8 +1499,10 @@ function OnPreSaveAndGo(&$event) { $event->CallSubEvent('OnPreSave'); + if ($event->status == erSUCCESS) { - $event->SetRedirectParam($event->getPrefixSpecial(true).'_id', $this->Application->GetVar($event->Prefix_Special.'_GoId')); + $id = $this->Application->GetVar($event->getPrefixSpecial(true) . '_GoId'); + $event->SetRedirectParam($event->getPrefixSpecial() . '_id', $id); } } Index: branches/RC/core/kernel/db/db_tag_processor.php =================================================================== diff -u -N -r11742 -r11758 --- branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 11742) +++ branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 11758) @@ -487,12 +487,14 @@ $column_number = 1; $cache_mod_rw = $this->Application->getUnitOption($this->Prefix, 'CacheModRewrite') && $this->Application->RewriteURLs(); + $limit = isset($params['limit']) ? $params['limit'] : false; - while (!$list->EOL()) + while (!$list->EOL() && (!$limit || $i<$limit)) { $this->Application->SetVar( $this->getPrefixSpecial().'_id', $list->GetDBField($id_field) ); // for edit/delete links using GET $this->Application->SetVar( $this->Prefix.'_id', $list->GetDBField($id_field) ); $block_params['is_last'] = ($i == $list->SelectedCount - 1); + $block_params['last_row'] = ($i + (($i+1) % $columns) >= $list->SelectedCount - 1); $block_params['not_last'] = !$block_params['is_last']; // for front-end if ($cache_mod_rw) { @@ -522,6 +524,7 @@ $block_params['last_col'] = $column_number == $columns ? 1 : 0; $block_params['column_number'] = $column_number; + $block_params['num'] = ($i+1); $this->PrepareListElementParams($list, $block_params); // new, no need to rewrite PrintList $o.= $this->Application->ParseBlock($block_params, 1); @@ -1137,6 +1140,12 @@ } } } + else { + if ( $no_next_page_block = $this->SelectParam($params, 'no_next_page_render_as,block_no_next_page') ) { + $block_params['name'] = $no_next_page_block; + $o .= $this->Application->ParseBlock($block_params, 1); + } + } $this->Application->SetVar($this->getPrefixSpecial().'_Page', $current_page); return $o; @@ -1679,7 +1688,7 @@ case 'total_pages': return $object->GetTotalPages(); case 'needs_pagination': - return ($object->RecordsCount > $object->PerPage) || ($object->Page > 1); + return ($object->PerPage != -1) && (($object->RecordsCount > $object->PerPage) || ($object->Page > 1)); } }