aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/extender.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-30 13:54:45 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-30 13:54:45 +0000
commit5c13b26a250c5bd8cc18790d5b39fc46c86020f8 (patch)
tree233ef4a9828f45a9438709cd306a427f02ca6ef6 /engine/lib/extender.php
parent07cd0838215d49e0029e818d5e6d904548a0b175 (diff)
downloadelgg-5c13b26a250c5bd8cc18790d5b39fc46c86020f8.tar.gz
elgg-5c13b26a250c5bd8cc18790d5b39fc46c86020f8.tar.bz2
Refs #186: Get URL for relationships
git-svn-id: https://code.elgg.org/elgg/trunk@1601 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/extender.php')
-rw-r--r--engine/lib/extender.php49
1 files changed, 24 insertions, 25 deletions
diff --git a/engine/lib/extender.php b/engine/lib/extender.php
index 20b1750f5..e444a4d55 100644
--- a/engine/lib/extender.php
+++ b/engine/lib/extender.php
@@ -375,7 +375,7 @@
if (!isset($CONFIG->extender_url_handler[$extender_type])) {
$CONFIG->extender_url_handler[$extender_type] = array();
}
- $CONFIG->entity_url_handler[$extender_type][$extender_name] = $function_name;
+ $CONFIG->extender_url_handler[$extender_type][$extender_name] = $function_name;
return true;
@@ -391,33 +391,32 @@
{
global $CONFIG;
-
$view = elgg_get_viewtype();
- $guid = $extender->entity_guid;
- $type = $extender->type;
-
- $url = "";
-
- $function = "";
- if (isset($CONFIG->extender_url_handler[$type][$extender->name]))
- $function = $CONFIG->extender_url_handler[$type][$extender->name];
- if (isset($CONFIG->extender_url_handler[$type]['all']))
- $function = $CONFIG->extender_url_handler[$type]['all'];
- if (isset($CONFIG->extender_url_handler['all']['all']))
- $function = $CONFIG->extender_url_handler['all']['all'];
-
- if (is_callable($function)) {
- $url = $function($extender);
- }
+ $guid = $extender->entity_guid;
+ $type = $extender->type;
+
+ $url = "";
+
+ $function = "";
+ if (isset($CONFIG->extender_url_handler[$type][$extender->name]))
+ $function = $CONFIG->extender_url_handler[$type][$extender->name];
+ if (isset($CONFIG->extender_url_handler[$type]['all']))
+ $function = $CONFIG->extender_url_handler[$type]['all'];
+ if (isset($CONFIG->extender_url_handler['all']['all']))
+ $function = $CONFIG->extender_url_handler['all']['all'];
- if ($url == "") {
- $nameid = $extender->id;
- if ($type == 'volatile')
- $nameid== $extender->name;
- $url = $CONFIG->wwwroot . "export/$view/$guid/$type/$nameid/";
- }
- return $url;
+ if (is_callable($function)) {
+ $url = $function($extender);
+ }
+
+ if ($url == "") {
+ $nameid = $extender->id;
+ if ($type == 'volatile')
+ $nameid== $extender->name;
+ $url = $CONFIG->wwwroot . "export/$view/$guid/$type/$nameid/";
+ }
+ return $url;
}
/** Register the hook */