Index: branches/unlabeled/unlabeled-1.71.2/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r7662 -r7701 --- branches/unlabeled/unlabeled-1.71.2/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7662) +++ branches/unlabeled/unlabeled-1.71.2/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7701) @@ -708,6 +708,7 @@ $params['field'] = 'any'; } if ($this->HasError($params)) { + $params['prefix'] = $this->getPrefixSpecial(); return $this->Application->ParseBlock($params); } } @@ -1318,8 +1319,11 @@ // b. setting object's titlefield value (in titlebar ONLY) to default in case if object beeing created with no titlefield filled in if( $object_status[ $prefix_data['prefix_special'] ] == 'new' ) { + $title = str_replace('\'#'.$prefix_data['prefix_special'].'_titlefield#\'', '#'.$prefix_data['prefix_special'].'_titlefield#', $title); $new_value = $this->getInfo( $objects[ $prefix_data['prefix_special'] ], 'titlefield' ); - if(!$new_value && getArrayValue($title_info['new_titlefield'],$prefix_data['prefix_special']) ) $new_value = $this->Application->Phrase($title_info['new_titlefield'][ $prefix_data['prefix_special'] ]); + if(!$new_value && getArrayValue($title_info['new_titlefield'],$prefix_data['prefix_special']) ) { + $new_value = $this->Application->Phrase($title_info['new_titlefield'][ $prefix_data['prefix_special'] ]); + } // old format had single quotes in the format $title = str_replace('\'#'.$prefix_data['prefix_special'].'_titlefield#\'', "'$new_value'", $title); // new format has no quotes and $new_value should be empty when creating items @@ -1385,15 +1389,15 @@ switch ($params['type']) { case 'filtered': - return $object->RecordsCount; + return $object->GetRecordsCount(); case 'total': - return $object->NoFilterCount; + return $object->GetNoFilterCount(); case 'from': return $object->RecordsCount ? $object->Offset+1 : 0; //0-based case 'to': return min($object->Offset + $object->PerPage, $object->RecordsCount); case 'total_pages': - return ceil($object->RecordsCount / $object->PerPage); + return $object->GetTotalPages(); case 'needs_pagination': return $object->RecordsCount > $object->PerPage; }