aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-15 20:42:58 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-15 20:42:58 +0000
commit5cc5b3f17f8c4bab7998dbaccc89f914accddf39 (patch)
treeed4ef9f479eb51e16dcda15e9f8ce14aabc8262d
parent9c7b7c54635377def3bd48cfe8491dfb0e3b9b8a (diff)
downloadelgg-5cc5b3f17f8c4bab7998dbaccc89f914accddf39.tar.gz
elgg-5cc5b3f17f8c4bab7998dbaccc89f914accddf39.tar.bz2
Fixes #2860: Deprecated several registration functions that were using the 'callback-first' ordering
git-svn-id: http://code.elgg.org/elgg/trunk@8257 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/annotations.php4
-rw-r--r--engine/lib/deprecated-1.8.php40
-rw-r--r--engine/lib/entities.php2
-rw-r--r--engine/lib/extender.php3
-rw-r--r--engine/lib/metadata.php4
-rw-r--r--engine/lib/relationships.php2
6 files changed, 47 insertions, 8 deletions
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php
index d2f2c6386..130ab37ab 100644
--- a/engine/lib/annotations.php
+++ b/engine/lib/annotations.php
@@ -530,8 +530,8 @@ function elgg_annotation_exists($entity_guid, $annotation_type, $owner_guid = NU
*
* @return string
*/
-function register_annotation_url_handler($function_name, $extender_name = "all") {
- return register_extender_url_handler($function_name, 'annotation', $extender_name);
+function elgg_register_annotation_url_handler($extender_name = "all", $function_name) {
+ return elgg_register_extender_url_handler('annotation', $extender_name, $function_name);
}
/** Register the hook */
diff --git a/engine/lib/deprecated-1.8.php b/engine/lib/deprecated-1.8.php
index 0a4a444e3..56bdee081 100644
--- a/engine/lib/deprecated-1.8.php
+++ b/engine/lib/deprecated-1.8.php
@@ -3774,4 +3774,44 @@ function register_page_handler($handler, $function){
function unregister_page_handler($handler) {
elgg_deprecated_notice("unregister_page_handler() was deprecated by elgg_unregister_page_handler()", 1.8);
return elgg_unregister_page_handler($handler);
+}
+
+/**
+ * @deprecated 1.8 Use {@link elgg_register_annotation_url_handler()}
+ */
+function register_annotation_url_handler($function, $extender_name) {
+ elgg_deprecated_notice("register_annotation_url_handler() was deprecated by elgg_register_annotation_url_handler()", 1.8);
+ return elgg_register_annotation_url_handler($extender_name, $function);
+}
+
+/**
+ * @deprecated 1.8 Use {@link elgg_register_extender_url_handler()}
+ */
+function register_extender_url_handler($function, $type = "all", $name = "all") {
+ elgg_deprecated_notice("register_extender_url_handler() was deprecated by elgg_register_extender_url_handler()", 1.8);
+ return elgg_register_extender_url_handler($type, $name, $function);
+}
+
+/**
+ * @deprecated 1.8 Use {@link elgg_register_entity_type()}
+ */
+function register_entity_type($type, $subtype = null) {
+ elgg_deprecated_notice("register_entity_type() was deprecated by elgg_register_entity_type()", 1.8);
+ return elgg_register_entity_type($type, $subtype);
+}
+
+/**
+ * @deprecated 1.8 Use {@link elgg_register_metadata_url_handler()}
+ */
+function register_metadata_url_handler($function, $extender_name = "all") {
+ return elgg_register_metadata_url_handler($extender_name, $function);
+}
+
+/**
+ *
+ * @deprecated 1.8 Use {@link elgg_register_relationship_url_handler()}
+ */
+function register_relationship_url_handler($function_name, $relationship_type = "all") {
+ elgg_deprecated_notice("register_relationship_url_handler() was deprecated by elgg_register_relationship_url_handler()", 1.8);
+ return elgg_register_relationship_url_handler($relationship_type, $function_name);
} \ No newline at end of file
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 61e732651..850ea5b41 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1876,7 +1876,7 @@ function elgg_register_entity_url_handler($entity_type, $entity_subtype, $functi
* @link http://docs.elgg.org/Search
* @link http://docs.elgg.org/Tutorials/Search
*/
-function register_entity_type($type, $subtype = null) {
+function elgg_register_entity_type($type, $subtype = null) {
global $CONFIG;
$type = strtolower($type);
diff --git a/engine/lib/extender.php b/engine/lib/extender.php
index 90cc54805..53aa99bda 100644
--- a/engine/lib/extender.php
+++ b/engine/lib/extender.php
@@ -169,8 +169,7 @@ function can_edit_extender($extender_id, $type, $user_guid = 0) {
*
* @return true|false Depending on success
*/
-function register_extender_url_handler($function_name, $extender_type = "all",
-$extender_name = "all") {
+function elgg_register_extender_url_handler($extender_type, $extender_name, $function_name) {
global $CONFIG;
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 230bce50f..3182ed077 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -875,8 +875,8 @@ function metadata_update($event, $object_type, $object) {
*
* @return bool
*/
-function register_metadata_url_handler($function_name, $extender_name = "all") {
- return register_extender_url_handler($function_name, 'metadata', $extender_name);
+function elgg_register_metadata_url_handler($extender_name, $function) {
+ return elgg_register_extender_url_handler('metadata', $extender_name, $function);
}
/** Register the hook */
diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php
index 4a1e4ad0f..5224efaf1 100644
--- a/engine/lib/relationships.php
+++ b/engine/lib/relationships.php
@@ -397,7 +397,7 @@ function elgg_list_entities_from_relationship_count($options) {
*
* @return bool Depending on success
*/
-function register_relationship_url_handler($function_name, $relationship_type = "all") {
+function elgg_register_relationship_url_handler($relationship_type, $function_name) {
global $CONFIG;
if (!is_callable($function_name)) {