? rdf_fix.patch
? taxonomy_index.patch
? modules/rdf/.rdf.module.swp
? modules/rdf/.rdf.test.swp
? sites/all/modules/cck
? sites/all/modules/devel
? sites/default/files
? sites/default/settings.php
Index: modules/rdf/rdf.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/rdf/rdf.module,v
retrieving revision 1.48
diff -u -p -r1.48 rdf.module
--- modules/rdf/rdf.module	1 Dec 2010 00:18:15 -0000	1.48
+++ modules/rdf/rdf.module	9 Dec 2010 00:49:35 -0000
@@ -223,7 +223,7 @@ function _rdf_mapping_load($type, $bundl
  * @return
  *   Status flag indicating the outcome of the operation.
  */
-function rdf_mapping_save(&$mapping) {
+function rdf_mapping_save($mapping) {
   // In the case where a field has a mapping defined in the default entity
   // mapping, but a mapping is not specified in the bundle-specific mapping,
   // then use the default mapping for that field.
Index: modules/rdf/rdf.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/rdf/rdf.test,v
retrieving revision 1.29
diff -u -p -r1.29 rdf.test
--- modules/rdf/rdf.test	21 Nov 2010 10:17:33 -0000	1.29
+++ modules/rdf/rdf.test	9 Dec 2010 00:49:35 -0000
@@ -695,3 +695,42 @@ class RdfGetRdfNamespacesTestCase extend
     $this->assertTrue(!isset($ns['dc']), t('A prefix with conflicting namespaces is discarded.'));
   }
 }
+
+/**
+ * Test for saving RDFMappings passed as array
+*/
+class RdfSaveArrayMappingTestCase extends DrupalWebTestCase {
+   public static function getInfo() {
+    return array(
+      'name' => 'RDF save mapping',
+      'description' => 'Test hook rdf_mapping_save() and assert it will save an argument passed as an array. (Bug fix #953494)',
+      'group' => 'RDF',
+    );
+  }
+
+  function setUp() {
+    parent::setUp('rdf', 'rdf_test');
+  }
+
+  function testRdfSaveArrayMapping() {
+    // Verify saving a mapping.
+    $mapping = array(
+      'type' => 'crud_test_entity',
+      'bundle' => 'crud_test_bundle',
+      'mapping' => array(
+        'rdftype' => array('sioc:Post'),
+        'title' => array(
+          'predicates' => array('dc:title'),
+        ),
+        'uid' => array(
+          'predicates' => array('sioc:has_creator', 'dc:creator'),
+          'type' => 'rel',
+        ),
+      ),
+    );
+    $this->assertTrue(rdf_mapping_save(array('type' => $mapping['type'], 'bundle' => $mapping['bundle'], 'mapping' => $mapping['mapping'])) === SAVED_NEW, t('Mapping as array was saved.'));
+    $this->assertTrue(rdf_mapping_save($mapping) === SAVED_UPDATED, t('Mapping as variable was saved.'));
+  }
+
+}
+
