ezcontentfunctions.diff (1.8 kb) added by Jérôme Vieilledent
Index: ezcontentfunctions.php
===================================================================
--- ezcontentfunctions.php (revision 57)
+++ ezcontentfunctions.php (revision 58)
@@ -36,6 +36,7 @@
$parentNodeID = $params['parent_node_id'];
$classIdentifier = $params['class_identifier'];
$creatorID = isset( $params['creator_id'] ) ? $params['creator_id'] : false;
+ $remoteID = isset($params['remote_id']) ? $params['remote_id'] : false;
$attributesData = isset( $params['attributes'] ) ? $params['attributes'] : false;
$storageDir = isset( $params['storage_dir'] ) ? $params['storage_dir'] : '';
@@ -52,6 +53,7 @@
$db->begin();
$contentObject = $contentClass->instantiate( $creatorID );
+ $contentObject->setAttribute('remote_id', $remoteID);
$contentObject->store();
$nodeAssignment = eZNodeAssignment::create( array( 'contentobject_id' => $contentObject->attribute( 'id' ),
@@ -57,6 +59,7 @@
$nodeAssignment = eZNodeAssignment::create( array( 'contentobject_id' => $contentObject->attribute( 'id' ),
'contentobject_version' => $contentObject->attribute( 'current_version' ),
'parent_node' => $parentNodeID,
+ 'remote_id' => $remoteID,
'is_main' => 1,
'sort_field' => $contentClass->attribute( 'sort_field' ),
'sort_order' => $contentClass->attribute( 'sort_order' ) ) );