Index: branches/unlabeled/unlabeled-1.21.4/core/kernel/db/dblist.php =================================================================== diff -u -r7072 -r7368 --- branches/unlabeled/unlabeled-1.21.4/core/kernel/db/dblist.php (.../dblist.php) (revision 7072) +++ branches/unlabeled/unlabeled-1.21.4/core/kernel/db/dblist.php (.../dblist.php) (revision 7368) @@ -639,7 +639,7 @@ function GetDBField($name) { $row =& $this->getCurrentRecord(); - + return $row[$name]; } @@ -653,7 +653,7 @@ { return $this->Queried ? $this->GetDBField($this->IDField) : null; } - + /** * Allows kDBTagProcessor.SectionTitle to detect if it's editing or new item creation * @@ -664,7 +664,7 @@ // no such thing as NewItem for lists :) return false; } - + function HasField($name) { $row =& $this->getCurrentRecord(); @@ -819,6 +819,8 @@ $parent_object =& $this->Application->recallObject($parent_prefix.'.'.$special); $parent_id = $parent_object->GetDBField($parent_table_key); + if (!$parent_id) return ; + $this->addFilter('parent_filter', '`'.$this->TableName.'`.`'.$foreign_key_field.'` = '.$parent_id); // only for list in this case } }