From 6f116daf361c836fa665c35311c8f41844ae6de5 Mon Sep 17 00:00:00 2001
From: Remon Georgy <remon.sherin@gmail.com>
Date: Fri, 11 Mar 2011 14:54:16 +0200
Subject: [PATCH] Issue #1002076 by Remon: Remove rdfx_get_namespaces() and rely on rdf_get_namespaces() instead.

---
 modules/evoc/evoc.module |    4 +++-
 rdfx.module              |    6 +++---
 rdfx.pages.inc           |    2 +-
 rdfx.terms.inc           |    1 +
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/modules/evoc/evoc.module b/modules/evoc/evoc.module
index 3e66b73..ec53648 100644
--- a/modules/evoc/evoc.module
+++ b/modules/evoc/evoc.module
@@ -53,7 +53,9 @@ function evoc_import_vocabulary($vocabulary_uri, $vocabulary_prefix) {
   rdfx_save_terms($vocabulary_uri, $vocabulary_prefix, $fetched_vocab);
 
   // Refresh the static variable that holds the array of namespaces.
-  drupal_static_reset('rdfx_get_namespaces');
+  // TODO reset rdf_get_namaespaces instead of rdfx_get_namespaces
+  // TODO drupal_static_reset('rdf_get_namespaces');
+  // drupal_static_reset('rdfx_get_namespaces');
   //_evoc_save_rdf_terms($vocabulary_uri, $vocabulary_prefix, $fetched_terms);
 }
 
diff --git a/rdfx.module b/rdfx.module
index 59126a1..c1378b6 100755
--- a/rdfx.module
+++ b/rdfx.module
@@ -76,7 +76,7 @@ function rdfx_build_rdf_node($node) {
   $res = ARC2::getResource();
   $res->setUri($doc_uri);
   $res->base = url('', array('absolute' => TRUE));
-  $res->ns = rdfx_get_namespaces();
+  $res->ns = rdf_get_namespaces();
 
   // Container for the triples about the document.
   $doc_props = array();
@@ -205,7 +205,7 @@ function rdfx_build_rdf_user($user) {
   $res = ARC2::getResource();
   $res->setUri($doc_uri);
   $res->base = url('', array('absolute' => TRUE));
-  $res->ns = rdfx_get_namespaces();
+  $res->ns = rdf_get_namespaces();
 
   // Container for the triples about the document.
   $doc_props = array();
@@ -380,7 +380,7 @@ function rdfx_build_rdf_term($user) {
   $res = ARC2::getResource();
   $res->setUri($doc_uri);
   $res->base = url('', array('absolute' => TRUE));
-  $res->ns = rdfx_get_namespaces();
+  $res->ns = rdf_get_namespaces();
 
   // Container for the triples about the document.
   $doc_props = array();
diff --git a/rdfx.pages.inc b/rdfx.pages.inc
index 42bb40e..f512051 100644
--- a/rdfx.pages.inc
+++ b/rdfx.pages.inc
@@ -19,7 +19,7 @@ function rdfx_entity_view($type, $entity) {
   // Ouptuts the entity as RDF.
   // @todo allow to specify the default format in admin section.
   // @todo support format as argument in url and coneg.
-  $ser_conf = array('ns' => rdfx_get_namespaces());
+  $ser_conf = array('ns' => rdf_get_namespaces());
   $format = ARC2::getPreferredFormat('RDFXML');
   // Default to RDFXML since people are expecting some non-RDFa RDF at /rdf.
   // @todo push content negotation at the node/%node level.
diff --git a/rdfx.terms.inc b/rdfx.terms.inc
index 0cda6fe..b325692 100755
--- a/rdfx.terms.inc
+++ b/rdfx.terms.inc
@@ -39,6 +39,7 @@ function _rdfx_get_terms($term_type) {
 
 /**
  * Gets a list of all defined namespaces.
+ * TODO deprecate this function
  */
 function rdfx_get_namespaces() {
   $rdf_namespaces = &drupal_static(__FUNCTION__);
-- 
1.7.1

