Commit eb8b3915 authored by meus's avatar meus

fixed getRecord/Collection as xml. removed old obtainIdentifiers function and fixed count call

parent db10d4a0
......@@ -88,7 +88,7 @@ class Doctrine_Lib
public static function getCollectionAsXml(Doctrine_Collection $collection, SimpleXMLElement $incomming_xml = null) {
$collectionName = Doctrine_Lib::plurelize($collection->getTable()->tableName);
if ( $collection->count != 0) {
if ( $collection->count() != 0) {
$record = $collection[0];
$xml_options = $record->option("xml");
if ( isset($xml_options["collection_name"])) {
......@@ -136,9 +136,6 @@ class Doctrine_Lib
} else {
$xml = $incomming_xml->addChild($recordname);
}
foreach($record->obtainIdentifier() as $pk_field => $pk_value) {
$xml->addChild($pk_field,$pk_value);
}
$xml_options = $record->option("xml");
if ( isset($xml_options["record_name"])) {
$recordname = $xml_options["record_name"];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment