aboutsummaryrefslogtreecommitdiff
path: root/mod/opendd/start.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-15 15:41:22 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-15 15:41:22 +0000
commit8a64083900b86e67f86f34c5e360e882096bc2ef (patch)
tree35b6f33e14471cc26bac1d56d15c92565e68bbef /mod/opendd/start.php
parente1a797c36b4a9ebf90f08d1a7cf81cacbdb0a4f0 (diff)
downloadelgg-8a64083900b86e67f86f34c5e360e882096bc2ef.tar.gz
elgg-8a64083900b86e67f86f34c5e360e882096bc2ef.tar.bz2
Closes #145: Override getURL on imported entities.
git-svn-id: https://code.elgg.org/elgg/trunk@1428 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/opendd/start.php')
-rw-r--r--mod/opendd/start.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/mod/opendd/start.php b/mod/opendd/start.php
index ff2e751bd..d9e3ee9f7 100644
--- a/mod/opendd/start.php
+++ b/mod/opendd/start.php
@@ -196,7 +196,7 @@
*/
function opendd_odd_to_elgg(ODDDocument $element)
{
- global $uuid_array, $elgg_array;
+ global $uuid_array, $elgg_array, $CONFIG;
$count = $element->getNumElements();
@@ -249,7 +249,6 @@
$tmp = array();
// Go through the elements
- $spoo;
foreach ($element as $e)
{
$uuid = $e->getAttribute('uuid');
@@ -257,7 +256,7 @@
// if entity then create
if ($e instanceof ODDEntity) {
$tmp[$uuid] = oddentity_to_elggentity($e);
- $spoo = $uuid;
+ $tmp[$uuid]->setURL($CONFIG->url . "mod/opendd/viewuuid.php?uuid=" . urlencode($uuid));
}
// if metadata then add to entity
@@ -278,10 +277,7 @@
/**
* ISSUES
*
- * - opendd feed doesn't work
* - all entities need to be public on target
- * - setobject on statement is incorrect
- * - NEED WAY TO GET CLASS!
*
*/
@@ -298,8 +294,15 @@
*/
function opendd_aggregate_remote_river(array $feeds, $limit = 10, $offset = 0)
{
- global $uuid_array, $elgg_array;
-
+ global $uuid_array, $elgg_array, $CONFIG;
+
+ // if this not an array, turn it into one
+ if (!is_array($feeds))
+ $feeds = array($feeds);
+
+ // ensure there are no duplicates
+ $feeds = array_unique($feeds);
+
$river = array();
$opendd_elements = array();
$opendd_published = array();