]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2839: moved deprecated functions from access.php - private_settings.php to...
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 1 Feb 2011 01:36:25 +0000 (01:36 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 1 Feb 2011 01:36:25 +0000 (01:36 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7975 36083f99-b078-4883-b0ff-0f9b5a30f544

20 files changed:
engine/lib/access.php
engine/lib/actions.php
engine/lib/admin.php
engine/lib/annotations.php
engine/lib/deprecated.php [new file with mode: 0644]
engine/lib/elgglib.php
engine/lib/entities.php
engine/lib/group.php
engine/lib/install.php
engine/lib/location.php
engine/lib/mb_wrapper.php
engine/lib/metadata.php
engine/lib/metastrings.php
engine/lib/navigation.php
engine/lib/objects.php
engine/lib/output.php
engine/lib/pageowner.php
engine/lib/plugins.php
engine/lib/private_settings.php
engine/start.php

index de246ee20e83e9a0d87415747f3f35b2c1322751..ae95982e69b232f8d1d39d7849c851352a60721e 100644 (file)
@@ -743,83 +743,6 @@ function elgg_view_access_collections($owner_guid) {
        return elgg_view('core/friends/collections', array('collections' => $collections));
 }
 
-/**
- * Get entities with the specified access collection id.
- *
- * @deprecated 1.7. Use elgg_get_entities_from_access_id()
- *
- * @param int    $collection_id  ID of collection
- * @param string $entity_type    Type of entities
- * @param string $entity_subtype Subtype of entities
- * @param int    $owner_guid     Guid of owner
- * @param int    $limit          Limit of number of entities to return
- * @param int    $offset         Skip this many entities
- * @param string $order_by       Column to order by
- * @param int    $site_guid      The site guid
- * @param bool   $count          Return a count or entities
- *
- * @return array
- */
-function get_entities_from_access_id($collection_id, $entity_type = "", $entity_subtype = "",
-       $owner_guid = 0, $limit = 10, $offset = 0, $order_by = "", $site_guid = 0, $count = false) {
-       // log deprecated warning
-       elgg_deprecated_notice('get_entities_from_access_id() was deprecated by elgg_get_entities()', 1.7);
-
-       if (!$collection_id) {
-               return FALSE;
-       }
-
-       // build the options using given parameters
-       $options = array();
-       $options['limit'] = $limit;
-       $options['offset'] = $offset;
-       $options['count'] = $count;
-
-       if ($entity_type) {
-               $options['type'] = sanitise_string($entity_type);
-       }
-
-       if ($entity_subtype) {
-               $options['subtype'] = $entity_subtype;
-       }
-
-       if ($site_guid) {
-               $options['site_guid'] = $site_guid;
-       }
-
-       if ($order_by) {
-               $options['order_by'] = sanitise_string("e.time_created, $order_by");
-       }
-
-       if ($owner_guid) {
-               if (is_array($owner_guid)) {
-                       $options['owner_guids'] = $owner_guid;
-               } else {
-                       $options['owner_guid'] = $owner_guid;
-               }
-       }
-
-       if ($site_guid) {
-               $options['site_guid'] = $site_guid;
-       }
-
-       $options['access_id'] = $collection_id;
-
-       return elgg_get_entities_from_access_id($options);
-}
-
-/**
- * @deprecated 1.7
- */
-function get_entities_from_access_collection($collection_id, $entity_type = "", $entity_subtype = "",
-       $owner_guid = 0, $limit = 10, $offset = 0, $order_by = "", $site_guid = 0, $count = false) {
-
-       elgg_deprecated_notice('get_entities_from_access_collection() was deprecated by elgg_get_entities()', 1.7);
-
-       return get_entities_from_access_id($collection_id, $entity_type, $entity_subtype,
-                       $owner_guid, $limit, $offset, $order_by, $site_guid, $count);
-}
-
 /**
  * Return entities based upon access id.
  *
@@ -866,27 +789,6 @@ function elgg_list_entities_from_access_id(array $options = array()) {
        return elgg_list_entities($options, 'elgg_get_entities_from_access_id');
 }
 
-/**
- * @return str
- * @deprecated 1.8 Use elgg_list_entities_from_access_id()
- */
-function list_entities_from_access_id($access_id, $entity_type = "", $entity_subtype = "",
-       $owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = true, $pagination = true) {
-               
-       elgg_deprecated_notice("All list_entities* functions were deprecated in 1.8.  Use elgg_list_entities* instead.", 1.8);
-               
-       echo elgg_list_entities_from_access_id(array(
-               'access_id' => $access_id,
-               'types' => $entity_type,
-               'subtypes' => $entity_subtype,
-               'owner_guids' => $owner_guid,
-               'limit' => $limit,
-               'full_view' => $fullview,
-               'list_type_toggle' => $listtypetoggle,
-               'pagination' => $pagination,
-       ));
-}
-
 /**
  * Return the name of an ACCESS_* constant or a access collection,
  * but only if the user has write access on that ACL.
index d95fe043530528d23477f72b5513941d18af648a..0691e306a711f2e790e3df697f85a87e49bdda10 100644 (file)
@@ -180,23 +180,6 @@ function elgg_register_action($action, $filename = "", $access = 'logged_in') {
        return true;
 }
 
-/**
- * @deprecated 1.8 Use {@link elgg_register_action()} instead
- */
-function register_action($action, $public = false, $filename = "", $admin_only = false) {
-       elgg_deprecated_notice("register_action() was deprecated by elgg_register_action()", 1.8);
-       
-       if ($admin_only) {
-               $access = 'admin';
-       } elseif ($public) {
-               $access = 'public';
-       } else {
-               $access = 'logged_in';
-       }
-       
-       return elgg_register_action($action, $filename, $access);
-}
-
 /**
  * Validate an action token.
  *
index c8254a0ffcd0f3b0cbc5e887b2542aecfd48638f..c26ba131cee2362009592f9a9d2213e3538c25e7 100644 (file)
@@ -7,30 +7,6 @@
  * @subpackage Core
  */
 
-/**
- * Register an admin page with the admin panel.
- * This function extends the view "admin/main" with the provided view.
- * This view should provide a description and either a control or a link to.
- *
- * Usage:
- *     - To add a control to the main admin panel then extend admin/main
- *  - To add a control to a new page create a page which renders a view admin/subpage
- *    (where subpage is your new page -
- *    nb. some pages already exist that you can extend), extend the main view to point to it,
- *    and add controls to your new view.
- *
- * At the moment this is essentially a wrapper around elgg_extend_view().
- *
- * @param string $new_admin_view The view associated with the control you're adding
- * @param string $view           The view to extend, by default this is 'admin/main'.
- * @param int    $priority       Optional priority to govern the appearance in the list.
- *
- * @return void
- */
-function extend_elgg_admin_page($new_admin_view, $view = 'admin/main', $priority = 500) {
-       elgg_deprecated_notice('extend_elgg_admin_page() does nothing. Extend admin views manually.', 1.8);
-}
-
 /**
  * Create the plugin settings submenu.
  *
@@ -277,7 +253,6 @@ function elgg_add_admin_notice($id, $message) {
        return FALSE;
 }
 
-
 /**
  * Remove an admin notice by ID.
  *
index f069e1d0566aefac6b2934cffaee6f1034d6c019..035c5e705c519a49f496632f5016875584e08557 100644 (file)
@@ -407,160 +407,6 @@ function elgg_get_entities_from_annotations(array $options = array()) {
        return elgg_get_entities_from_metadata($options);
 }
 
-/**
- * Get entities from annotations
- *
- * No longer used.
- *
- * @deprecated 1.7 Use elgg_get_entities_from_annotations()
- *
- * @param mixed  $entity_type    Type of entity
- * @param mixed  $entity_subtype Subtype of entity
- * @param string $name           Name of annotation
- * @param string $value          Value of annotation
- * @param int    $owner_guid     Guid of owner of annotation
- * @param int    $group_guid     Guid of group
- * @param int    $limit          Limit
- * @param int    $offset         Offset
- * @param string $order_by       SQL order by string
- * @param bool   $count          Count or return entities
- * @param int    $timelower      Lower time limit
- * @param int    $timeupper      Upper time limit
- *
- * @return unknown_type
- */
-function get_entities_from_annotations($entity_type = "", $entity_subtype = "", $name = "",
-$value = "", $owner_guid = 0, $group_guid = 0, $limit = 10, $offset = 0, $order_by = "asc",
-$count = false, $timelower = 0, $timeupper = 0) {
-       $msg = 'get_entities_from_annotations() is deprecated by elgg_get_entities_from_annotations().';
-       elgg_deprecated_notice($msg, 1.7);
-
-       $options = array();
-
-       if ($entity_type) {
-               $options['types'] = $entity_type;
-       }
-
-       if ($entity_subtype) {
-               $options['subtypes'] = $entity_subtype;
-       }
-
-       $options['annotation_names'] = $name;
-
-       if ($value) {
-               $options['annotation_values'] = $value;
-       }
-
-       if ($owner_guid) {
-               if (is_array($owner_guid)) {
-                       $options['annotation_owner_guids'] = $owner_guid;
-               } else {
-                       $options['annotation_owner_guid'] = $owner_guid;
-               }
-       }
-
-       if ($group_guid) {
-               $options['container_guid'] = $group_guid;
-       }
-
-       if ($limit) {
-               $options['limit'] = $limit;
-       }
-
-       if ($offset) {
-               $options['offset'] = $offset;
-       }
-
-       if ($order_by) {
-               $options['order_by'] = "maxtime $order_by";
-       }
-
-       if ($count) {
-               $options['count'] = $count;
-       }
-
-       if ($timelower) {
-               $options['annotation_created_time_lower'] = $timelower;
-       }
-
-       if ($timeupper) {
-               $options['annotation_created_time_upper'] = $timeupper;
-       }
-
-       return elgg_get_entities_from_annotations($options);
-}
-
-/**
- * Lists entities
- *
- * @see elgg_view_entity_list
- *
- * @param string  $entity_type    Type of entity.
- * @param string  $entity_subtype Subtype of entity.
- * @param string  $name           Name of annotation.
- * @param string  $value          Value of annotation.
- * @param int     $limit          Maximum number of results to return.
- * @param int     $owner_guid     Owner.
- * @param int     $group_guid     Group container. Currently only supported if entity_type is object
- * @param boolean $asc            Whether to list in ascending or descending order (default: desc)
- * @param boolean $fullview       Whether to display the entities in full
- * @param boolean $listtypetoggle Can 'gallery' view can be displayed (default: no)
- *
- * @deprecated 1.7 Use elgg_list_entities_from_annotations()
- * @return string Formatted entity list
- */
-function list_entities_from_annotations($entity_type = "", $entity_subtype = "", $name = "",
-$value = "", $limit = 10, $owner_guid = 0, $group_guid = 0, $asc = false, $fullview = true,
-$listtypetoggle = false) {
-
-       $msg = 'list_entities_from_annotations is deprecated by elgg_list_entities_from_annotations';
-       elgg_deprecated_notice($msg, 1.8);
-
-       $options = array();
-
-       if ($entity_type) {
-               $options['types'] = $entity_type;
-       }
-
-       if ($entity_subtype) {
-               $options['subtypes'] = $entity_subtype;
-       }
-
-       if ($name) {
-               $options['annotation_names'] = $name;
-       }
-
-       if ($value) {
-               $options['annotation_values'] = $value;
-       }
-
-       if ($limit) {
-               $options['limit'] = $limit;
-       }
-
-       if ($owner_guid) {
-               $options['annotation_owner_guid'] = $owner_guid;
-       }
-
-       if ($group_guid) {
-               $options['container_guid'] = $group_guid;
-       }
-
-       if ($asc) {
-               $options['order_by'] = 'maxtime desc';
-       }
-
-       if ($offset = sanitise_int(get_input('offset', null))) {
-               $options['offset'] = $offset;
-       }
-
-       $options['full_view'] = $fullview;
-       $options['list_type_toggle'] = $listtypetoggle;
-       $options['pagination'] = $pagination;
-
-       return elgg_list_entities_from_annotations($options);
-}
-
 /**
  * Returns a viewable list of entities from annotations.
  *
@@ -849,140 +695,6 @@ function elgg_get_entities_from_annotation_calculation($options) {
        return elgg_get_entities_from_annotations($options);
 }
 
-/**
- * Get entities ordered by a mathematical calculation
- *
- * @deprecated 1.8 Use elgg_get_entities_from_annotation_calculation()
- *
- * @param string $sum            What sort of calculation to perform
- * @param string $entity_type    Type of Entity
- * @param string $entity_subtype Subtype of Entity
- * @param string $name           Name of annotation
- * @param string $mdname         Metadata name
- * @param string $mdvalue        Metadata value
- * @param int    $owner_guid     GUID of owner of annotation
- * @param int    $limit          Limit of results
- * @param int    $offset         Offset of results
- * @param string $orderdir       Order of results
- * @param bool   $count          Return count or entities
- *
- * @return mixed
- */
-function get_entities_from_annotations_calculate_x($sum = "sum", $entity_type = "",
-$entity_subtype = "", $name = "", $mdname = '', $mdvalue = '', $owner_guid = 0,
-$limit = 10, $offset = 0, $orderdir = 'desc', $count = false) {
-
-       $msg = 'get_entities_from_annotations_calculate_x() is deprecated by elgg_get_entities_from_annotation_calculation().';
-
-       elgg_deprecated_notice($msg, 1.8);
-
-       $options = array();
-
-       $options['calculation'] = $sum;
-
-       if ($entity_type) {
-               $options['types'] = $entity_type;
-       }
-
-       if ($entity_subtype) {
-               $options['subtypes'] = $entity_subtype;
-       }
-
-       $options['annotation_names'] = $name;
-
-       if ($mdname) {
-               $options['metadata_names'] = $mdname;
-       }
-
-       if ($mdvalue) {
-               $options['metadata_values'] = $mdvalue;
-       }
-
-       // original function rewrote this to container guid.
-       if ($owner_guid) {
-               if (is_array($owner_guid)) {
-                       $options['container_guids'] = $owner_guid;
-               } else {
-                       $options['container_guid'] = $owner_guid;
-               }
-       }
-
-       $options['limit'] = $limit;
-       $options['offset'] = $offset;
-
-       $options['order_by'] = "calculated $orderdir";
-
-       $options['count'] = $count;
-
-       return elgg_get_entities_from_annotation_calculation($options);
-}
-
-/**
- * Returns entities ordered by the sum of an annotation
- *
- * @deprecated 1.8 Use elgg_get_entities_from_annotation_calculation()
- *
- * @param string $entity_type    Type of Entity
- * @param string $entity_subtype Subtype of Entity
- * @param string $name           Name of annotation
- * @param string $mdname         Metadata name
- * @param string $mdvalue        Metadata value
- * @param int    $owner_guid     GUID of owner of annotation
- * @param int    $limit          Limit of results
- * @param int    $offset         Offset of results
- * @param string $orderdir       Order of results
- * @param bool   $count          Return count or entities
- *
- * @return unknown
- */
-function get_entities_from_annotation_count($entity_type = "", $entity_subtype = "", $name = "",
-$mdname = '', $mdvalue = '', $owner_guid = 0, $limit = 10, $offset = 0, $orderdir = 'desc',
-$count = false) {
-
-       $msg = 'get_entities_from_annotation_count() is deprecated by elgg_get_entities_from_annotation_calculation().';
-
-       elgg_deprecated_notice($msg, 1.8);
-
-       $options = array();
-
-       $options['calculation'] = 'sum';
-
-       if ($entity_type) {
-               $options['types'] = $entity_type;
-       }
-
-       if ($entity_subtype) {
-               $options['subtypes'] = $entity_subtype;
-       }
-
-       $options['annotation_names'] = $name;
-
-       if ($mdname) {
-               $options['metadata_names'] = $mdname;
-       }
-
-       if ($mdvalue) {
-               $options['metadata_values'] = $mdvalue;
-       }
-
-       if ($owner_guid) {
-               if (is_array($owner_guid)) {
-                       $options['owner_guids'] = $owner_guid;
-               } else {
-                       $options['owner_guid'] = $owner_guid;
-               }
-       }
-
-       $options['limit'] = $limit;
-       $options['offset'] = $offset;
-
-       $options['order_by'] = "calculated $orderdir";
-
-       $options['count'] = $count;
-
-       return elgg_get_entities_from_annotation_calculation($options);
-}
-
 /**
  * List entities from an annotation calculation.
  *
@@ -996,68 +708,6 @@ function elgg_list_entities_from_annotation_calculation($options) {
        return elgg_list_entities($options, 'elgg_get_entities_from_annotation_calculation');
 }
 
-/**
- * Lists entities by the totals of a particular kind of annotation
- *
- * @deprecated 1.8 Use elgg_list_entities_from_annotation_calculation()
- *
- * @param string  $entity_type    Type of entity.
- * @param string  $entity_subtype Subtype of entity.
- * @param string  $name           Name of annotation.
- * @param int     $limit          Maximum number of results to return.
- * @param int     $owner_guid     Owner.
- * @param int     $group_guid     Group container. Currently only supported if entity_type is object
- * @param boolean $asc            Whether to list in ascending or descending order (default: desc)
- * @param boolean $fullview       Whether to display the entities in full
- * @param boolean $listtypetoggle Can the 'gallery' view can be displayed (default: no)
- * @param boolean $pagination     Add pagination
- * @param string  $orderdir       Order desc or asc
- *
- * @return string Formatted entity list
- */
-function list_entities_from_annotation_count($entity_type = "", $entity_subtype = "", $name = "",
-$limit = 10, $owner_guid = 0, $group_guid = 0, $asc = false, $fullview = true,
-$listtypetoggle = false, $pagination = true, $orderdir = 'desc') {
-
-       $msg = 'list_entities_from_annotation_count() is deprecated by elgg_list_entities_from_annotation_calculation().';
-
-       elgg_deprecated_notice($msg, 1.8);
-
-       $options = array();
-
-       $options['calculation'] = 'sum';
-
-       if ($entity_type) {
-               $options['types'] = $entity_type;
-       }
-
-       if ($entity_subtype) {
-               $options['subtypes'] = $entity_subtype;
-       }
-
-       $options['annotation_names'] = $name;
-
-       if ($owner_guid) {
-               if (is_array($owner_guid)) {
-                       $options['owner_guids'] = $owner_guid;
-               } else {
-                       $options['owner_guid'] = $owner_guid;
-               }
-       }
-
-       $options['full_view'] = $fullview;
-
-       $options['list_type_toggle'] = $listtypetoggle;
-
-       $options['pagination'] = $pagination;
-
-       $options['limit'] = $limit;
-
-       $options['order_by'] = "calculated $orderdir";
-
-       return elgg_get_entities_from_annotation_calculation($options);
-}
-
 /**
  * Lists entities by the totals of a particular kind of annotation AND
  * the value of a piece of metadata
diff --git a/engine/lib/deprecated.php b/engine/lib/deprecated.php
new file mode 100644 (file)
index 0000000..94d3fdd
--- /dev/null
@@ -0,0 +1,1761 @@
+<?php
+/**
+ * @deprecated 1.6
+ */
+function delete_group_entity($guid) {
+       elgg_deprecated_notice("delete_group_entity has been deprecated", 1.6);
+
+       // Always return that we have deleted one row in order to not break existing code.
+       return 1;
+}
+
+
+/**#@+
+ * @deprecated 1.7
+ */
+
+function get_entities_from_access_id($collection_id, $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $offset = 0, $order_by = "", $site_guid = 0, $count = false) {
+       // log deprecated warning
+       elgg_deprecated_notice('get_entities_from_access_id() was deprecated by elgg_get_entities()', 1.7);
+
+       if (!$collection_id) {
+               return FALSE;
+       }
+
+       // build the options using given parameters
+       $options = array();
+       $options['limit'] = $limit;
+       $options['offset'] = $offset;
+       $options['count'] = $count;
+
+       if ($entity_type) {
+               $options['type'] = sanitise_string($entity_type);
+       }
+
+       if ($entity_subtype) {
+               $options['subtype'] = $entity_subtype;
+       }
+
+       if ($site_guid) {
+               $options['site_guid'] = $site_guid;
+       }
+
+       if ($order_by) {
+               $options['order_by'] = sanitise_string("e.time_created, $order_by");
+       }
+
+       if ($owner_guid) {
+               if (is_array($owner_guid)) {
+                       $options['owner_guids'] = $owner_guid;
+               } else {
+                       $options['owner_guid'] = $owner_guid;
+               }
+       }
+
+       if ($site_guid) {
+               $options['site_guid'] = $site_guid;
+       }
+
+       $options['access_id'] = $collection_id;
+
+       return elgg_get_entities_from_access_id($options);
+}
+
+function get_entities_from_access_collection($collection_id, $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $offset = 0, $order_by = "", $site_guid = 0, $count = false) {
+
+       elgg_deprecated_notice('get_entities_from_access_collection() was deprecated by elgg_get_entities()', 1.7);
+
+       return get_entities_from_access_id($collection_id, $entity_type, $entity_subtype, $owner_guid, $limit, $offset, $order_by, $site_guid, $count);
+}
+
+function get_entities($type = "", $subtype = "", $owner_guid = 0, $order_by = "", $limit = 10, $offset = 0, $count = false, $site_guid = 0, $container_guid = null, $timelower = 0, $timeupper = 0) {
+
+       elgg_deprecated_notice('get_entities() was deprecated by elgg_get_entities().', 1.7);
+
+       // rewrite owner_guid to container_guid to emulate old functionality
+       if ($owner_guid != "") {
+               if (is_null($container_guid)) {
+                       $container_guid = $owner_guid;
+                       $owner_guid = NULL;
+               }
+       }
+
+       $options = array();
+       if ($type) {
+               if (is_array($type)) {
+                       $options['types'] = $type;
+               } else {
+                       $options['type'] = $type;
+               }
+       }
+
+       if ($subtype) {
+               if (is_array($subtype)) {
+                       $options['subtypes'] = $subtype;
+               } else {
+                       $options['subtype'] = $subtype;
+               }
+       }
+
+       if ($owner_guid) {
+               if (is_array($owner_guid)) {
+                       $options['owner_guids'] = $owner_guid;
+               } else {
+                       $options['owner_guid'] = $owner_guid;
+               }
+       }
+
+       if ($order_by) {
+               $options['order_by'] = $order_by;
+       }
+
+       // need to pass 0 for all option
+       $options['limit'] = $limit;
+
+       if ($offset) {
+               $options['offset'] = $offset;
+       }
+
+       if ($count) {
+               $options['count'] = $count;
+       }
+
+       if ($site_guid) {
+               $options['site_guids'] = $site_guid;
+       }
+
+       if ($container_guid) {
+               $options['container_guids'] = $container_guid;
+       }
+
+       if ($timeupper) {
+               $options['created_time_upper'] = $timeupper;
+       }
+
+       if ($timelower) {
+               $options['created_time_lower'] = $timelower;
+       }
+
+       $r = elgg_get_entities($options);
+       return $r;
+}
+
+function list_entities($type = "", $subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = false, $pagination = true) {
+
+       elgg_deprecated_notice('list_entities() was deprecated by elgg_list_entities()!', 1.7);
+
+       $options = array();
+
+       // rewrite owner_guid to container_guid to emulate old functionality
+       if ($owner_guid) {
+               $options['container_guids'] = $owner_guid;
+       }
+
+       if ($type) {
+               $options['types'] = $type;
+       }
+
+       if ($subtype) {
+               $options['subtypes'] = $subtype;
+       }
+
+       if ($limit) {
+               $options['limit'] = $limit;
+       }
+
+       if ($offset = sanitise_int(get_input('offset', null))) {
+               $options['offset'] = $offset;
+       }
+
+       $options['full_view'] = $fullview;
+       $options['list_type_toggle'] = $listtypetoggle;
+       $options['pagination'] = $pagination;
+
+       return elgg_list_entities($options);
+}
+
+function delete_entities($type = "", $subtype = "", $owner_guid = 0) {
+       elgg_deprecated_notice('delete_entities() was deprecated because no one should use it.', 1.7);
+       return false;
+}
+
+function elgg_validate_action_url($url) {
+       elgg_deprecated_notice('elgg_validate_action_url() deprecated by elgg_add_action_tokens_to_url().', '1.7b');
+
+       return elgg_add_action_tokens_to_url($url);
+}
+
+function test_ip() {
+       elgg_deprecated_notice('test_ip() was removed because of licensing issues.', 1.7);
+
+       return 0;
+}
+
+function is_ip_in_array() {
+       elgg_deprecated_notice('is_ip_in_array() was removed because of licensing issues.', 1.7);
+
+       return false;
+}
+
+function list_registered_entities($owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = false, $allowedtypes = true) {
+
+       elgg_deprecated_notice('list_registered_entities() was deprecated by elgg_list_registered_entities().', 1.7);
+
+       $options = array();
+
+       // don't want to send anything if not being used.
+       if ($owner_guid) {
+               $options['owner_guid'] = $owner_guid;
+       }
+
+       if ($limit) {
+               $options['limit'] = $limit;
+       }
+
+       if ($allowedtypes) {
+               $options['allowed_types'] = $allowedtypes;
+       }
+
+       // need to send because might be BOOL
+       $options['full_view'] = $fullview;
+       $options['list_type_toggle'] = $listtypetoggle;
+
+       $options['offset'] = get_input('offset', 0);
+
+       return elgg_list_registered_entities($options);
+}
+
+function get_library_files($directory, $exceptions = array(), $list = array()) {
+       elgg_deprecated_notice('get_library_files() deprecated by elgg_get_file_list()', 1.7);
+       return elgg_get_file_list($directory, $exceptions, $list, array('.php'));
+}
+
+function get_entities_from_annotations($entity_type = "", $entity_subtype = "", $name = "", $value = "", $owner_guid = 0, $group_guid = 0, $limit = 10, $offset = 0, $order_by = "asc", $count = false, $timelower = 0, $timeupper = 0) {
+       $msg = 'get_entities_from_annotations() is deprecated by elgg_get_entities_from_annotations().';
+       elgg_deprecated_notice($msg, 1.7);
+
+       $options = array();
+
+       if ($entity_type) {
+               $options['types'] = $entity_type;
+       }
+
+       if ($entity_subtype) {
+               $options['subtypes'] = $entity_subtype;
+       }
+
+       $options['annotation_names'] = $name;
+
+       if ($value) {
+               $options['annotation_values'] = $value;
+       }
+
+       if ($owner_guid) {
+               if (is_array($owner_guid)) {
+                       $options['annotation_owner_guids'] = $owner_guid;
+               } else {
+                       $options['annotation_owner_guid'] = $owner_guid;
+               }
+       }
+
+       if ($group_guid) {
+               $options['container_guid'] = $group_guid;
+       }
+
+       if ($limit) {
+               $options['limit'] = $limit;
+       }
+
+       if ($offset) {
+               $options['offset'] = $offset;
+       }
+
+       if ($order_by) {
+               $options['order_by'] = "maxtime $order_by";
+       }
+
+       if ($count) {
+               $options['count'] = $count;
+       }
+
+       if ($timelower) {
+               $options['annotation_created_time_lower'] = $timelower;
+       }
+
+       if ($timeupper) {
+               $options['annotation_created_time_upper'] = $timeupper;
+       }
+
+       return elgg_get_entities_from_annotations($options);
+}
+
+function list_entities_from_annotations($entity_type = "", $entity_subtype = "", $name = "", $value = "", $limit = 10, $owner_guid = 0, $group_guid = 0, $asc = false, $fullview = true, $listtypetoggle = false) {
+
+       $msg = 'list_entities_from_annotations is deprecated by elgg_list_entities_from_annotations';
+       elgg_deprecated_notice($msg, 1.8);
+
+       $options = array();
+
+       if ($entity_type) {
+               $options['types'] = $entity_type;
+       }
+
+       if ($entity_subtype) {
+               $options['subtypes'] = $entity_subtype;
+       }
+
+       if ($name) {
+               $options['annotation_names'] = $name;
+       }
+
+       if ($value) {
+               $options['annotation_values'] = $value;
+       }
+
+       if ($limit) {
+               $options['limit'] = $limit;
+       }
+
+       if ($owner_guid) {
+               $options['annotation_owner_guid'] = $owner_guid;
+       }
+
+       if ($group_guid) {
+               $options['container_guid'] = $group_guid;
+       }
+
+       if ($asc) {
+               $options['order_by'] = 'maxtime desc';
+       }
+
+       if ($offset = sanitise_int(get_input('offset', null))) {
+               $options['offset'] = $offset;
+       }
+
+       $options['full_view'] = $fullview;
+       $options['list_type_toggle'] = $listtypetoggle;
+       $options['pagination'] = $pagination;
+
+       return elgg_list_entities_from_annotations($options);
+}
+
+function search_for_group($criteria, $limit = 10, $offset = 0, $order_by = "", $count = false) {
+       elgg_deprecated_notice('search_for_group() was deprecated by new search plugin.', 1.7);
+       global $CONFIG;
+
+       $criteria = sanitise_string($criteria);
+       $limit = (int)$limit;
+       $offset = (int)$offset;
+       $order_by = sanitise_string($order_by);
+
+       $access = get_access_sql_suffix("e");
+
+       if ($order_by == "") {
+               $order_by = "e.time_created desc";
+       }
+
+       if ($count) {
+               $query = "SELECT count(e.guid) as total ";
+       } else {
+               $query = "SELECT e.* ";
+       }
+       $query .= "from {$CONFIG->dbprefix}entities e" . " JOIN {$CONFIG->dbprefix}groups_entity g on e.guid=g.guid where ";
+
+       $query .= "(g.name like \"%{$criteria}%\" or g.description like \"%{$criteria}%\")";
+       $query .= " and $access";
+
+       if (!$count) {
+               $query .= " order by $order_by limit $offset, $limit"; // Add order and limit
+               return get_data($query, "entity_row_to_elggstar");
+       } else {
+               if ($count = get_data_row($query)) {
+                       return $count->total;
+               }
+       }
+       return false;
+}
+
+function search_list_groups_by_name($hook, $user, $returnvalue, $tag) {
+       elgg_deprecated_notice('search_list_groups_by_name() was deprecated by new search plugin', 1.7);
+       // Change this to set the number of groups that display on the search page
+       $threshold = 4;
+
+       $object = get_input('object');
+
+       if (!get_input('offset') && (empty($object) || $object == 'group')) {
+               if ($groups = search_for_group($tag, $threshold)) {
+                       $countgroups = search_for_group($tag, 0, 0, "", true);
+
+                       $return = elgg_view('group/search/startblurb', array('count' => $countgroups,
+                               'tag' => $tag));
+                       foreach ($groups as $group) {
+                               $return .= elgg_view_entity($group);
+                       }
+                       $vars = array('count' => $countgroups, 'threshold' => $threshold, 'tag' => $tag);
+                       $return .= elgg_view('group/search/finishblurb', $vars);
+                       return $return;
+               }
+       }
+}
+
+function list_group_search($tag, $limit = 10) {
+       elgg_deprecated_notice('list_group_search() was deprecated by new search plugin.', 1.7);
+       $offset = (int)get_input('offset');
+       $limit = (int)$limit;
+       $count = (int)search_for_group($tag, 10, 0, '', true);
+       $entities = search_for_group($tag, $limit, $offset);
+
+       return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, false);
+
+}
+
+function get_entities_from_metadata($meta_name, $meta_value = "", $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $offset = 0, $order_by = "", $site_guid = 0, $count = FALSE, $case_sensitive = TRUE) {
+
+       elgg_deprecated_notice('get_entities_from_metadata() was deprecated by elgg_get_entities_from_metadata()!', 1.7);
+
+       $options = array();
+
+       $options['metadata_names'] = $meta_name;
+
+       if ($meta_value) {
+               $options['metadata_values'] = $meta_value;
+       }
+
+       if ($entity_type) {
+               $options['types'] = $entity_type;
+       }
+
+       if ($entity_subtype) {
+               $options['subtypes'] = $entity_subtype;
+       }
+
+       if ($owner_guid) {
+               if (is_array($owner_guid)) {
+                       $options['owner_guids'] = $owner_guid;
+               } else {
+                       $options['owner_guid'] = $owner_guid;
+               }
+       }
+
+       if ($limit) {
+               $options['limit'] = $limit;
+       }
+
+       if ($offset) {
+               $options['offset'] = $offset;
+       }
+
+       if ($order_by) {
+               $options['order_by'];
+       }
+
+       if ($site_guid) {
+               $options['site_guid'];
+       }
+
+       if ($count) {
+               $options['count'] = $count;
+       }
+
+       // need to be able to pass false
+       $options['metadata_case_sensitive'] = $case_sensitive;
+
+       return elgg_get_entities_from_metadata($options);
+}
+
+function get_entities_from_metadata_multi($meta_array, $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $offset = 0, $order_by = "", $site_guid = 0, $count = false, $meta_array_operator = 'and') {
+
+       elgg_deprecated_notice('get_entities_from_metadata_multi() was deprecated by elgg_get_entities_from_metadata()!', 1.7);
+
+       if (!is_array($meta_array) || sizeof($meta_array) == 0) {
+               return false;
+       }
+
+       $options = array();
+
+       $options['metadata_name_value_pairs'] = $meta_array;
+
+       if ($entity_type) {
+               $options['types'] = $entity_type;
+       }
+
+       if ($entity_subtype) {
+               $options['subtypes'] = $entity_subtype;
+       }
+
+       if ($owner_guid) {
+               if (is_array($owner_guid)) {
+                       $options['owner_guids'] = $owner_guid;
+               } else {
+                       $options['owner_guid'] = $owner_guid;
+               }
+       }
+
+       if ($limit) {
+               $options['limit'] = $limit;
+       }
+
+       if ($offset) {
+               $options['offset'] = $offset;
+       }
+
+       if ($order_by) {
+               $options['order_by'];
+       }
+
+       if ($site_guid) {
+               $options['site_guid'];
+       }
+
+       if ($count) {
+               $options['count'] = $count;
+       }
+
+       $options['metadata_name_value_pairs_operator'] = $meta_array_operator;
+
+       return elgg_get_entities_from_metadata($options);
+}
+
+function menu_item($menu_name, $menu_url) {
+       elgg_deprecated_notice('menu_item() is deprecated by add_submenu_item', 1.7);
+       return make_register_object($menu_name, $menu_url);
+}
+
+function search_for_object($criteria, $limit = 10, $offset = 0, $order_by = "", $count = false) {
+       elgg_deprecated_notice('search_for_object() was deprecated by new search plugin.', 1.7);
+       global $CONFIG;
+
+       $criteria = sanitise_string($criteria);
+       $limit = (int)$limit;
+       $offset = (int)$offset;
+       $order_by = sanitise_string($order_by);
+       $container_guid = (int)$container_guid;
+
+       $access = get_access_sql_suffix("e");
+
+       if ($order_by == "") {
+               $order_by = "e.time_created desc";
+       }
+
+       if ($count) {
+               $query = "SELECT count(e.guid) as total ";
+       } else {
+               $query = "SELECT e.* ";
+       }
+       $query .= "from {$CONFIG->dbprefix}entities e
+               join {$CONFIG->dbprefix}objects_entity o on e.guid=o.guid
+               where match(o.title,o.description) against ('$criteria') and $access";
+
+       if (!$count) {
+               $query .= " order by $order_by limit $offset, $limit"; // Add order and limit
+               return get_data($query, "entity_row_to_elggstar");
+       } else {
+               if ($count = get_data_row($query)) {
+                       return $count->total;
+               }
+       }
+       return false;
+}
+
+function search_list_objects_by_name($hook, $user, $returnvalue, $tag) {
+       elgg_deprecated_notice('search_list_objects_by_name was deprecated by new search plugin.', 1.7);
+
+       // Change this to set the number of users that display on the search page
+       $threshold = 4;
+
+       $object = get_input('object');
+
+       if (!get_input('offset') && (empty($object) || $object == 'user')) {
+               if ($users = search_for_user($tag, $threshold)) {
+                       $countusers = search_for_user($tag, 0, 0, "", true);
+
+                       $return = elgg_view('user/search/startblurb', array('count' => $countusers,
+                               'tag' => $tag));
+                       foreach ($users as $user) {
+                               $return .= elgg_view_entity($user);
+                       }
+                       $return .= elgg_view('user/search/finishblurb', array('count' => $countusers,
+                               'threshold' => $threshold, 'tag' => $tag));
+
+                       return $return;
+
+               }
+       }
+}
+
+/**#@-*/
+
+/**#@+
+ * @deprecated 1.8
+ */
+
+function elgg_get_entity_site_where_sql($table, $site_guids) {
+       elgg_deprecated_notice('elgg_get_entity_site_where_sql() is deprecated by elgg_get_guid_based_where_sql().', 1.8);
+
+       return elgg_get_guid_based_where_sql("{$table}.site_guid", $site_guids);
+}
+
+function elgg_get_entity_container_where_sql($table, $container_guids) {
+       elgg_deprecated_notice('elgg_get_entity_container_where_sql() is deprecated by elgg_get_guid_based_where_sql().', 1.8);
+
+       return elgg_get_guid_based_where_sql("{$table}.container_guid", $container_guids);
+}
+
+function elgg_get_entity_owner_where_sql($table, $owner_guids) {
+       elgg_deprecated_notice('elgg_get_entity_owner_where_sql() is deprecated by elgg_get_guid_based_where_sql().', 1.8);
+
+       return elgg_get_guid_based_where_sql("{$table}.owner_guid", $owner_guids);
+}
+
+function list_entities_from_access_id($access_id, $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = true, $pagination = true) {
+       elgg_deprecated_notice("All list_entities* functions were deprecated in 1.8.  Use elgg_list_entities* instead.", 1.8);
+
+       echo elgg_list_entities_from_access_id(array('access_id' => $access_id,
+               'types' => $entity_type, 'subtypes' => $entity_subtype, 'owner_guids' => $owner_guid,
+               'limit' => $limit, 'full_view' => $fullview, 'list_type_toggle' => $listtypetoggle,
+               'pagination' => $pagination,));
+}
+
+function register_action($action, $public = false, $filename = "", $admin_only = false) {
+       elgg_deprecated_notice("register_action() was deprecated by elgg_register_action()", 1.8);
+
+       if ($admin_only) {
+               $access = 'admin';
+       } elseif ($public) {
+               $access = 'public';
+       } else {
+               $access = 'logged_in';
+       }
+
+       return elgg_register_action($action, $filename, $access);
+}
+
+function extend_elgg_admin_page($new_admin_view, $view = 'admin/main', $priority = 500) {
+       elgg_deprecated_notice('extend_elgg_admin_page() does nothing. Extend admin views manually.', 1.8);
+}
+
+function get_entities_from_annotations_calculate_x($sum = "sum", $entity_type = "", $entity_subtype = "", $name = "", $mdname = '', $mdvalue = '', $owner_guid = 0, $limit = 10, $offset = 0, $orderdir = 'desc', $count = false) {
+
+       $msg = 'get_entities_from_annotations_calculate_x() is deprecated by elgg_get_entities_from_annotation_calculation().';
+
+       elgg_deprecated_notice($msg, 1.8);
+
+       $options = array();
+
+       $options['calculation'] = $sum;
+
+       if ($entity_type) {
+               $options['types'] = $entity_type;
+       }
+
+       if ($entity_subtype) {
+               $options['subtypes'] = $entity_subtype;
+       }
+
+       $options['annotation_names'] = $name;
+
+       if ($mdname) {
+               $options['metadata_names'] = $mdname;
+       }
+
+       if ($mdvalue) {
+               $options['metadata_values'] = $mdvalue;
+       }
+
+       // original function rewrote this to container guid.
+       if ($owner_guid) {
+               if (is_array($owner_guid)) {
+                       $options['container_guids'] = $owner_guid;
+               } else {
+                       $options['container_guid'] = $owner_guid;
+               }
+       }
+
+       $options['limit'] = $limit;
+       $options['offset'] = $offset;
+
+       $options['order_by'] = "calculated $orderdir";
+
+       $options['count'] = $count;
+
+       return elgg_get_entities_from_annotation_calculation($options);
+}
+
+function get_entities_from_annotation_count($entity_type = "", $entity_subtype = "", $name = "", $mdname = '', $mdvalue = '', $owner_guid = 0, $limit = 10, $offset = 0, $orderdir = 'desc', $count = false) {
+
+       $msg = 'get_entities_from_annotation_count() is deprecated by elgg_get_entities_from_annotation_calculation().';
+
+       elgg_deprecated_notice($msg, 1.8);
+
+       $options = array();
+
+       $options['calculation'] = 'sum';
+
+       if ($entity_type) {
+               $options['types'] = $entity_type;
+       }
+
+       if ($entity_subtype) {
+               $options['subtypes'] = $entity_subtype;
+       }
+
+       $options['annotation_names'] = $name;
+
+       if ($mdname) {
+               $options['metadata_names'] = $mdname;
+       }
+
+       if ($mdvalue) {
+               $options['metadata_values'] = $mdvalue;
+       }
+
+       if ($owner_guid) {
+               if (is_array($owner_guid)) {
+                       $options['owner_guids'] = $owner_guid;
+               } else {
+                       $options['owner_guid'] = $owner_guid;
+               }
+       }
+
+       $options['limit'] = $limit;
+       $options['offset'] = $offset;
+
+       $options['order_by'] = "calculated $orderdir";
+
+       $options['count'] = $count;
+
+       return elgg_get_entities_from_annotation_calculation($options);
+}
+
+function list_entities_from_annotation_count($entity_type = "", $entity_subtype = "", $name = "", $limit = 10, $owner_guid = 0, $group_guid = 0, $asc = false, $fullview = true, $listtypetoggle = false, $pagination = true, $orderdir = 'desc') {
+
+       $msg = 'list_entities_from_annotation_count() is deprecated by elgg_list_entities_from_annotation_calculation().';
+
+       elgg_deprecated_notice($msg, 1.8);
+
+       $options = array();
+
+       $options['calculation'] = 'sum';
+
+       if ($entity_type) {
+               $options['types'] = $entity_type;
+       }
+
+       if ($entity_subtype) {
+               $options['subtypes'] = $entity_subtype;
+       }
+
+       $options['annotation_names'] = $name;
+
+       if ($owner_guid) {
+               if (is_array($owner_guid)) {
+                       $options['owner_guids'] = $owner_guid;
+               } else {
+                       $options['owner_guid'] = $owner_guid;
+               }
+       }
+
+       $options['full_view'] = $fullview;
+
+       $options['list_type_toggle'] = $listtypetoggle;
+
+       $options['pagination'] = $pagination;
+
+       $options['limit'] = $limit;
+
+       $options['order_by'] = "calculated $orderdir";
+
+       return elgg_get_entities_from_annotation_calculation($options);
+}
+
+function get_register($register_name) {
+       elgg_deprecated_notice("get_register() has been deprecated", 1.8);
+       global $CONFIG;
+
+       if (isset($CONFIG->registers[$register_name])) {
+               return $CONFIG->registers[$register_name];
+       }
+
+       return false;
+}
+
+function events($event = "", $object_type = "", $function = "", $priority = 500, $call = false, $object = null) {
+
+       elgg_deprecated_notice('events() has been deprecated.', 1.8);
+
+       // leaving this here just in case someone was directly calling this internal function
+       if (!$call) {
+               return elgg_register_event_handler($event, $object_type, $function, $priority);
+       } else {
+               return trigger_elgg_event($event, $object_type, $object);
+       }
+}
+
+function register_elgg_event_handler($event, $object_type, $callback, $priority = 500) {
+       elgg_deprecated_notice("register_elgg_event_handler() was deprecated by elgg_register_event_handler()", 1.8);
+       return elgg_register_event_handler($event, $object_type, $callback, $priority);
+}
+
+function unregister_elgg_event_handler($event, $object_type, $callback) {
+       elgg_deprecated_notice('unregister_elgg_event_handler => elgg_unregister_event_handler', 1.8);
+       elgg_unregister_event_handler($event, $object_type, $callback);
+}
+
+function trigger_elgg_event($event, $object_type, $object = null) {
+       elgg_deprecated_notice('trigger_elgg_event() was deprecated by elgg_trigger_event()', 1.8);
+       return elgg_trigger_event($event, $object_type, $object);
+}
+
+function register_plugin_hook($hook, $type, $callback, $priority = 500) {
+       elgg_deprecated_notice("register_plugin_hook() was deprecated by elgg_register_plugin_hook_handler()", 1.8);
+       return elgg_register_plugin_hook_handler($hook, $type, $callback, $priority);
+}
+
+function unregister_plugin_hook($hook, $entity_type, $callback) {
+       elgg_deprecated_notice("unregister_plugin_hook() was deprecated by elgg_unregister_plugin_hook_handler()", 1.8);
+       elgg_unregister_plugin_hook_handler($hook, $entity_type, $callback);
+}
+
+function trigger_plugin_hook($hook, $type, $params = null, $returnvalue = null) {
+       elgg_deprecated_notice("trigger_plugin_hook() was deprecated by elgg_trigger_plugin_hook()", 1.8);
+       return elgg_trigger_plugin_hook($hook, $type, $params, $returnvalue);
+}
+
+function call_gatekeeper($function, $file = "") {
+       elgg_deprecated_notice("call_gatekeeper() is neat but pointless", 1.8);
+       // Sanity check
+       if (!$function) {
+               return false;
+       }
+
+       // Check against call stack to see if this is being called from the correct location
+       $callstack = debug_backtrace();
+       $stack_element = false;
+
+       foreach ($callstack as $call) {
+               if (is_array($function)) {
+                       if ((strcmp($call['class'], $function[0]) == 0) && (strcmp($call['function'], $function[1]) == 0)) {
+                               $stack_element = $call;
+                       }
+               } else {
+                       if (strcmp($call['function'], $function) == 0) {
+                               $stack_element = $call;
+                       }
+               }
+       }
+
+       if (!$stack_element) {
+               return false;
+       }
+
+       // If file then check that this it is being called from this function
+       if ($file) {
+               $mirror = null;
+
+               if (is_array($function)) {
+                       $mirror = new ReflectionMethod($function[0], $function[1]);
+               } else {
+                       $mirror = new ReflectionFunction($function);
+               }
+
+               if ((!$mirror) || (strcmp($file, $mirror->getFileName()) != 0)) {
+                       return false;
+               }
+       }
+
+       return true;
+}
+
+function callpath_gatekeeper($path, $include_subdirs = true, $strict_mode = false) {
+       elgg_deprecated_notice("callpath_gatekeeper() is neat but pointless", 1.8);
+
+       global $CONFIG;
+
+       $path = sanitise_string($path);
+
+       if ($path) {
+               $callstack = debug_backtrace();
+
+               foreach ($callstack as $call) {
+                       $call['file'] = str_replace("\\", "/", $call['file']);
+
+                       if ($include_subdirs) {
+                               if (strpos($call['file'], $path) === 0) {
+
+                                       if ($strict_mode) {
+                                               $callstack[1]['file'] = str_replace("\\", "/", $callstack[1]['file']);
+                                               if ($callstack[1] === $call) {
+                                                       return true;
+                                               }
+                                       } else {
+                                               return true;
+                                       }
+                               }
+                       } else {
+                               if (strcmp($path, $call['file']) == 0) {
+                                       if ($strict_mode) {
+                                               if ($callstack[1] === $call) {
+                                                       return true;
+                                               }
+                                       } else {
+                                               return true;
+                                       }
+                               }
+                       }
+
+               }
+               return false;
+       }
+
+       if (isset($CONFIG->debug)) {
+               system_message("Gatekeeper'd function called from {$callstack[1]['file']}:" . "{$callstack[1]['line']}\n\nStack trace:\n\n" . print_r($callstack, true));
+       }
+
+       return false;
+}
+
+function get_objects_in_group($group_guid, $subtype = "", $owner_guid = 0, $site_guid = 0, $order_by = "", $limit = 10, $offset = 0, $count = FALSE) {
+       elgg_deprecated_notice("get_objects_in_group was deprected in 1.8.  Use elgg_get_entities() instead", 1.8);
+
+       global $CONFIG;
+
+       if ($subtype === FALSE || $subtype === null || $subtype === 0) {
+               return FALSE;
+       }
+
+       if ($order_by == "") {
+               $order_by = "e.time_created desc";
+       }
+       $order_by = sanitise_string($order_by);
+       $limit = (int)$limit;
+       $offset = (int)$offset;
+       $site_guid = (int)$site_guid;
+       if ($site_guid == 0) {
+               $site_guid = $CONFIG->site_guid;
+       }
+
+       $container_guid = (int)$group_guid;
+       if ($container_guid == 0) {
+               $container_guid = elgg_get_page_owner_guid();
+       }
+
+       $where = array();
+
+       $where[] = "e.type='object'";
+
+       if (!empty($subtype)) {
+               if (!$subtype = get_subtype_id('object', $subtype)) {
+                       return FALSE;
+               }
+               $where[] = "e.subtype=$subtype";
+       }
+       if ($owner_guid != "") {
+               if (!is_array($owner_guid)) {
+                       $owner_guid = (int)$owner_guid;
+                       $where[] = "e.container_guid = '$owner_guid'";
+               } else if (sizeof($owner_guid) > 0) {
+                       // Cast every element to the owner_guid array to int
+                       $owner_guid = array_map("sanitise_int", $owner_guid);
+                       $owner_guid = implode(",", $owner_guid);
+                       $where[] = "e.container_guid in ({$owner_guid})";
+               }
+       }
+       if ($site_guid > 0) {
+               $where[] = "e.site_guid = {$site_guid}";
+       }
+
+       if ($container_guid > 0) {
+               $where[] = "e.container_guid = {$container_guid}";
+       }
+
+       if (!$count) {
+               $query = "SELECT * from {$CONFIG->dbprefix}entities e" . " join {$CONFIG->dbprefix}objects_entity o on e.guid=o.guid where ";
+       } else {
+               $query = "SELECT count(e.guid) as total from {$CONFIG->dbprefix}entities e" . " join {$CONFIG->dbprefix}objects_entity o on e.guid=o.guid where ";
+       }
+       foreach ($where as $w) {
+               $query .= " $w and ";
+       }
+
+       // Add access controls
+       $query .= get_access_sql_suffix('e');
+       if (!$count) {
+               $query .= " order by $order_by";
+
+               // Add order and limit
+               if ($limit) {
+                       $query .= " limit $offset, $limit";
+               }
+
+               $dt = get_data($query, "entity_row_to_elggstar");
+               return $dt;
+       } else {
+               $total = get_data_row($query);
+               return $total->total;
+       }
+}
+
+function list_entities_groups($subtype = "", $owner_guid = 0, $container_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = true, $pagination = true) {
+       elgg_deprecated_notice("list_entities_groups was deprecated in 1.8.  Use elgg_list_entities() instead.", 1.8);
+       $offset = (int)get_input('offset');
+       $count = get_objects_in_group($container_guid, $subtype, $owner_guid, 0, "", $limit, $offset, true);
+       $entities = get_objects_in_group($container_guid, $subtype, $owner_guid, 0, "", $limit, $offset);
+
+       return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $listtypetoggle, $pagination);
+}
+
+function get_entities_from_metadata_groups($group_guid, $meta_name, $meta_value = "", $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $offset = 0, $order_by = "", $site_guid = 0, $count = false) {
+       elgg_deprecated_notice("get_entities_from_metadata_groups was deprecated in 1.8.", 1.8);
+       global $CONFIG;
+
+       $meta_n = get_metastring_id($meta_name);
+       $meta_v = get_metastring_id($meta_value);
+
+       $entity_type = sanitise_string($entity_type);
+       $entity_subtype = get_subtype_id($entity_type, $entity_subtype);
+       $limit = (int)$limit;
+       $offset = (int)$offset;
+       if ($order_by == "") {
+               $order_by = "e.time_created desc";
+       }
+       $order_by = sanitise_string($order_by);
+       $site_guid = (int)$site_guid;
+       if (is_array($owner_guid)) {
+               foreach ($owner_guid as $key => $guid) {
+                       $owner_guid[$key] = (int)$guid;
+               }
+       } else {
+               $owner_guid = (int)$owner_guid;
+       }
+       if ($site_guid == 0) {
+               $site_guid = $CONFIG->site_guid;
+       }
+
+       $container_guid = (int)$group_guid;
+       if ($container_guid == 0) {
+               $container_guid = elgg_get_page_owner_guid();
+       }
+
+       $where = array();
+
+       if ($entity_type != "") {
+               $where[] = "e.type='$entity_type'";
+       }
+       if ($entity_subtype) {
+               $where[] = "e.subtype=$entity_subtype";
+       }
+       if ($meta_name != "") {
+               $where[] = "m.name_id='$meta_n'";
+       }
+       if ($meta_value != "") {
+               $where[] = "m.value_id='$meta_v'";
+       }
+       if ($site_guid > 0) {
+               $where[] = "e.site_guid = {$site_guid}";
+       }
+       if ($container_guid > 0) {
+               $where[] = "e.container_guid = {$container_guid}";
+       }
+
+       if (is_array($owner_guid)) {
+               $where[] = "e.container_guid in (" . implode(",", $owner_guid) . ")";
+       } else if ($owner_guid > 0) {
+               $where[] = "e.container_guid = {$owner_guid}";
+       }
+
+       if (!$count) {
+               $query = "SELECT distinct e.* ";
+       } else {
+               $query = "SELECT count(e.guid) as total ";
+       }
+
+       $query .= "from {$CONFIG->dbprefix}entities e" . " JOIN {$CONFIG->dbprefix}metadata m on e.guid = m.entity_guid " . " JOIN {$CONFIG->dbprefix}objects_entity o on e.guid = o.guid where";
+
+       foreach ($where as $w) {
+               $query .= " $w and ";
+       }
+
+       // Add access controls
+       $query .= get_access_sql_suffix("e");
+
+       if (!$count) {
+               $query .= " order by $order_by limit $offset, $limit"; // Add order and limit
+               return get_data($query, "entity_row_to_elggstar");
+       } else {
+               if ($row = get_data_row($query)) {
+                       return $row->total;
+               }
+       }
+       return false;
+}
+
+function get_entities_from_metadata_groups_multi($group_guid, $meta_array, $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $offset = 0, $order_by = "", $site_guid = 0, $count = false) {
+       elgg_deprecated_notice("get_entities_from_metadata_groups_multi was deprecated in 1.8.", 1.8);
+
+       global $CONFIG;
+
+       if (!is_array($meta_array) || sizeof($meta_array) == 0) {
+               return false;
+       }
+
+       $where = array();
+
+       $mindex = 1;
+       $join = "";
+       foreach ($meta_array as $meta_name => $meta_value) {
+               $meta_n = get_metastring_id($meta_name);
+               $meta_v = get_metastring_id($meta_value);
+               $join .= " JOIN {$CONFIG->dbprefix}metadata m{$mindex} on e.guid = m{$mindex}.entity_guid" . " JOIN {$CONFIG->dbprefix}objects_entity o on e.guid = o.guid ";
+
+               if ($meta_name != "") {
+                       $where[] = "m{$mindex}.name_id='$meta_n'";
+               }
+
+               if ($meta_value != "") {
+                       $where[] = "m{$mindex}.value_id='$meta_v'";
+               }
+
+               $mindex++;
+       }
+
+       $entity_type = sanitise_string($entity_type);
+       $entity_subtype = get_subtype_id($entity_type, $entity_subtype);
+       $limit = (int)$limit;
+       $offset = (int)$offset;
+       if ($order_by == "") {
+               $order_by = "e.time_created desc";
+       }
+       $order_by = sanitise_string($order_by);
+       $owner_guid = (int)$owner_guid;
+
+       $site_guid = (int)$site_guid;
+       if ($site_guid == 0) {
+               $site_guid = $CONFIG->site_guid;
+       }
+
+       //$access = get_access_list();
+
+       if ($entity_type != "") {
+               $where[] = "e.type = '{$entity_type}'";
+       }
+
+       if ($entity_subtype) {
+               $where[] = "e.subtype = {$entity_subtype}";
+       }
+
+       if ($site_guid > 0) {
+               $where[] = "e.site_guid = {$site_guid}";
+       }
+
+       if ($owner_guid > 0) {
+               $where[] = "e.owner_guid = {$owner_guid}";
+       }
+
+       if ($container_guid > 0) {
+               $where[] = "e.container_guid = {$container_guid}";
+       }
+
+       if ($count) {
+               $query = "SELECT count(e.guid) as total ";
+       } else {
+               $query = "SELECT distinct e.* ";
+       }
+
+       $query .= " from {$CONFIG->dbprefix}entities e {$join} where";
+       foreach ($where as $w) {
+               $query .= " $w and ";
+       }
+       $query .= get_access_sql_suffix("e"); // Add access controls
+
+       if (!$count) {
+               $query .= " order by $order_by limit $offset, $limit"; // Add order and limit
+               return get_data($query, "entity_row_to_elggstar");
+       } else {
+               if ($count = get_data_row($query)) {
+                       return $count->total;
+               }
+       }
+       return false;
+}
+
+function list_entities_in_area($lat, $long, $radius, $type = "", $subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = false, $navigation = true) {
+       elgg_deprecated_notice('list_entities_in_area() was deprecated. Use elgg_list_entities_from_location()', 1.8);
+
+       $options = array();
+
+       $options['latitude'] = $lat;
+       $options['longitude'] = $long;
+       $options['distance'] = $radius;
+
+       if ($type) {
+               $options['types'] = $type;
+       }
+
+       if ($subtype) {
+               $options['subtypes'] = $subtype;
+       }
+
+       if ($owner_guid) {
+               if (is_array($owner_guid)) {
+                       $options['owner_guids'] = $owner_guid;
+               } else {
+                       $options['owner_guid'] = $owner_guid;
+               }
+       }
+
+       $options['limit'] = $limit;
+
+       $options['full_view'] = $fullview;
+       $options['list_type_toggle'] = $listtypetoggle;
+       $options['pagination'] = $pagination;
+
+       return elgg_list_entities_from_location($options);
+}
+
+function list_entities_location($location, $type = "", $subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = false, $navigation = true) {
+       elgg_deprecated_notice('list_entities_location() was deprecated. Use elgg_list_entities_from_metadata()', 1.8);
+
+       return list_entities_from_metadata('location', $location, $type, $subtype, $owner_guid, $limit, $fullview, $listtypetoggle, $navigation);
+}
+
+function get_entities_in_area($lat, $long, $radius, $type = "", $subtype = "", $owner_guid = 0, $order_by = "", $limit = 10, $offset = 0, $count = false, $site_guid = 0, $container_guid = NULL) {
+       elgg_deprecated_notice('get_entities_in_area() was deprecated by elgg_get_entities_from_location()!', 1.8);
+
+       $options = array();
+
+       $options['latitude'] = $lat;
+       $options['longitude'] = $long;
+       $options['distance'] = $radius;
+
+       // set container_guid to owner_guid to emulate old functionality
+       if ($owner_guid != "") {
+               if (is_null($container_guid)) {
+                       $container_guid = $owner_guid;
+               }
+       }
+
+       if ($type) {
+               $options['types'] = $type;
+       }
+
+       if ($subtype) {
+               $options['subtypes'] = $subtype;
+       }
+
+       if ($owner_guid) {
+               if (is_array($owner_guid)) {
+                       $options['owner_guids'] = $owner_guid;
+               } else {
+                       $options['owner_guid'] = $owner_guid;
+               }
+       }
+
+       if ($container_guid) {
+               if (is_array($container_guid)) {
+                       $options['container_guids'] = $container_guid;
+               } else {
+                       $options['container_guid'] = $container_guid;
+               }
+       }
+
+       $options['limit'] = $limit;
+
+       if ($offset) {
+               $options['offset'] = $offset;
+       }
+
+       if ($order_by) {
+               $options['order_by'];
+       }
+
+       if ($site_guid) {
+               $options['site_guid'];
+       }
+
+       if ($count) {
+               $options['count'] = $count;
+       }
+
+       return elgg_get_entities_from_location($options);
+}
+
+function list_entities_from_metadata($meta_name, $meta_value = "", $entity_type = ELGG_ENTITIES_ANY_VALUE, $entity_subtype = ELGG_ENTITIES_ANY_VALUE, $owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = true, $pagination = true, $case_sensitive = true) {
+
+       elgg_deprecated_notice('list_entities_from_metadata() was deprecated by elgg_list_entities_from_metadata()!', 1.8);
+
+       $offset = (int)get_input('offset');
+       $limit = (int)$limit;
+       $options = array('metadata_name' => $meta_name, 'metadata_value' => $meta_value,
+               'types' => $entity_type, 'subtypes' => $entity_subtype, 'owner_guid' => $owner_guid,
+               'limit' => $limit, 'offset' => $offset, 'count' => TRUE,
+               'metadata_case_sensitive' => $case_sensitive);
+       $count = elgg_get_entities_from_metadata($options);
+
+       $options['count'] = FALSE;
+       $entities = elgg_get_entities_from_metadata($options);
+
+       return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $listtypetoggle, $pagination);
+}
+
+function list_entities_from_metadata_multi($meta_array, $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = true, $pagination = true) {
+       elgg_deprecated_notice(elgg_echo('deprecated:function', array(
+               'list_entities_from_metadata_multi', 'elgg_get_entities_from_metadata')), 1.8);
+
+       $offset = (int)get_input('offset');
+       $limit = (int)$limit;
+       $count = get_entities_from_metadata_multi($meta_array, $entity_type, $entity_subtype, $owner_guid, $limit, $offset, "", $site_guid, true);
+       $entities = get_entities_from_metadata_multi($meta_array, $entity_type, $entity_subtype, $owner_guid, $limit, $offset, "", $site_guid, false);
+
+       return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $listtypetoggle, $pagination);
+}
+
+function add_submenu_item($label, $link, $group = 'default', $onclick = false, $selected = NULL) {
+       elgg_deprecated_notice('add_submenu_item was deprecated by elgg_register_menu_item', 1.8);
+
+       // submenu items were added in the page setup hook usually by checking
+       // the context.  We'll pass in the current context here, which will
+       // emulate that effect.
+       // if context == 'main' (default) it probably means they always wanted
+       // the menu item to show up everywhere.
+       $context = elgg_get_context();
+
+       if ($context == 'main') {
+               $context = 'all';
+       }
+
+       $item = array('name' => $label, 'title' => $label, 'url' => $link, 'context' => $context,
+               'section' => $group,);
+
+       if ($selected) {
+               $item['selected'] = true;
+       }
+
+       if ($onclick) {
+               $js = "onclick=\"javascript:return confirm('" . elgg_echo('deleteconfirm') . "')\"";
+               $item['vars'] = array('js' => $js);
+       }
+
+       return elgg_register_menu_item('page', $item);
+}
+
+function get_submenu() {
+       elgg_deprecated_notice("get_submenu() has been deprecated by elgg_view_menu()", 1.8);
+       return elgg_view_menu('owner_block', array('entity' => $owner,
+               'class' => 'elgg-owner-block-menu',));
+}
+
+function add_menu($menu_name, $menu_url, $menu_children = array(), $context = "") {
+       elgg_deprecated_notice('add_menu() deprecated by elgg_register_menu_item()', 1.8);
+
+       return elgg_register_menu_item('site', array('name' => $menu_name, 'title' => $menu_name,
+               'url' => $menu_url,));
+}
+
+function remove_menu($menu_name) {
+       elgg_deprecated_notice("remove_menu() deprecated by elgg_unregister_menu_item()", 1.8);
+       return elgg_unregister_menu_item('site', $menu_name);
+}
+
+function friendly_title($title) {
+       elgg_deprecated_notice('friendly_title was deprecated by elgg_get_friendly_title', 1.8);
+       return elgg_get_friendly_title($title);
+}
+
+function friendly_time($time) {
+       elgg_deprecated_notice('friendly_time was deprecated by elgg_view_friendly_time', 1.8);
+       return elgg_view_friendly_time($time);
+}
+
+function filter_string($string) {
+       elgg_deprecated_notice('filter_string() was deprecated!', 1.8);
+
+       // Convert it to lower and trim
+       $string = strtolower($string);
+       $string = trim($string);
+
+       // Remove links and email addresses
+       // match protocol://address/path/file.extension?some=variable&another=asf%
+       $string = preg_replace("/\s([a-zA-Z]+:\/\/[a-z][a-z0-9\_\.\-]*[a-z]{2,6}" . "[a-zA-Z0-9\/\*\-\?\&\%\=]*)([\s|\.|\,])/iu", " ", $string);
+
+       // match www.something.domain/path/file.extension?some=variable&another=asf%
+       $string = preg_replace("/\s(www\.[a-z][a-z0-9\_\.\-]*[a-z]{2,6}" . "[a-zA-Z0-9\/\*\-\?\&\%\=]*)([\s|\.|\,])/iu", " ", $string);
+
+       // match name@address
+       $string = preg_replace("/\s([a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]" . "*\@[a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]{2,6})([\s|\.|\,])/iu", " ", $string);
+
+       // Sanitise the string; remove unwanted characters
+       $string = preg_replace('/\W/ui', ' ', $string);
+
+       // Explode it into an array
+       $terms = explode(' ', $string);
+
+       // Remove any blacklist terms
+       //$terms = array_filter($terms, 'remove_blacklist');
+
+       return $terms;
+}
+
+function remove_blacklist($input) {
+       elgg_deprecated_notice('remove_blacklist() was deprecated!', 1.8);
+
+       global $CONFIG;
+
+       if (!is_array($CONFIG->wordblacklist)) {
+               return $input;
+       }
+
+       if (strlen($input) < 3 || in_array($input, $CONFIG->wordblacklist)) {
+               return false;
+       }
+
+       return true;
+}
+
+function page_owner() {
+       elgg_deprecated_notice('page_owner() was deprecated by elgg_get_page_owner_guid().', 1.8);
+       return elgg_get_page_owner_guid();
+}
+
+function page_owner_entity() {
+       elgg_deprecated_notice('page_owner_entity() was deprecated by elgg_get_page_owner_entity().', 1.8);
+       return elgg_get_page_owner_entity();
+}
+
+function add_page_owner_handler($functionname) {
+       elgg_deprecated_notice("add_page_owner_handler() was deprecated by the plugin hook 'page_owner', 'system'.", 1.8);
+}
+
+function set_page_owner($entitytoset = -1) {
+       elgg_deprecated_notice('set_page_owner() was deprecated by elgg_set_page_owner_guid().', 1.8);
+       elgg_set_page_owner_guid($entitytoset);
+}
+
+function set_context($context) {
+       elgg_deprecated_notice('set_context() was deprecated by elgg_set_context().', 1.8);
+       elgg_set_context($context);
+       if (empty($context)) {
+               return false;
+       }
+       return $context;
+}
+
+function get_context() {
+       elgg_deprecated_notice('get_context() was deprecated by elgg_get_context().', 1.8);
+       return elgg_get_context();
+
+       // @todo - used to set context based on calling script
+       // $context = get_plugin_name(true)
+}
+
+function get_installed_plugins($status = 'all') {
+       global $CONFIG;
+
+       elgg_deprecated_notice('get_installed_plugins() was deprecated by elgg_get_plugins()', 1.8);
+
+       $plugins = elgg_get_plugins($status);
+
+       if (!$plugins) {
+               return array();
+       }
+
+       $installed_plugins = array();
+
+       foreach ($plugins as $plugin) {
+               if (!$plugin->isValid()) {
+                       continue;
+               }
+
+               $installed_plugins[$plugin->getID()] = array(
+                       'active' => $plugin->isActive(),
+                       'manifest' => $plugin->manifest->getManifest()
+               );
+       }
+
+       return $installed_plugins;
+}
+
+function enable_plugin($plugin, $site_guid = null) {
+       elgg_deprecated_notice('enable_plugin() was deprecated by ElggPlugin->activate()', 1.8);
+
+       $plugin = sanitise_string($plugin);
+
+       $site_guid = (int) $site_guid;
+       if (!$site_guid) {
+               $site = get_config('site');
+               $site_guid = $site->guid;
+       }
+
+       try {
+               $plugin = new ElggPlugin($plugin);
+       } catch(Exception $e) {
+               return false;
+       }
+
+       if (!$plugin->canActivate($site_guid)) {
+               return false;
+       }
+
+       return $plugin->activate($site_guid);
+}
+
+function disable_plugin($plugin, $site_guid = 0) {
+       elgg_deprecated_notice('disable_plugin() was deprecated by ElggPlugin->deactivate()', 1.8);
+
+       $plugin = sanitise_string($plugin);
+
+       $site_guid = (int) $site_guid;
+       if (!$site_guid) {
+               $site = get_config('site');
+               $site_guid = $site->guid;
+       }
+
+       try {
+               $plugin = new ElggPlugin($plugin);
+       } catch(Exception $e) {
+               return false;
+       }
+
+       return $plugin->deactivate($site_guid);
+}
+
+function is_plugin_enabled($plugin, $site_guid = 0) {
+       elgg_deprecated_notice('is_plugin_enabled() was deprecated by ElggPlugin->isActive()', 1.8);
+
+       $plugin = sanitise_string($plugin);
+
+       $site_guid = (int) $site_guid;
+       if (!$site_guid) {
+               $site = get_config('site');
+               $site_guid = $site->guid;
+       }
+
+       try {
+               $plugin = new ElggPlugin($plugin);
+       } catch(Exception $e) {
+               return false;
+       }
+
+       return $plugin->isActive($site_guid);
+}
+
+function get_plugin_list() {
+       elgg_deprecated_notice('get_plugin_list() is deprecated by elgg_get_plugin_ids_in_dir() or elgg_get_plugins()', 1.8);
+
+       $plugins = elgg_get_plugins('any');
+
+       $list = array();
+       if ($plugins) {
+               foreach ($plugins as $i => $plugin) {
+                       // in <=1.7 this returned indexed by multiples of 10.
+                       // uh...sure...why not.
+                       $index = ($i + 1) * 10;
+                       $list[$index] = $plugin->getID();
+               }
+       }
+
+       return $list;
+}
+
+function regenerate_plugin_list($pluginorder = FALSE) {
+       $msg = 'regenerate_plugin_list() is (sorta) deprecated by elgg_generate_plugin_entities() and'
+                       . ' elgg_set_plugin_priorities().';
+       elgg_deprecated_notice($msg, 1.8);
+
+       // they're probably trying to set it?
+       if ($pluginorder) {
+               if (elgg_generate_plugin_entities()) {
+                       // sort the plugins by the index numerically since we used
+                       // weird indexes in the old system.
+                       ksort($pluginorder, SORT_NUMERIC);
+                       return elgg_set_plugin_priorities($pluginorder);
+               }
+               return false;
+       } else {
+               // they're probably trying to regenerate from disk?
+               return elgg_generate_plugin_entities();
+       }
+}
+
+function get_plugin_name($mainfilename = false) {
+       elgg_deprecated_notice('get_plugin_name() is deprecated by elgg_get_calling_plugin_id()', 1.8);
+
+       return elgg_get_calling_plugin_id($mainfilename);
+}
+
+function load_plugin_manifest($plugin) {
+       elgg_deprecated_notice('load_plugin_manifest() is deprecated by ElggPlugin->getManifest()', 1.8);
+
+       $xml_file = elgg_get_plugin_path() . "$plugin/manifest.xml";
+
+       try {
+               $manifest = new ElggPluginManifest($xml_file, $plugin);
+       } catch(Exception $e) {
+               return false;
+       }
+
+       return $manifest->getManifest();
+}
+
+function check_plugin_compatibility($manifest_elgg_version_string) {
+       elgg_deprecated_notice('check_plugin_compatibility() is deprecated by ElggPlugin->canActivate()', 1.8);
+
+       $version = get_version();
+
+       if (strpos($manifest_elgg_version_string, '.') === false) {
+               // Using version
+               $req_version = (int)$manifest_elgg_version_string;
+
+               return ($version >= $req_version);
+       }
+
+       return false;
+}
+
+function find_plugin_settings($plugin_id = null) {
+       elgg_deprecated_notice('find_plugin_setting() is deprecated by elgg_get_calling_plugin_entity() or elgg_get_plugin_from_id()', 1.8);
+       if ($plugin_id) {
+               return elgg_get_plugin_from_id($plugin_id);
+       } else {
+               return elgg_get_calling_plugin_entity();
+       }
+}
+
+function get_entities_from_private_setting($name = "", $value = "", $type = "", $subtype = "",
+$owner_guid = 0, $order_by = "", $limit = 10, $offset = 0, $count = false, $site_guid = 0,
+$container_guid = null) {
+       elgg_deprecated_notice('get_entities_from_private_setting() was deprecated by elgg_get_entities_from_private_setting()!', 1.8);
+
+       $options = array();
+
+       $options['private_setting_name'] = $name;
+       $options['private_setting_value'] = $value;
+
+       // set container_guid to owner_guid to emulate old functionality
+       if ($owner_guid != "") {
+               if (is_null($container_guid)) {
+                       $container_guid = $owner_guid;
+               }
+       }
+
+       if ($type) {
+               $options['types'] = $type;
+       }
+
+       if ($subtype) {
+               $options['subtypes'] = $subtype;
+       }
+
+       if ($owner_guid) {
+               if (is_array($owner_guid)) {
+                       $options['owner_guids'] = $owner_guid;
+               } else {
+                       $options['owner_guid'] = $owner_guid;
+               }
+       }
+
+       if ($container_guid) {
+               if (is_array($container_guid)) {
+                       $options['container_guids'] = $container_guid;
+               } else {
+                       $options['container_guid'] = $container_guid;
+               }
+       }
+
+       $options['limit'] = $limit;
+
+       if ($offset) {
+               $options['offset'] = $offset;
+       }
+
+       if ($order_by) {
+               $options['order_by'];
+       }
+
+       if ($site_guid) {
+               $options['site_guid'];
+       }
+
+       if ($count) {
+               $options['count'] = $count;
+       }
+
+       return elgg_get_entities_from_private_settings($options);
+}
+
+function get_entities_from_private_setting_multi(array $name, $type = "", $subtype = "",
+$owner_guid = 0, $order_by = "", $limit = 10, $offset = 0, $count = false,
+$site_guid = 0, $container_guid = null) {
+
+       elgg_deprecated_notice('get_entities_from_private_setting_multi() was deprecated by elgg_get_entities_from_private_setting()!', 1.8);
+
+       $options = array();
+
+       $pairs = array();
+       foreach ($name as $setting_name => $setting_value) {
+               $pairs[] = array('name' => $setting_name, 'value' => $setting_value);
+       }
+       $options['private_setting_name_value_pairs'] = $pairs;
+
+       // set container_guid to owner_guid to emulate old functionality
+       if ($owner_guid != "") {
+               if (is_null($container_guid)) {
+                       $container_guid = $owner_guid;
+               }
+       }
+
+       if ($type) {
+               $options['types'] = $type;
+       }
+
+       if ($subtype) {
+               $options['subtypes'] = $subtype;
+       }
+
+       if ($owner_guid) {
+               if (is_array($owner_guid)) {
+                       $options['owner_guids'] = $owner_guid;
+               } else {
+                       $options['owner_guid'] = $owner_guid;
+               }
+       }
+
+       if ($container_guid) {
+               if (is_array($container_guid)) {
+                       $options['container_guids'] = $container_guid;
+               } else {
+                       $options['container_guid'] = $container_guid;
+               }
+       }
+
+       $options['limit'] = $limit;
+
+       if ($offset) {
+               $options['offset'] = $offset;
+       }
+
+       if ($order_by) {
+               $options['order_by'];
+       }
+
+       if ($site_guid) {
+               $options['site_guid'];
+       }
+
+       if ($count) {
+               $options['count'] = $count;
+       }
+
+       return elgg_get_entities_from_private_settings($options);
+}
+// these were internal functions that perhaps can be removed rather than deprecated
+function is_db_installed() {
+       elgg_deprecated_notice('is_db_installed() has been deprecated', 1.8);
+       return true;
+}
+
+function is_installed() {
+       elgg_deprecated_notice('is_installed() has been deprecated', 1.8);
+       return true;
+}
+
+/**#@-*/
index e8d47eacae480dfa45a801bda843f3c5d9ca6763..e6c71813d24c81f0429d4a625d1e174f5ed2a45b 100644 (file)
@@ -214,7 +214,7 @@ function elgg_register_external_file($type, $url, $id, $location) {
        }
 
        if (!isset($CONFIG->externals[$type])) {
-               $CONFIG->externals[$type]  = array();
+               $CONFIG->externals[$type] = array();
        }
 
        if (!isset($CONFIG->externals[$type][$location])) {
@@ -386,22 +386,6 @@ function elgg_count_comments($entity) {
        }
 }
 
-/**
- * Returns all php files in a directory.
- *
- * @deprecated 1.7 Use elgg_get_file_list() instead
- *
- * @param string $directory  Directory to look in
- * @param array  $exceptions Array of extensions (with .!) to ignore
- * @param array  $list       A list files to include in the return
- *
- * @return array
- */
-function get_library_files($directory, $exceptions = array(), $list = array()) {
-       elgg_deprecated_notice('get_library_files() deprecated by elgg_get_file_list()', 1.7);
-       return elgg_get_file_list($directory, $exceptions, $list, array('.php'));
-}
-
 /**
  * Returns a list of files in $directory.
  *
@@ -492,7 +476,7 @@ $children_array = array()) {
        }
 
        if (!isset($CONFIG->registers[$register_name])) {
-               $CONFIG->registers[$register_name]  = array();
+               $CONFIG->registers[$register_name] = array();
        }
 
        $subregister = new stdClass;
@@ -567,25 +551,6 @@ function make_register_object($register_name, $register_value, $children_array =
        return $register;
 }
 
-/**
- * If it exists, returns a particular register as an array
- *
- * @param string $register_name The name of the register
- *
- * @return array|false Depending on success
- * @deprecated 1.8
- */
-function get_register($register_name) {
-       elgg_deprecated_notice("get_register() has been deprecated", 1.8);
-       global $CONFIG;
-
-       if (isset($CONFIG->registers[$register_name])) {
-               return $CONFIG->registers[$register_name];
-       }
-
-       return false;
-}
-
 /**
  * Queues a message to be displayed.
  *
@@ -691,33 +656,6 @@ function register_error($error) {
        return system_messages($error, "error");
 }
 
-/**
- * Deprecated events core function. Code divided between elgg_register_event_handler()
- * and trigger_elgg_event().
- *
- * @param string  $event       The type of event (eg 'init', 'update', 'delete')
- * @param string  $object_type The type of object (eg 'system', 'blog', 'user')
- * @param string  $function    The name of the function that will handle the event
- * @param int     $priority    Priority to call handler. Lower numbers called first (default 500)
- * @param boolean $call        Set to true to call the event rather than add to it (default false)
- * @param mixed   $object      Optionally, the object the event is being performed on (eg a user)
- *
- * @return true|false Depending on success
- * @deprecated 1.8 Use explicit register/trigger event functions
- */
-function events($event = "", $object_type = "", $function = "", $priority = 500,
-$call = false, $object = null) {
-
-       elgg_deprecated_notice('events() has been deprecated.', 1.8);
-
-       // leaving this here just in case someone was directly calling this internal function
-       if (!$call) {
-               return elgg_register_event_handler($event, $object_type, $function, $priority);
-       } else {
-               return trigger_elgg_event($event, $object_type, $object);
-       }
-}
-
 /**
  * Register a callback as an Elgg event handler.
  *
@@ -808,14 +746,6 @@ function elgg_register_event_handler($event, $object_type, $callback, $priority
        return TRUE;
 }
 
-/**
- * @deprecated 1.8 Use elgg_register_event_handler() instead
- */
-function register_elgg_event_handler($event, $object_type, $callback, $priority = 500) {
-       elgg_deprecated_notice("register_elgg_event_handler() was deprecated by elgg_register_event_handler()", 1.8);
-       return elgg_register_event_handler($event, $object_type, $callback, $priority);
-}
-
 /**
  * Unregisters a callback for an event.
  *
@@ -835,14 +765,6 @@ function elgg_unregister_event_handler($event, $object_type, $callback) {
        }
 }
 
-/**
- * @deprecated 1.8 Use elgg_unregister_event_handler instead
- */
-function unregister_elgg_event_handler($event, $object_type, $callback) {
-       elgg_deprecated_notice('unregister_elgg_event_handler => elgg_unregister_event_handler', 1.8);
-       elgg_unregister_event_handler($event, $object_type, $callback);
-}
-
 /**
  * Trigger an Elgg Event and run all handler callbacks registered to that event, type.
  *
@@ -906,14 +828,6 @@ function elgg_trigger_event($event, $object_type, $object = null) {
        return TRUE;
 }
 
-/**
- * @deprecated 1.8 Use elgg_trigger_event() instead
- */
-function trigger_elgg_event($event, $object_type, $object = null) {
-       elgg_deprecated_notice('trigger_elgg_event() was deprecated by elgg_trigger_event()', 1.8);
-       return elgg_trigger_event($event, $object_type, $object);
-}
-
 /**
  * Register a callback as a plugin hook handler.
  *
@@ -1011,14 +925,6 @@ function elgg_register_plugin_hook_handler($hook, $type, $callback, $priority =
        return TRUE;
 }
 
-/**
- * @deprecated 1.8 Use elgg_register_plugin_hook_handler() instead
- */
-function register_plugin_hook($hook, $type, $callback, $priority = 500) {
-       elgg_deprecated_notice("register_plugin_hook() was deprecated by elgg_register_plugin_hook_handler()", 1.8);
-       return elgg_register_plugin_hook_handler($hook, $type, $callback, $priority);
-}
-
 /**
  * Unregister a callback as a plugin hook.
  *
@@ -1038,14 +944,6 @@ function elgg_unregister_plugin_hook_handler($hook, $entity_type, $callback) {
        }
 }
 
-/**
- * @deprecated 1.8 Use elgg_unregister_plugin_hook_handler() instead
- */
-function unregister_plugin_hook($hook, $entity_type, $callback) {
-       elgg_deprecated_notice("unregister_plugin_hook() was deprecated by elgg_unregister_plugin_hook_handler()", 1.8);
-       elgg_unregister_plugin_hook_handler($hook, $entity_type, $callback);
-}
-
 /**
  * Trigger a Plugin Hook and run all handler callbacks registered to that hook:type.
  *
@@ -1120,14 +1018,6 @@ function elgg_trigger_plugin_hook($hook, $type, $params = null, $returnvalue = n
        return $returnvalue;
 }
 
-/**
- * @deprecated 1.8 Use elgg_trigger_plugin_hook() instead
- */
-function trigger_plugin_hook($hook, $type, $params = null, $returnvalue = null) {
-       elgg_deprecated_notice("trigger_plugin_hook() was deprecated by elgg_trigger_plugin_hook()", 1.8);
-       return elgg_trigger_plugin_hook($hook, $type, $params, $returnvalue);
-}
-
 /**
  * Intercepts, logs, and display uncaught exceptions.
  *
@@ -1189,8 +1079,8 @@ function _elgg_php_error_handler($errno, $errmsg, $filename, $linenum, $vars) {
                        throw new Exception($error);
                        break;
 
-               case E_WARNING :
-               case E_USER_WARNING :
+               case E_WARNING:
+               case E_USER_WARNING:
                        error_log("PHP WARNING: $error");
                        break;
 
@@ -1369,163 +1259,6 @@ function elgg_deprecated_notice($msg, $dep_version) {
        return TRUE;
 }
 
-
-/**
- * Checks if code is being called from a certain function.
- *
- * To use, call this function with the function name (and optional
- * file location) that it has to be called from, it will either
- * return true or false.
- *
- * e.g.
- *
- * function my_secure_function()
- * {
- *             if (!call_gatekeeper("my_call_function"))
- *                     return false;
- *
- *             ... do secure stuff ...
- * }
- *
- * function my_call_function()
- * {
- *             // will work
- *             my_secure_function();
- * }
- *
- * function bad_function()
- * {
- *             // Will not work
- *             my_secure_function();
- * }
- *
- * @param mixed  $function The function that this function must have in its call stack,
- *                                to test against a method pass an array containing a class and
- *                         method name.
- * @param string $file     Optional file that the function must reside in.
- *
- * @return bool
- *
- * @deprecated 1.8 A neat but pointless function
- */
-function call_gatekeeper($function, $file = "") {
-       elgg_deprecated_notice("call_gatekeeper() is neat but pointless", 1.8);
-       // Sanity check
-       if (!$function) {
-               return false;
-       }
-
-       // Check against call stack to see if this is being called from the correct location
-       $callstack = debug_backtrace();
-       $stack_element = false;
-
-       foreach ($callstack as $call) {
-               if (is_array($function)) {
-                       if (
-                               (strcmp($call['class'], $function[0]) == 0) &&
-                               (strcmp($call['function'], $function[1]) == 0)
-                       ) {
-                               $stack_element = $call;
-                       }
-               } else {
-                       if (strcmp($call['function'], $function) == 0) {
-                               $stack_element = $call;
-                       }
-               }
-       }
-
-       if (!$stack_element) {
-               return false;
-       }
-
-       // If file then check that this it is being called from this function
-       if ($file) {
-               $mirror = null;
-
-               if (is_array($function)) {
-                       $mirror = new ReflectionMethod($function[0], $function[1]);
-               } else {
-                       $mirror = new ReflectionFunction($function);
-               }
-
-               if ((!$mirror) || (strcmp($file, $mirror->getFileName()) != 0)) {
-                       return false;
-               }
-       }
-
-       return true;
-}
-
-/**
- * This function checks to see if it is being called at somepoint by a function defined somewhere
- * on a given path (optionally including subdirectories).
- *
- * This function is similar to call_gatekeeper() but returns true if it is being called
- * by a method or function which has been defined on a given path or by a specified file.
- *
- * @param string $path            The full path and filename that this function must have
- *                                in its call stack If a partial path is given and
- *                                $include_subdirs is true, then the function will return
- *                                true if called by any function in or below the specified path.
- * @param bool   $include_subdirs Are subdirectories of the path ok, or must you specify an
- *                                absolute path and filename.
- * @param bool   $strict_mode     If true then the calling method or function must be directly
- *                                called by something on $path, if false the whole call stack is
- *                                searched.
- *
- * @return void
- *
- * @deprecated 1.8 A neat but pointless function
- */
-function callpath_gatekeeper($path, $include_subdirs = true, $strict_mode = false) {
-       elgg_deprecated_notice("callpath_gatekeeper() is neat but pointless", 1.8);
-
-       global $CONFIG;
-
-       $path = sanitise_string($path);
-
-       if ($path) {
-               $callstack = debug_backtrace();
-
-               foreach ($callstack as $call) {
-                       $call['file'] = str_replace("\\", "/", $call['file']);
-
-                       if ($include_subdirs) {
-                               if (strpos($call['file'], $path) === 0) {
-
-                                       if ($strict_mode) {
-                                               $callstack[1]['file'] = str_replace("\\", "/", $callstack[1]['file']);
-                                               if ($callstack[1] === $call) {
-                                                       return true;
-                                               }
-                                       } else {
-                                               return true;
-                                       }
-                               }
-                       } else {
-                               if (strcmp($path, $call['file']) == 0) {
-                                       if ($strict_mode) {
-                                               if ($callstack[1] === $call) {
-                                                       return true;
-                                               }
-                                       } else {
-                                               return true;
-                                       }
-                               }
-                       }
-
-               }
-               return false;
-       }
-
-       if (isset($CONFIG->debug)) {
-               system_message("Gatekeeper'd function called from {$callstack[1]['file']}:"
-                       . "{$callstack[1]['line']}\n\nStack trace:\n\n" . print_r($callstack, true));
-       }
-
-       return false;
-}
-
 /**
  * Returns the current page's complete URL.
  *
@@ -1658,23 +1391,6 @@ function elgg_add_action_tokens_to_url($url, $html_encode = FALSE) {
        return elgg_http_build_url($components, $html_encode);
 }
 
-
-/**
- * Add action tokens to URL.
- *
- * @param string $url URL
- *
- * @return string
- *
- * @deprecated 1.7 final
- */
-function elgg_validate_action_url($url) {
-       elgg_deprecated_notice('elgg_validate_action_url() deprecated by elgg_add_action_tokens_to_url().',
-               '1.7b');
-
-       return elgg_add_action_tokens_to_url($url);
-}
-
 /**
  * Removes an element from a URL's query string.
  *
@@ -2010,7 +1726,7 @@ $sort_type = SORT_LOCALE_STRING) {
                } else {
                        $sort[] = NULL;
                }
-       };
+       }
 
        return array_multisort($sort, $sort_order, $sort_type, $array);
 }
@@ -2051,7 +1767,7 @@ function elgg_get_ini_setting_in_bytes($setting) {
 
        // convert INI setting when shorthand notation is used
        $last = strtolower($val[strlen($val) - 1]);
-       switch($last) {
+       switch ($last) {
                case 'g':
                        $val *= 1024;
                case 'm':
@@ -2117,30 +1833,6 @@ function elgg_normalise_plural_options_array($options, $singulars) {
        return $options;
 }
 
-/**
- * Does nothing.
- *
- * @deprecated 1.7
- * @return 0
- */
-function test_ip() {
-       elgg_deprecated_notice('test_ip() was removed because of licensing issues.', 1.7);
-
-       return 0;
-}
-
-/**
- * Does nothing.
- *
- * @return bool
- * @deprecated 1.7
- */
-function is_ip_in_array() {
-       elgg_deprecated_notice('is_ip_in_array() was removed because of licensing issues.', 1.7);
-
-       return false;
-}
-
 /**
  * Emits a shutdown:system event upon PHP shutdown, but before database connections are dropped.
  *
index aebaf17242e063eee2f4e27cff189ab580d06b02..2a3c6ba9108c9d49365661852bac72694ab0a8bd 100644 (file)
@@ -674,7 +674,6 @@ function get_entity($guid) {
        return entity_row_to_elggstar(get_entity_as_row($guid));
 }
 
-
 /**
  * Returns an array of entities with optional filtering.
  *
@@ -884,99 +883,6 @@ function elgg_get_entities(array $options = array()) {
        }
 }
 
-/**
- * Returns entities.
- *
- * @deprecated 1.7.  Use elgg_get_entities().
- *
- * @param string $type           Entity type
- * @param string $subtype        Entity subtype
- * @param int    $owner_guid     Owner GUID
- * @param string $order_by       Order by clause
- * @param int    $limit          Limit
- * @param int    $offset         Offset
- * @param bool   $count          Return a count or an array of entities
- * @param int    $site_guid      Site GUID
- * @param int    $container_guid Container GUID
- * @param int    $timelower      Lower time limit
- * @param int    $timeupper      Upper time limit
- *
- * @return array
- */
-function get_entities($type = "", $subtype = "", $owner_guid = 0, $order_by = "", $limit = 10,
-$offset = 0, $count = false, $site_guid = 0, $container_guid = null, $timelower = 0,
-$timeupper = 0) {
-
-       elgg_deprecated_notice('get_entities() was deprecated by elgg_get_entities().', 1.7);
-
-       // rewrite owner_guid to container_guid to emulate old functionality
-       if ($owner_guid != "") {
-               if (is_null($container_guid)) {
-                       $container_guid = $owner_guid;
-                       $owner_guid = NULL;
-               }
-       }
-
-       $options = array();
-       if ($type) {
-               if (is_array($type)) {
-                       $options['types'] = $type;
-               } else {
-                       $options['type'] = $type;
-               }
-       }
-
-       if ($subtype) {
-               if (is_array($subtype)) {
-                       $options['subtypes'] = $subtype;
-               } else {
-                       $options['subtype'] = $subtype;
-               }
-       }
-
-       if ($owner_guid) {
-               if (is_array($owner_guid)) {
-                       $options['owner_guids'] = $owner_guid;
-               } else {
-                       $options['owner_guid'] = $owner_guid;
-               }
-       }
-
-       if ($order_by) {
-               $options['order_by'] = $order_by;
-       }
-
-       // need to pass 0 for all option
-       $options['limit'] = $limit;
-
-       if ($offset) {
-               $options['offset'] = $offset;
-       }
-
-       if ($count) {
-               $options['count'] = $count;
-       }
-
-       if ($site_guid) {
-               $options['site_guids'] = $site_guid;
-       }
-
-       if ($container_guid) {
-               $options['container_guids'] = $container_guid;
-       }
-
-       if ($timeupper) {
-               $options['created_time_upper'] = $timeupper;
-       }
-
-       if ($timelower) {
-               $options['created_time_lower'] = $timelower;
-       }
-
-       $r = elgg_get_entities($options);
-       return $r;
-}
-
 /**
  * Returns SQL where clause for type and subtype on main entity table
  *
@@ -1178,43 +1084,6 @@ function elgg_get_guid_based_where_sql($column, $guids) {
        return $where;
 }
 
-/**
- * Returns SQL where clause for owner and containers.
- *
- * @deprecated 1.8 Use elgg_get_guid_based_where_sql();
- *
- * @param string     $table       Entity table prefix as defined in SELECT...FROM entities $table
- * @param NULL|array $owner_guids Owner GUIDs
- *
- * @return FALSE|str
- * @since 1.7.0
- * @access private
- */
-function elgg_get_entity_owner_where_sql($table, $owner_guids) {
-       elgg_deprecated_notice('elgg_get_entity_owner_where_sql() is deprecated by elgg_get_guid_based_where_sql().', 1.8);
-
-       return elgg_get_guid_based_where_sql("{$table}.owner_guid", $owner_guids);
-}
-
-/**
- * Returns SQL where clause for containers.
- *
- * @deprecated 1.8 Use elgg_get_guid_based_where_sql();
- *
- * @param string     $table           Entity table prefix as defined in
- *                                    SELECT...FROM entities $table
- * @param NULL|array $container_guids Array of container guids
- *
- * @return FALSE|string
- * @since 1.7.0
- * @access private
- */
-function elgg_get_entity_container_where_sql($table, $container_guids) {
-       elgg_deprecated_notice('elgg_get_entity_container_where_sql() is deprecated by elgg_get_guid_based_where_sql().', 1.8);
-
-       return elgg_get_guid_based_where_sql("{$table}.container_guid", $container_guids);
-}
-
 /**
  * Returns SQL where clause for entity time limits.
  *
@@ -1259,24 +1128,6 @@ $time_created_lower = NULL, $time_updated_upper = NULL, $time_updated_lower = NU
        return '';
 }
 
-/**
- * Returns SQL where clause for site entities
- *
- * @deprecated 1.8 Use elgg_get_guid_based_where_sql()
- *
- * @param string     $table      Entity table prefix as defined in SELECT...FROM entities $table
- * @param NULL|array $site_guids Array of site guids
- *
- * @return FALSE|string
- * @since 1.7.0
- * @access private
- */
-function elgg_get_entity_site_where_sql($table, $site_guids) {
-       elgg_deprecated_notice('elgg_get_entity_site_where_sql() is deprecated by elgg_get_guid_based_where_sql().', 1.8);
-
-       return elgg_get_guid_based_where_sql("{$table}.site_guid", $site_guids);
-}
-
 /**
  * Returns a string of parsed entities.
  *
@@ -1326,56 +1177,6 @@ function elgg_list_entities(array $options = array(), $getter = 'elgg_get_entiti
        return elgg_view_entity_list($entities, $options);
 }
 
-/**
- * Lists entities
- *
- * @deprecated 1.7.  Use elgg_list_entities().
- *
- * @param string $type           Entity type
- * @param string $subtype        Entity subtype
- * @param int    $owner_guid     Owner GUID
- * @param int    $limit          Limit
- * @param bool   $fullview       Display entity full views?
- * @param bool   $listtypetoggle Allow switching to gallery mode?
- * @param bool   $pagination     Show pagination?
- *
- * @return string
- */
-function list_entities($type= "", $subtype = "", $owner_guid = 0, $limit = 10, $fullview = true,
-$listtypetoggle = false, $pagination = true) {
-
-       elgg_deprecated_notice('list_entities() was deprecated by elgg_list_entities()!', 1.7);
-
-       $options = array();
-
-       // rewrite owner_guid to container_guid to emulate old functionality
-       if ($owner_guid) {
-               $options['container_guids'] = $owner_guid;
-       }
-
-       if ($type) {
-               $options['types'] = $type;
-       }
-
-       if ($subtype) {
-               $options['subtypes'] = $subtype;
-       }
-
-       if ($limit) {
-               $options['limit'] = $limit;
-       }
-
-       if ($offset = sanitise_int(get_input('offset', null))) {
-               $options['offset'] = $offset;
-       }
-
-       $options['full_view'] = $fullview;
-       $options['list_type_toggle'] = $listtypetoggle;
-       $options['pagination'] = $pagination;
-
-       return elgg_list_entities($options);
-}
-
 /**
  * Returns a list of months in which entities were updated or created.
  *
@@ -1677,25 +1478,6 @@ function delete_entity($guid, $recursive = true) {
 
 }
 
-/**
- * Delete multiple entities that match a given query.
- * This function iterates through and calls delete_entity on
- * each one, this is somewhat inefficient but lets
- * the 'delete' event be called for each entity.
- *
- * @deprecated 1.7. This is a dangerous function as it defaults to deleting everything.
- *
- * @param string $type       The type of entity (eg "user", "object" etc)
- * @param string $subtype    The arbitrary subtype of the entity
- * @param int    $owner_guid The GUID of the owning user
- *
- * @return false
- */
-function delete_entities($type = "", $subtype = "", $owner_guid = 0) {
-       elgg_deprecated_notice('delete_entities() was deprecated because no one should use it.', 1.7);
-       return false;
-}
-
 /**
  * Exports attributes generated on the fly (volatile) about an entity.
  *
@@ -2320,47 +2102,6 @@ function entities_page_handler($page) {
        }
 }
 
-/**
- * Lists entities.
- *
- * @param int  $owner_guid     Owner GUID
- * @param int  $limit          Limit
- * @param bool $fullview       Show entity full views
- * @param bool $listtypetoggle Show list type toggle
- * @param bool $allowedtypes   A string of the allowed types
- *
- * @return string
- * @deprecated 1.7.  Use elgg_list_registered_entities().
- */
-function list_registered_entities($owner_guid = 0, $limit = 10, $fullview = true,
-$listtypetoggle = false, $allowedtypes = true) {
-
-       elgg_deprecated_notice('list_registered_entities() was deprecated by elgg_list_registered_entities().', 1.7);
-
-       $options = array();
-
-       // don't want to send anything if not being used.
-       if ($owner_guid) {
-               $options['owner_guid'] = $owner_guid;
-       }
-
-       if ($limit) {
-               $options['limit'] = $limit;
-       }
-
-       if ($allowedtypes) {
-               $options['allowed_types'] = $allowedtypes;
-       }
-
-       // need to send because might be BOOL
-       $options['full_view'] = $fullview;
-       $options['list_type_toggle'] = $listtypetoggle;
-
-       $options['offset'] = get_input('offset', 0);
-
-       return elgg_list_registered_entities($options);
-}
-
 /**
  * Returns a viewable list of entities based on the registered types.
  *
@@ -2474,7 +2215,6 @@ function elgg_instanceof($entity, $type = NULL, $subtype = NULL, $class = NULL)
        return $return;
 }
 
-
 /**
  * Update the last_action column in the entities table for $guid.
  *
index e69ae60704ae86507730bdf27d8dbd9833226385..7b3f76e27e8780568e000705b11baad5d9d48b23 100644 (file)
@@ -78,23 +78,6 @@ function create_group_entity($guid, $name, $description) {
        return false;
 }
 
-/**
- * THIS FUNCTION IS DEPRECATED.
- *
- * Delete a group's extra data.
- *
- * @param int $guid The guid of the group
- *
- * @return bool
- * @deprecated 1.6
- */
-function delete_group_entity($guid) {
-       elgg_deprecated_notice("delete_group_entity has been deprecated", 1.6);
-
-       // Always return that we have deleted one row in order to not break existing code.
-       return 1;
-}
-
 /**
  * Add an object to the given group.
  *
@@ -163,352 +146,6 @@ function remove_object_from_group($group_guid, $object_guid) {
        return $object->save();
 }
 
-/**
- * Return an array of objects in a given container.
- *
- * @see get_entities()
- *
- * @param int    $group_guid The container (defaults to current page owner)
- * @param string $subtype    The subtype
- * @param int    $owner_guid Owner
- * @param int    $site_guid  The site
- * @param string $order_by   Order
- * @param int    $limit      Limit on number of elements to return, by default 10.
- * @param int    $offset     Where to start, by default 0.
- * @param bool   $count      Whether to return the entities or a count of them.
- *
- * @return array|false
- * @deprecated 1.8 Use elgg_get_entities() instead
- */
-function get_objects_in_group($group_guid, $subtype = "", $owner_guid = 0, $site_guid = 0,
-$order_by = "", $limit = 10, $offset = 0, $count = FALSE) {
-       elgg_deprecated_notice("get_objects_in_group was deprected in 1.8.  Use elgg_get_entities() instead", 1.8);
-
-       global $CONFIG;
-
-       if ($subtype === FALSE || $subtype === null || $subtype === 0) {
-               return FALSE;
-       }
-
-       if ($order_by == "") {
-               $order_by = "e.time_created desc";
-       }
-       $order_by = sanitise_string($order_by);
-       $limit = (int)$limit;
-       $offset = (int)$offset;
-       $site_guid = (int) $site_guid;
-       if ($site_guid == 0) {
-               $site_guid = $CONFIG->site_guid;
-       }
-
-       $container_guid = (int)$group_guid;
-       if ($container_guid == 0) {
-               $container_guid = elgg_get_page_owner_guid();
-       }
-
-       $where = array();
-
-       $where[] = "e.type='object'";
-
-       if (!empty($subtype)) {
-               if (!$subtype = get_subtype_id('object', $subtype)) {
-                       return FALSE;
-               }
-               $where[] = "e.subtype=$subtype";
-       }
-       if ($owner_guid != "") {
-               if (!is_array($owner_guid)) {
-                       $owner_guid = (int) $owner_guid;
-                       $where[] = "e.container_guid = '$owner_guid'";
-               } else if (sizeof($owner_guid) > 0) {
-                       // Cast every element to the owner_guid array to int
-                       $owner_guid = array_map("sanitise_int", $owner_guid);
-                       $owner_guid = implode(",", $owner_guid);
-                       $where[] = "e.container_guid in ({$owner_guid})";
-               }
-       }
-       if ($site_guid > 0) {
-               $where[] = "e.site_guid = {$site_guid}";
-       }
-
-       if ($container_guid > 0) {
-               $where[] = "e.container_guid = {$container_guid}";
-       }
-
-       if (!$count) {
-               $query = "SELECT * from {$CONFIG->dbprefix}entities e"
-                       . " join {$CONFIG->dbprefix}objects_entity o on e.guid=o.guid where ";
-       } else {
-               $query = "SELECT count(e.guid) as total from {$CONFIG->dbprefix}entities e"
-                       . " join {$CONFIG->dbprefix}objects_entity o on e.guid=o.guid where ";
-       }
-       foreach ($where as $w) {
-               $query .= " $w and ";
-       }
-
-       // Add access controls
-       $query .= get_access_sql_suffix('e');
-       if (!$count) {
-               $query .= " order by $order_by";
-
-               // Add order and limit
-               if ($limit) {
-                       $query .= " limit $offset, $limit";
-               }
-
-               $dt = get_data($query, "entity_row_to_elggstar");
-               return $dt;
-       } else {
-               $total = get_data_row($query);
-               return $total->total;
-       }
-}
-
-/**
- * Lists entities that belong to a group.
- *
- * @param string $subtype        The arbitrary subtype of the entity
- * @param int    $owner_guid     The GUID of the owning user
- * @param int    $container_guid The GUID of the containing group
- * @param int    $limit          The number of entities to display per page (default: 10)
- * @param bool   $fullview       Whether or not to display the full view (default: true)
- * @param bool   $listtypetoggle Whether or not to allow gallery view (default: true)
- * @param bool   $pagination     Whether to display pagination (default: true)
- *
- * @return string List of parsed entities
- *
- * @see elgg_list_entities()
- * @deprecated 1.8 Use elgg_list_entities() instead
- */
-function list_entities_groups($subtype = "", $owner_guid = 0, $container_guid = 0,
-$limit = 10, $fullview = true, $listtypetoggle = true, $pagination = true) {
-       elgg_deprecated_notice("list_entities_groups was deprecated in 1.8.  Use elgg_list_entities() instead.", 1.8);
-       $offset = (int) get_input('offset');
-       $count = get_objects_in_group($container_guid, $subtype, $owner_guid,
-               0, "", $limit, $offset, true);
-       $entities = get_objects_in_group($container_guid, $subtype, $owner_guid,
-               0, "", $limit, $offset);
-
-       return elgg_view_entity_list($entities, $count, $offset, $limit,
-               $fullview, $listtypetoggle, $pagination);
-}
-
-/**
- * Get all the entities from metadata from a group.
- *
- * @param int    $group_guid     The ID of the group.
- * @param mixed  $meta_name      Metadata name
- * @param mixed  $meta_value     Metadata value
- * @param string $entity_type    The type of entity to look for, eg 'site' or 'object'
- * @param string $entity_subtype The subtype of the entity.
- * @param int    $owner_guid     Owner guid
- * @param int    $limit          Limit
- * @param int    $offset         Offset
- * @param string $order_by       Optional ordering.
- * @param int    $site_guid      Site GUID. 0 for current, -1 for any
- * @param bool   $count          Return count instead of entities
- *
- * @return array|false
- * @deprecated 1.8 Use elgg_get_entities_from_metadata()
- */
-function get_entities_from_metadata_groups($group_guid, $meta_name, $meta_value = "",
-$entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $offset = 0,
-$order_by = "", $site_guid = 0, $count = false) {
-       elgg_deprecated_notice("get_entities_from_metadata_groups was deprecated in 1.8.", 1.8);
-       global $CONFIG;
-
-       $meta_n = get_metastring_id($meta_name);
-       $meta_v = get_metastring_id($meta_value);
-
-       $entity_type = sanitise_string($entity_type);
-       $entity_subtype = get_subtype_id($entity_type, $entity_subtype);
-       $limit = (int)$limit;
-       $offset = (int)$offset;
-       if ($order_by == "") {
-               $order_by = "e.time_created desc";
-       }
-       $order_by = sanitise_string($order_by);
-       $site_guid = (int) $site_guid;
-       if (is_array($owner_guid)) {
-               foreach ($owner_guid as $key => $guid) {
-                       $owner_guid[$key] = (int) $guid;
-               }
-       } else {
-               $owner_guid = (int) $owner_guid;
-       }
-       if ($site_guid == 0) {
-               $site_guid = $CONFIG->site_guid;
-       }
-
-       $container_guid = (int)$group_guid;
-       if ($container_guid == 0) {
-               $container_guid = elgg_get_page_owner_guid();
-       }
-
-       $where = array();
-
-       if ($entity_type != "") {
-               $where[] = "e.type='$entity_type'";
-       }
-       if ($entity_subtype) {
-               $where[] = "e.subtype=$entity_subtype";
-       }
-       if ($meta_name != "") {
-               $where[] = "m.name_id='$meta_n'";
-       }
-       if ($meta_value != "") {
-               $where[] = "m.value_id='$meta_v'";
-       }
-       if ($site_guid > 0) {
-               $where[] = "e.site_guid = {$site_guid}";
-       }
-       if ($container_guid > 0) {
-               $where[] = "e.container_guid = {$container_guid}";
-       }
-
-       if (is_array($owner_guid)) {
-               $where[] = "e.container_guid in (" . implode(",", $owner_guid ) . ")";
-       } else if ($owner_guid > 0) {
-               $where[] = "e.container_guid = {$owner_guid}";
-       }
-
-       if (!$count) {
-               $query = "SELECT distinct e.* ";
-       } else {
-               $query = "SELECT count(e.guid) as total ";
-       }
-
-       $query .= "from {$CONFIG->dbprefix}entities e"
-               . " JOIN {$CONFIG->dbprefix}metadata m on e.guid = m.entity_guid "
-               . " JOIN {$CONFIG->dbprefix}objects_entity o on e.guid = o.guid where";
-
-       foreach ($where as $w) {
-               $query .= " $w and ";
-       }
-
-       // Add access controls
-       $query .= get_access_sql_suffix("e");
-
-       if (!$count) {
-               $query .= " order by $order_by limit $offset, $limit"; // Add order and limit
-               return get_data($query, "entity_row_to_elggstar");
-       } else {
-               if ($row = get_data_row($query)) {
-                       return $row->total;
-               }
-       }
-       return false;
-}
-
-/**
- * As get_entities_from_metadata_groups() but with multiple entities.
- *
- * @param int    $group_guid     The ID of the group.
- * @param array  $meta_array     Array of 'name' => 'value' pairs
- * @param string $entity_type    The type of entity to look for, eg 'site' or 'object'
- * @param string $entity_subtype The subtype of the entity.
- * @param int    $owner_guid     Owner GUID
- * @param int    $limit          Limit
- * @param int    $offset         Offset
- * @param string $order_by       Optional ordering.
- * @param int    $site_guid      Site GUID. 0 for current, -1 for any
- * @param bool   $count          Return count of entities instead of entities
- *
- * @return int|array List of ElggEntities, or the total number if count is set to false
- * @deprecated 1.8 Use elgg_get_entities_from_metadata()
- */
-function get_entities_from_metadata_groups_multi($group_guid, $meta_array, $entity_type = "",
-$entity_subtype = "", $owner_guid = 0, $limit = 10, $offset = 0, $order_by = "",
-$site_guid = 0, $count = false) {
-       elgg_deprecated_notice("get_entities_from_metadata_groups_multi was deprecated in 1.8.", 1.8);
-
-       global $CONFIG;
-
-       if (!is_array($meta_array) || sizeof($meta_array) == 0) {
-               return false;
-       }
-
-       $where = array();
-
-       $mindex = 1;
-       $join = "";
-       foreach ($meta_array as $meta_name => $meta_value) {
-               $meta_n = get_metastring_id($meta_name);
-               $meta_v = get_metastring_id($meta_value);
-               $join .= " JOIN {$CONFIG->dbprefix}metadata m{$mindex} on e.guid = m{$mindex}.entity_guid"
-                       . " JOIN {$CONFIG->dbprefix}objects_entity o on e.guid = o.guid ";
-
-               if ($meta_name != "") {
-                       $where[] = "m{$mindex}.name_id='$meta_n'";
-               }
-
-               if ($meta_value != "") {
-                       $where[] = "m{$mindex}.value_id='$meta_v'";
-               }
-
-               $mindex++;
-       }
-
-       $entity_type = sanitise_string($entity_type);
-       $entity_subtype = get_subtype_id($entity_type, $entity_subtype);
-       $limit = (int)$limit;
-       $offset = (int)$offset;
-       if ($order_by == "") {
-               $order_by = "e.time_created desc";
-       }
-       $order_by = sanitise_string($order_by);
-       $owner_guid = (int) $owner_guid;
-
-       $site_guid = (int) $site_guid;
-       if ($site_guid == 0) {
-               $site_guid = $CONFIG->site_guid;
-       }
-
-       //$access = get_access_list();
-
-       if ($entity_type != "") {
-               $where[] = "e.type = '{$entity_type}'";
-       }
-
-       if ($entity_subtype) {
-               $where[] = "e.subtype = {$entity_subtype}";
-       }
-
-       if ($site_guid > 0) {
-               $where[] = "e.site_guid = {$site_guid}";
-       }
-
-       if ($owner_guid > 0) {
-               $where[] = "e.owner_guid = {$owner_guid}";
-       }
-
-       if ($container_guid > 0) {
-               $where[] = "e.container_guid = {$container_guid}";
-       }
-
-       if ($count) {
-               $query = "SELECT count(e.guid) as total ";
-       } else {
-               $query = "SELECT distinct e.* ";
-       }
-
-       $query .= " from {$CONFIG->dbprefix}entities e {$join} where";
-       foreach ($where as $w) {
-               $query .= " $w and ";
-       }
-       $query .= get_access_sql_suffix("e"); // Add access controls
-
-       if (!$count) {
-               $query .= " order by $order_by limit $offset, $limit"; // Add order and limit
-               return get_data($query, "entity_row_to_elggstar");
-       } else {
-               if ($count = get_data_row($query)) {
-                       return $count->total;
-               }
-       }
-       return false;
-}
-
 /**
  * Return a list of this group's members.
  *
@@ -695,109 +332,3 @@ function remove_group_tool_option($name) {
                }
        }
 }
-
-
-/**
- * Searches for a group based on a complete or partial name or description
- *
- * @param string  $criteria The partial or full name or description
- * @param int     $limit    Limit of the search.
- * @param int     $offset   Offset.
- * @param string  $order_by The order.
- * @param boolean $count    Whether to return the count of results or just the results.
- *
- * @return mixed
- * @deprecated 1.7
- */
-function search_for_group($criteria, $limit = 10, $offset = 0, $order_by = "", $count = false) {
-       elgg_deprecated_notice('search_for_group() was deprecated by new search plugin.', 1.7);
-       global $CONFIG;
-
-       $criteria = sanitise_string($criteria);
-       $limit = (int)$limit;
-       $offset = (int)$offset;
-       $order_by = sanitise_string($order_by);
-
-       $access = get_access_sql_suffix("e");
-
-       if ($order_by == "") {
-               $order_by = "e.time_created desc";
-       }
-
-       if ($count) {
-               $query = "SELECT count(e.guid) as total ";
-       } else {
-               $query = "SELECT e.* ";
-       }
-       $query .= "from {$CONFIG->dbprefix}entities e"
-               . " JOIN {$CONFIG->dbprefix}groups_entity g on e.guid=g.guid where ";
-
-       $query .= "(g.name like \"%{$criteria}%\" or g.description like \"%{$criteria}%\")";
-       $query .= " and $access";
-
-       if (!$count) {
-               $query .= " order by $order_by limit $offset, $limit"; // Add order and limit
-               return get_data($query, "entity_row_to_elggstar");
-       } else {
-               if ($count = get_data_row($query)) {
-                       return $count->total;
-               }
-       }
-       return false;
-}
-
-/**
- * Returns a formatted list of groups suitable for injecting into search.
- *
- * @deprecated 1.7
- *
- * @param string $hook        Hook name
- * @param string $user        User
- * @param mixed  $returnvalue Previous hook's return value
- * @param string $tag         Tag to search on
- *
- * @return string
- */
-function search_list_groups_by_name($hook, $user, $returnvalue, $tag) {
-       elgg_deprecated_notice('search_list_groups_by_name() was deprecated by new search plugin', 1.7);
-       // Change this to set the number of groups that display on the search page
-       $threshold = 4;
-
-       $object = get_input('object');
-
-       if (!get_input('offset') && (empty($object) || $object == 'group')) {
-               if ($groups = search_for_group($tag, $threshold)) {
-                       $countgroups = search_for_group($tag, 0, 0, "", true);
-
-                       $return = elgg_view('group/search/startblurb', array('count' => $countgroups, 'tag' => $tag));
-                       foreach ($groups as $group) {
-                               $return .= elgg_view_entity($group);
-                       }
-                       $vars = array('count' => $countgroups, 'threshold' => $threshold, 'tag' => $tag);
-                       $return .= elgg_view('group/search/finishblurb', $vars);
-                       return $return;
-               }
-       }
-}
-
-/**
- * Displays a list of group objects that have been searched for.
- *
- * @see elgg_view_entity_list
- *
- * @param string $tag   Search criteria
- * @param int    $limit The number of entities to display on a page
- *
- * @return string The list in a form suitable to display
- * @deprecated 1.7
- */
-function list_group_search($tag, $limit = 10) {
-       elgg_deprecated_notice('list_group_search() was deprecated by new search plugin.', 1.7);
-       $offset = (int) get_input('offset');
-       $limit = (int) $limit;
-       $count = (int) search_for_group($tag, 10, 0, '', true);
-       $entities = search_for_group($tag, $limit, $offset);
-
-       return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, false);
-
-}
index cfb8ac7ec6706a37bcc74ec5566d4d1aa7876c1f..57ddf03f5ff50fb5f9158c714d00b5e1b0ba0752 100644 (file)
@@ -8,14 +8,4 @@
  * @subpackage Installation
  */
 
-// these were internal functions that perhaps can be removed rather than deprecated
-function is_db_installed() {
-       elgg_deprecated_notice('is_db_installed() has been deprecated', 1.8);
-       return true;
-}
-
-function is_installed() {
-       elgg_deprecated_notice('is_installed() has been deprecated', 1.8);
-       return true;
-}
 
index 4819bc9b056f7c1acb274992df9af7a107ccf4ed..7e2c38fc8c17a3b5c9c3a72b5d42d422a70d052c 100644 (file)
@@ -51,87 +51,6 @@ function elgg_geocode_location($location) {
        return $return;
 }
 
-/**
- * Return entities within a given geographic area.
- *
- * @param float     $lat            Latitude
- * @param float     $long           Longitude
- * @param float     $radius         The radius
- * @param string    $type           The type of entity (eg "user", "object" etc)
- * @param string    $subtype        The arbitrary subtype of the entity
- * @param int       $owner_guid     The GUID of the owning user
- * @param string    $order_by       The field to order by; by default, time_created desc
- * @param int       $limit          The number of entities to return; 10 by default
- * @param int       $offset         The indexing offset, 0 by default
- * @param boolean   $count          Count entities
- * @param int       $site_guid      Site GUID. 0 for current, -1 for any
- * @param int|array $container_guid Container GUID
- *
- * @return array A list of entities.
- * @deprecated 1.8
- */
-function get_entities_in_area($lat, $long, $radius, $type = "", $subtype = "", $owner_guid = 0,
-$order_by = "", $limit = 10, $offset = 0, $count = false, $site_guid = 0, $container_guid = NULL) {
-       elgg_deprecated_notice('get_entities_in_area() was deprecated by elgg_get_entities_from_location()!', 1.8);
-
-       $options = array();
-
-       $options['latitude'] = $lat;
-       $options['longitude'] = $long;
-       $options['distance'] = $radius;
-
-       // set container_guid to owner_guid to emulate old functionality
-       if ($owner_guid != "") {
-               if (is_null($container_guid)) {
-                       $container_guid = $owner_guid;
-               }
-       }
-
-       if ($type) {
-               $options['types'] = $type;
-       }
-
-       if ($subtype) {
-               $options['subtypes'] = $subtype;
-       }
-
-       if ($owner_guid) {
-               if (is_array($owner_guid)) {
-                       $options['owner_guids'] = $owner_guid;
-               } else {
-                       $options['owner_guid'] = $owner_guid;
-               }
-       }
-
-       if ($container_guid) {
-               if (is_array($container_guid)) {
-                       $options['container_guids'] = $container_guid;
-               } else {
-                       $options['container_guid'] = $container_guid;
-               }
-       }
-
-       $options['limit'] = $limit;
-
-       if ($offset) {
-               $options['offset'] = $offset;
-       }
-
-       if ($order_by) {
-               $options['order_by'];
-       }
-
-       if ($site_guid) {
-               $options['site_guid'];
-       }
-
-       if ($count) {
-               $options['count'] = $count;
-       }
-
-       return elgg_get_entities_from_location($options);
-}
-
 /**
  * Return entities within a given geographic area.
  *
@@ -217,29 +136,6 @@ function elgg_get_entities_from_location(array $options = array()) {
        return elgg_get_entities_from_relationship($options);
 }
 
-/**
- * List entities in a given location
- *
- * @param string $location       Location
- * @param string $type           The type of entity (eg "user", "object" etc)
- * @param string $subtype        The arbitrary subtype of the entity
- * @param int    $owner_guid     The GUID of the owning user
- * @param int    $limit          The number of entities to display per page (default: 10)
- * @param bool   $fullview       Whether or not to display the full view (default: true)
- * @param bool   $listtypetoggle Whether or not to allow gallery view
- * @param bool   $navigation     Display pagination? Default: true
- *
- * @return string A viewable list of entities
- * @deprecated 1.8
- */
-function list_entities_location($location, $type= "", $subtype = "", $owner_guid = 0, $limit = 10,
-$fullview = true, $listtypetoggle = false, $navigation = true) {
-       elgg_deprecated_notice('list_entities_location() was deprecated. Use elgg_list_entities_from_metadata()', 1.8);
-
-       return list_entities_from_metadata('location', $location, $type, $subtype, $owner_guid, $limit,
-               $fullview, $listtypetoggle, $navigation);
-}
-
 /**
  * Returns a viewable list of entities from location
  *
@@ -255,58 +151,6 @@ function elgg_list_entities_from_location(array $options = array()) {
        return elgg_list_entities($options, 'elgg_get_entities_from_location');
 }
 
-/**
- * List items within a given geographic area.
- *
- * @param real   $lat            Latitude
- * @param real   $long           Longitude
- * @param real   $radius         The radius
- * @param string $type           The type of entity (eg "user", "object" etc)
- * @param string $subtype        The arbitrary subtype of the entity
- * @param int    $owner_guid     The GUID of the owning user
- * @param int    $limit          The number of entities to display per page (default: 10)
- * @param bool   $fullview       Whether or not to display the full view (default: true)
- * @param bool   $listtypetoggle Whether or not to allow gallery view
- * @param bool   $navigation     Display pagination? Default: true
- *
- * @return string A viewable list of entities
- * @deprecated 1.8
- */
-function list_entities_in_area($lat, $long, $radius, $type= "", $subtype = "", $owner_guid = 0,
-$limit = 10, $fullview = true, $listtypetoggle = false, $navigation = true) {
-       elgg_deprecated_notice('list_entities_in_area() was deprecated. Use elgg_list_entities_from_location()', 1.8);
-
-       $options = array();
-
-       $options['latitude'] = $lat;
-       $options['longitude'] = $long;
-       $options['distance'] = $radius;
-
-       if ($type) {
-               $options['types'] = $type;
-       }
-
-       if ($subtype) {
-               $options['subtypes'] = $subtype;
-       }
-
-       if ($owner_guid) {
-               if (is_array($owner_guid)) {
-                       $options['owner_guids'] = $owner_guid;
-               } else {
-                       $options['owner_guid'] = $owner_guid;
-               }
-       }
-
-       $options['limit'] = $limit;
-
-       $options['full_view'] = $fullview;
-       $options['list_type_toggle'] = $listtypetoggle;
-       $options['pagination'] = $pagination;
-
-       return elgg_list_entities_from_location($options);
-}
-
 // Some distances in degrees (approximate)
 // @todo huh? see warning on elgg_get_entities_from_location()
 define("MILE", 0.01515);
index da7a96c1f833e580742e6d03980083ce9b611f69..7e0e4c7ff2cd4aedca518d1cc6c8c0a04fc0a7b0 100644 (file)
@@ -26,8 +26,6 @@ function elgg_parse_str($str) {
        return $results;
 }
 
-
-
 /**
  * Wrapper function for mb_split(). Falls back to split() if
  * mb_split() isn't available.  Parameters are passed to the
index 0ae576328ae054c6a083dccb7e975ff0798c7732..79bb774f8bb007fcb9baafa24935ddfec8cebed0 100644 (file)
@@ -889,132 +889,6 @@ $owner_guids = NULL) {
        return $return;
 }
 
-/**
- * Return a list of entities based on the given search criteria.
- *
- * @deprecated 1.7 use elgg_get_entities_from_metadata().
- *
- * @param mixed  $meta_name      Metadat name
- * @param mixed  $meta_value     Metadata value
- * @param string $entity_type    The type of entity to look for, eg 'site' or 'object'
- * @param string $entity_subtype The subtype of the entity.
- * @param int    $owner_guid     Owner GUID
- * @param int    $limit          Limit
- * @param int    $offset         Offset
- * @param string $order_by       Optional ordering.
- * @param int    $site_guid      Site GUID. 0 for current, -1 for any.
- * @param bool   $count          Return a count instead of entities
- * @param bool   $case_sensitive Metadata names case sensitivity
- *
- * @return int|array A list of entities, or a count if $count is set to true
- */
-function get_entities_from_metadata($meta_name, $meta_value = "", $entity_type = "",
-$entity_subtype = "", $owner_guid = 0, $limit = 10, $offset = 0, $order_by = "",
-$site_guid = 0, $count = FALSE, $case_sensitive = TRUE) {
-
-       elgg_deprecated_notice('get_entities_from_metadata() was deprecated by elgg_get_entities_from_metadata()!', 1.7);
-
-       $options = array();
-
-       $options['metadata_names'] = $meta_name;
-
-       if ($meta_value) {
-               $options['metadata_values'] = $meta_value;
-       }
-
-       if ($entity_type) {
-               $options['types'] = $entity_type;
-       }
-
-       if ($entity_subtype) {
-               $options['subtypes'] = $entity_subtype;
-       }
-
-       if ($owner_guid) {
-               if (is_array($owner_guid)) {
-                       $options['owner_guids'] = $owner_guid;
-               } else {
-                       $options['owner_guid'] = $owner_guid;
-               }
-       }
-
-       if ($limit) {
-               $options['limit'] = $limit;
-       }
-
-       if ($offset) {
-               $options['offset'] = $offset;
-       }
-
-       if ($order_by) {
-               $options['order_by'];
-       }
-
-       if ($site_guid) {
-               $options['site_guid'];
-       }
-
-       if ($count) {
-               $options['count'] = $count;
-       }
-
-       // need to be able to pass false
-       $options['metadata_case_sensitive'] = $case_sensitive;
-
-       return elgg_get_entities_from_metadata($options);
-}
-
-/**
- * Return a list of entities suitable for display based on the given search criteria.
- *
- * @see elgg_view_entity_list
- *
- * @deprecated 1.8 Use elgg_list_entities_from_metadata
- *
- * @param mixed  $meta_name      Metadata name to search on
- * @param mixed  $meta_value     The value to match, optionally
- * @param string $entity_type    The type of entity to look for, eg 'site' or 'object'
- * @param string $entity_subtype The subtype of the entity
- * @param int    $owner_guid     Owner GUID
- * @param int    $limit          Number of entities to display per page
- * @param bool   $fullview       WDisplay the full view (default: true)
- * @param bool   $listtypetoggle Allow users to toggle to the gallery view. Default: true
- * @param bool   $pagination     Display pagination? Default: true
- * @param bool   $case_sensitive Case sensitive metadata names?
- *
- * @return string
- *
- * @return string A list of entities suitable for display
- */
-function list_entities_from_metadata($meta_name, $meta_value = "",
-$entity_type = ELGG_ENTITIES_ANY_VALUE, $entity_subtype = ELGG_ENTITIES_ANY_VALUE,
-$owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = true,
-$pagination = true, $case_sensitive = true) {
-
-       elgg_deprecated_notice('list_entities_from_metadata() was deprecated by elgg_list_entities_from_metadata()!', 1.8);
-
-       $offset = (int) get_input('offset');
-       $limit = (int) $limit;
-       $options = array(
-               'metadata_name' => $meta_name,
-               'metadata_value' => $meta_value,
-               'types' => $entity_type,
-               'subtypes' => $entity_subtype,
-               'owner_guid' => $owner_guid,
-               'limit' => $limit,
-               'offset' => $offset,
-               'count' => TRUE,
-               'metadata_case_sensitive' => $case_sensitive
-       );
-       $count = elgg_get_entities_from_metadata($options);
-
-       $options['count'] = FALSE;
-       $entities = elgg_get_entities_from_metadata($options);
-
-       return elgg_view_entity_list($entities, $count, $offset, $limit,
-               $fullview, $listtypetoggle, $pagination);
-}
-
 /**
  * Returns a list of entities filtered by provided metadata.
  *
@@ -1029,116 +903,6 @@ function elgg_list_entities_from_metadata($options) {
        return elgg_list_entities($options, 'elgg_get_entities_from_metadata');
 }
 
-/**
- * Return entities from metadata
- *
- * @deprecated 1.7.  Use elgg_get_entities_from_metadata().
- *
- * @param mixed  $meta_array          Metadata name
- * @param string $entity_type         The type of entity to look for, eg 'site' or 'object'
- * @param string $entity_subtype      The subtype of the entity.
- * @param int    $owner_guid          Owner GUID
- * @param int    $limit               Limit
- * @param int    $offset              Offset
- * @param string $order_by            Optional ordering.
- * @param int    $site_guid           Site GUID. 0 for current, -1 for any.
- * @param bool   $count               Return a count instead of entities
- * @param bool   $meta_array_operator Operator for metadata values
- *
- * @return int|array A list of entities, or a count if $count is set to true
- */
-function get_entities_from_metadata_multi($meta_array, $entity_type = "", $entity_subtype = "",
-$owner_guid = 0, $limit = 10, $offset = 0, $order_by = "", $site_guid = 0,
-$count = false, $meta_array_operator = 'and') {
-
-       elgg_deprecated_notice('get_entities_from_metadata_multi() was deprecated by elgg_get_entities_from_metadata()!', 1.7);
-
-       if (!is_array($meta_array) || sizeof($meta_array) == 0) {
-               return false;
-       }
-
-       $options = array();
-
-       $options['metadata_name_value_pairs'] = $meta_array;
-
-       if ($entity_type) {
-               $options['types'] = $entity_type;
-       }
-
-       if ($entity_subtype) {
-               $options['subtypes'] = $entity_subtype;
-       }
-
-       if ($owner_guid) {
-               if (is_array($owner_guid)) {
-                       $options['owner_guids'] = $owner_guid;
-               } else {
-                       $options['owner_guid'] = $owner_guid;
-               }
-       }
-
-       if ($limit) {
-               $options['limit'] = $limit;
-       }
-
-       if ($offset) {
-               $options['offset'] = $offset;
-       }
-
-       if ($order_by) {
-               $options['order_by'];
-       }
-
-       if ($site_guid) {
-               $options['site_guid'];
-       }
-
-       if ($count) {
-               $options['count'] = $count;
-       }
-
-       $options['metadata_name_value_pairs_operator'] = $meta_array_operator;
-
-       return elgg_get_entities_from_metadata($options);
-}
-
-/**
- * Returns a viewable list of entities based on the given search criteria.
- *
- * @see elgg_view_entity_list
- *
- * @param array  $meta_array     Array of 'name' => 'value' pairs
- * @param string $entity_type    The type of entity to look for, eg 'site' or 'object'
- * @param string $entity_subtype The subtype of the entity.
- * @param int    $owner_guid     Owner GUID
- * @param int    $limit          Limit
- * @param bool   $fullview       WDisplay the full view (default: true)
- * @param bool   $listtypetoggle Allow users to toggle to the gallery view. Default: true
- * @param bool   $pagination     Display pagination? Default: true
- *
- * @return string List of ElggEntities suitable for display
- * 
- * @deprecated Use elgg_list_entities_from_metadata() instead
- */
-function list_entities_from_metadata_multi($meta_array, $entity_type = "", $entity_subtype = "",
-$owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = true, $pagination = true) {
-       elgg_deprecated_notice(elgg_echo('deprecated:function', array(
-               'list_entities_from_metadata_multi', 
-               'elgg_get_entities_from_metadata'
-       )), 1.8);
-       
-
-       $offset = (int) get_input('offset');
-       $limit = (int) $limit;
-       $count = get_entities_from_metadata_multi($meta_array, $entity_type, $entity_subtype,
-               $owner_guid, $limit, $offset, "", $site_guid, true);
-       $entities = get_entities_from_metadata_multi($meta_array, $entity_type, $entity_subtype,
-               $owner_guid, $limit, $offset, "", $site_guid, false);
-
-       return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview,
-               $listtypetoggle, $pagination);
-}
-
 /**
  * Clear all the metadata for a given entity, assuming you have access to that metadata.
  *
index 229adb0ed0b21a62e1fe95bcef47e67b52699a46..80511832cfc731d85eeab8cc3015754edc2c0dc2 100644 (file)
@@ -22,7 +22,7 @@ $METASTRINGS_DEADNAME_CACHE = array();
  * @param bool   $case_sensitive Do we want to make the query case sensitive?
  *                               If not there may be more than one result
  *
- * @return int|array|false meta   string id, array of ids or false if none found
+ * @return int|array|false metastring id, array of ids or false if none found
  */
 function get_metastring_id($string, $case_sensitive = TRUE) {
        global $CONFIG, $METASTRINGS_CACHE, $METASTRINGS_DEADNAME_CACHE;
index 8ed87ffb70b54642f587f2b263da59b2c244c426..d112629333cc49c76dfc5a4e72ade1801445e603 100644 (file)
@@ -122,122 +122,6 @@ function elgg_get_breadcrumbs() {
        return (is_array($CONFIG->breadcrumbs)) ? $CONFIG->breadcrumbs : array();
 }
 
-
-/**
- * Deprecated by elgg_register_menu_item(). Set $menu_name to 'page'.
- *
- * @see elgg_register_menu_item()
- * @deprecated 1.8
- *
- * @param string  $label    The label
- * @param string  $link     The link
- * @param string  $group    The group to store item in
- * @param boolean $onclick  Add a confirmation when clicked?
- * @param boolean $selected Is menu item selected
- *
- * @return bool
- */
-function add_submenu_item($label, $link, $group = 'default', $onclick = false, $selected = NULL) {
-       elgg_deprecated_notice('add_submenu_item was deprecated by elgg_register_menu_item', 1.8);
-
-       // submenu items were added in the page setup hook usually by checking
-       // the context.  We'll pass in the current context here, which will
-       // emulate that effect.
-       // if context == 'main' (default) it probably means they always wanted
-       // the menu item to show up everywhere.
-       $context = elgg_get_context();
-
-       if ($context == 'main') {
-               $context = 'all';
-       }
-
-       $item = array(
-               'name' => $label,
-               'title' => $label,
-               'url' => $link,
-               'context' => $context,
-               'section' => $group,
-       );
-
-       if ($selected) {
-               $item['selected'] = true;
-       }
-
-       if ($onclick) {
-               $js = "onclick=\"javascript:return confirm('" . elgg_echo('deleteconfirm') . "')\"";
-               $item['vars'] = array('js' => $js);
-       }
-
-       return elgg_register_menu_item('page', $item);
-}
-
-/**
- * Use elgg_view_menu(). Set $menu_name to 'owner_block'.
- *
- * @see elgg_view_menu()
- * @deprecated 1.8
- *
- * @return string
- */
-function get_submenu() {
-       elgg_deprecated_notice("get_submenu() has been deprecated by elgg_view_menu()", 1.8);
-       return elgg_view_menu('owner_block', array(
-               'entity' => $owner,
-               'class' => 'elgg-owner-block-menu',
-       ));
-}
-
-/**
- * Adds an item to the site-wide menu.
- *
- * You can obtain the menu array by calling {@link get_register('menu')}
- *
- * @param string $menu_name     The name of the menu item
- * @param string $menu_url      The URL of the page
- * @param array  $menu_children Optionally, an array of submenu items (not used)
- * @param string $context       (not used)
- *
- * @return true|false Depending on success
- * @deprecated 1.8 use elgg_register_menu_item() for the menu 'site'
- */
-function add_menu($menu_name, $menu_url, $menu_children = array(), $context = "") {
-       elgg_deprecated_notice('add_menu() deprecated by elgg_register_menu_item()', 1.8);
-
-       return elgg_register_menu_item('site', array(
-               'name' => $menu_name,
-               'title' => $menu_name,
-               'url' => $menu_url,
-       ));
-}
-
-/**
- * Removes an item from the menu register
- *
- * @param string $menu_name The name of the menu item
- *
- * @return true|false Depending on success
- * @deprecated 1.8
- */
-function remove_menu($menu_name) {
-       elgg_deprecated_notice("remove_menu() deprecated by elgg_unregister_menu_item()", 1.8);
-       return elgg_unregister_menu_item('site', $menu_name);
-}
-
-/**
- * Returns a menu item for use in the children section of add_menu()
- * This is not currently used in the Elgg core.
- *
- * @param string $menu_name The name of the menu item
- * @param string $menu_url  Its URL
- *
- * @return stdClass|false Depending on success
- * @deprecated 1.7
- */
-function menu_item($menu_name, $menu_url) {
-       elgg_deprecated_notice('menu_item() is deprecated by add_submenu_item', 1.7);
-       return make_register_object($menu_name, $menu_url);
-}
-
 /**
  * Set up the site menu
  *
index 51b47df2ad58a8fc1061707b88cb5389799e1e93..184fe44bd2830debc923dfaab2029d7ef830d131 100644 (file)
@@ -94,59 +94,6 @@ function delete_object_entity($guid) {
        return 1; // Always return that we have deleted one row in order to not break existing code.
 }
 
-/**
- * Searches for an object based on a complete or partial title
- * or description using full text searching.
- *
- * IMPORTANT NOTE: With MySQL's default setup:
- * 1) $criteria must be 4 or more characters long
- * 2) If $criteria matches greater than 50% of results NO RESULTS ARE RETURNED!
- *
- * @param string  $criteria The partial or full name or username.
- * @param int     $limit    Limit of the search.
- * @param int     $offset   Offset.
- * @param string  $order_by The order.
- * @param boolean $count    Whether to return the count of results or just the results.
- *
- * @return int|false
- * @deprecated 1.7
- */
-function search_for_object($criteria, $limit = 10, $offset = 0, $order_by = "", $count = false) {
-       elgg_deprecated_notice('search_for_object() was deprecated by new search plugin.', 1.7);
-       global $CONFIG;
-
-       $criteria = sanitise_string($criteria);
-       $limit = (int)$limit;
-       $offset = (int)$offset;
-       $order_by = sanitise_string($order_by);
-       $container_guid = (int)$container_guid;
-
-       $access = get_access_sql_suffix("e");
-
-       if ($order_by == "") {
-               $order_by = "e.time_created desc";
-       }
-
-       if ($count) {
-               $query = "SELECT count(e.guid) as total ";
-       } else {
-               $query = "SELECT e.* ";
-       }
-       $query .= "from {$CONFIG->dbprefix}entities e
-               join {$CONFIG->dbprefix}objects_entity o on e.guid=o.guid
-               where match(o.title,o.description) against ('$criteria') and $access";
-
-       if (!$count) {
-               $query .= " order by $order_by limit $offset, $limit"; // Add order and limit
-               return get_data($query, "entity_row_to_elggstar");
-       } else {
-               if ($count = get_data_row($query)) {
-                       return $count->total;
-               }
-       }
-       return false;
-}
-
 /**
  * Get the sites this object is part of
  *
@@ -187,42 +134,5 @@ function objects_test($hook, $type, $value, $params) {
 }
 
 
-/**
- * Returns a formatted list of objects suitable for injecting into search.
- *
- * @deprecated 1.7
- *
- * @param sting  $hook        Hook
- * @param string $user        user
- * @param mixed  $returnvalue Previous return value
- * @param mixed  $tag         Search term
- *
- * @return array
- */
-function search_list_objects_by_name($hook, $user, $returnvalue, $tag) {
-       elgg_deprecated_notice('search_list_objects_by_name was deprecated by new search plugin.', 1.7);
-
-       // Change this to set the number of users that display on the search page
-       $threshold = 4;
-
-       $object = get_input('object');
-
-       if (!get_input('offset') && (empty($object) || $object == 'user')) {
-               if ($users = search_for_user($tag, $threshold)) {
-                       $countusers = search_for_user($tag, 0, 0, "", true);
-
-                       $return = elgg_view('user/search/startblurb', array('count' => $countusers, 'tag' => $tag));
-                       foreach ($users as $user) {
-                               $return .= elgg_view_entity($user);
-                       }
-                       $return .= elgg_view('user/search/finishblurb',
-                               array('count' => $countusers, 'threshold' => $threshold, 'tag' => $tag));
-
-                       return $return;
-
-               }
-       }
-}
-
 elgg_register_event_handler('init', 'system', 'objects_init', 0);
 elgg_register_plugin_hook_handler('unit_test', 'system', 'objects_test');
\ No newline at end of file
index 25fb23e3de19adbccccefc4d28065dd81e27fe99..967af263f25dc79ba05393caa6a457dfb5e50826 100644 (file)
@@ -186,7 +186,6 @@ function elgg_format_attributes(array $attrs) {
        return implode(' ', $attributes);
 }
 
-
 /**
  * Preps an associative array for use in {@link elgg_format_attributes()}.
  *
@@ -262,19 +261,6 @@ function elgg_normalize_url($url) {
        }
 }
 
-/**
- * When given a title, returns a version suitable for inclusion in a URL
- *
- * @param string $title The title
- *
- * @return string The optimised title
- * @deprecated 1.8
- */
-function friendly_title($title) {
-       elgg_deprecated_notice('friendly_title was deprecated by elgg_get_friendly_title', 1.8);
-       return elgg_get_friendly_title($title);
-}
-
 /**
  * When given a title, returns a version suitable for inclusion in a URL
  *
@@ -301,19 +287,6 @@ function elgg_get_friendly_title($title) {
        return $title;
 }
 
-/**
- * Displays a UNIX timestamp in a friendly way (eg "less than a minute ago")
- *
- * @param int $time A UNIX epoch timestamp
- *
- * @return string The friendly time
- * @deprecated 1.8
- */
-function friendly_time($time) {
-       elgg_deprecated_notice('friendly_time was deprecated by elgg_view_friendly_time', 1.8);
-       return elgg_view_friendly_time($time);
-}
-
 /**
  * Formats a UNIX timestamp in a friendly way (eg "less than a minute ago")
  *
@@ -394,71 +367,3 @@ function elgg_strip_tags($string) {
 
        return $string;
 }
-
-
-
-/**
-  * Filters a string into an array of significant words
-  *
-  * @deprecated 1.8
-  *
-  * @param string $string A string
-  *
-  * @return array
-  */
-function filter_string($string) {
-       elgg_deprecated_notice('filter_string() was deprecated!', 1.8);
-
-       // Convert it to lower and trim
-       $string = strtolower($string);
-       $string = trim($string);
-
-       // Remove links and email addresses
-       // match protocol://address/path/file.extension?some=variable&another=asf%
-       $string = preg_replace("/\s([a-zA-Z]+:\/\/[a-z][a-z0-9\_\.\-]*[a-z]{2,6}"
-               . "[a-zA-Z0-9\/\*\-\?\&\%\=]*)([\s|\.|\,])/iu", " ", $string);
-
-       // match www.something.domain/path/file.extension?some=variable&another=asf%
-       $string = preg_replace("/\s(www\.[a-z][a-z0-9\_\.\-]*[a-z]{2,6}"
-               . "[a-zA-Z0-9\/\*\-\?\&\%\=]*)([\s|\.|\,])/iu", " ", $string);
-
-       // match name@address
-       $string = preg_replace("/\s([a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]"
-               . "*\@[a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]{2,6})([\s|\.|\,])/iu", " ", $string);
-
-       // Sanitise the string; remove unwanted characters
-       $string = preg_replace('/\W/ui', ' ', $string);
-
-       // Explode it into an array
-       $terms = explode(' ', $string);
-
-       // Remove any blacklist terms
-       //$terms = array_filter($terms, 'remove_blacklist');
-
-       return $terms;
-}
-
-/**
- * Returns true if the word in $input is considered significant
- *
- * @deprecated 1.8
- *
- * @param string $input A word
- *
- * @return true|false
- */
-function remove_blacklist($input) {
-       elgg_deprecated_notice('remove_blacklist() was deprecated!', 1.8);
-
-       global $CONFIG;
-
-       if (!is_array($CONFIG->wordblacklist)) {
-               return $input;
-       }
-
-       if (strlen($input) < 3 || in_array($input, $CONFIG->wordblacklist)) {
-               return false;
-       }
-
-       return true;
-}
\ No newline at end of file
index 41e0aa0eff0fcdaf133b56b08c55b2cf66f79b43..f8b23b6a9bbee40f8e19078f2f44cb2227de8461 100644 (file)
@@ -33,18 +33,6 @@ function elgg_get_page_owner_guid($guid = 0) {
        return $guid;
 }
 
-/**
- * Gets the guid of the entity that owns the current page.
- *
- * @deprecated 1.8  Use elgg_get_page_owner_guid()
- *
- * @return int The current page owner guid (0 if none).
- */
-function page_owner() {
-       elgg_deprecated_notice('page_owner() was deprecated by elgg_get_page_owner_guid().', 1.8);
-       return elgg_get_page_owner_guid();
-}
-
 /**
  * Gets the owner entity for the current page.
  *
@@ -61,17 +49,6 @@ function elgg_get_page_owner_entity() {
        return FALSE;
 }
 
-/**
- * Gets the owner entity for the current page.
- *
- * @deprecated 1.8  Use elgg_get_page_owner()
- * @return ElggEntity|false The current page owner or false if none.
- */
-function page_owner_entity() {
-       elgg_deprecated_notice('page_owner_entity() was deprecated by elgg_get_page_owner_entity().', 1.8);
-       return elgg_get_page_owner_entity();
-}
-
 /**
  * Set the guid of the entity that owns this page
  *
@@ -83,32 +60,6 @@ function elgg_set_page_owner_guid($guid) {
        elgg_get_page_owner_guid($guid);
 }
 
-
-/**
- * Registers a page owner handler function
- *
- * @param string $functionname The callback function
- *
- * @deprecated 1.8  Use the 'page_owner', 'system' plugin hook
- * @return void
- */
-function add_page_owner_handler($functionname) {
-       elgg_deprecated_notice("add_page_owner_handler() was deprecated by the plugin hook 'page_owner', 'system'.", 1.8);
-}
-
-/**
- * Set a page owner entity
- *
- * @param int $entitytoset The GUID of the entity
- *
- * @deprecated 1.8  Use elgg_set_page_owner_guid()
- * @return void
- */
-function set_page_owner($entitytoset = -1) {
-       elgg_deprecated_notice('set_page_owner() was deprecated by elgg_set_page_owner_guid().', 1.8);
-       elgg_set_page_owner_guid($entitytoset);
-}
-
 /**
  * Handles default page owners
  *
@@ -246,40 +197,6 @@ function elgg_in_context($context) {
        return in_array($context, $CONFIG->context);
 }
 
-/**
- * Sets the functional context of a page
- *
- * @deprecated 1.8  Use elgg_set_context()
- *
- * @param string $context The context of the page
- *
- * @return mixed Either the context string, or false on failure
- */
-function set_context($context) {
-       elgg_deprecated_notice('set_context() was deprecated by elgg_set_context().', 1.8);
-       elgg_set_context($context);
-       if (empty($context)) {
-               return false;
-       }
-       return $context;
-}
-
-/**
- * Returns the functional context of a page
- *
- * @deprecated 1.8  Use elgg_get_context()
- *
- * @return string The context, or 'main' if no context has been provided
- */
-function get_context() {
-       elgg_deprecated_notice('get_context() was deprecated by elgg_get_context().', 1.8);
-       return elgg_get_context();
-
-       // @todo - used to set context based on calling script
-       // $context = get_plugin_name(true)
-}
-
-
 /**
  * Initializes the page owner functions
  *
index 9a3dd630a8f0db4240fdeada72f08c2ef6792314..c5a34bc81f54591f24527df226727dced0346ce2 100644 (file)
@@ -448,67 +448,6 @@ function elgg_reindex_plugin_priorities() {
        return elgg_set_plugin_priorities(array());
 }
 
-/**
- * Returns a list of plugins to load, in the order that they should be loaded.
- *
- * @deprecated 1.8
- *
- * @return array List of plugins
- */
-function get_plugin_list() {
-       elgg_deprecated_notice('get_plugin_list() is deprecated by elgg_get_plugin_ids_in_dir() or elgg_get_plugins()', 1.8);
-
-       $plugins = elgg_get_plugins('any');
-
-       $list = array();
-       if ($plugins) {
-               foreach ($plugins as $i => $plugin) {
-                       // in <=1.7 this returned indexed by multiples of 10.
-                       // uh...sure...why not.
-                       $index = ($i + 1) * 10;
-                       $list[$index] = $plugin->getID();
-               }
-       }
-
-       return $list;
-}
-
-/**
- * Regenerates the list of known plugins and saves it to the current site
- *
- * Important: You should regenerate simplecache and the viewpath cache after executing this function
- * otherwise you may experience view display artifacts. Do this with the following code:
- *
- *             elgg_view_regenerate_simplecache();
- *             elgg_filepath_cache_reset();
- *
- * @deprecated 1.8
- *
- * @param array $pluginorder Optionally, a list of existing plugins and their orders
- *
- * @return array The new list of plugins and their orders
- */
-function regenerate_plugin_list($pluginorder = FALSE) {
-       $msg = 'regenerate_plugin_list() is (sorta) deprecated by elgg_generate_plugin_entities() and'
-                       . ' elgg_set_plugin_priorities().';
-       elgg_deprecated_notice($msg, 1.8);
-
-       // they're probably trying to set it?
-       if ($pluginorder) {
-               if (elgg_generate_plugin_entities()) {
-                       // sort the plugins by the index numerically since we used
-                       // weird indexes in the old system.
-                       ksort($pluginorder, SORT_NUMERIC);
-                       return elgg_set_plugin_priorities($pluginorder);
-               }
-               return false;
-       } else {
-               // they're probably trying to regenerate from disk?
-               return elgg_generate_plugin_entities();
-       }
-}
-
-
 /**
  * Loads plugins
  *
@@ -522,7 +461,6 @@ function load_plugins() {
        return elgg_load_plugins();
 }
 
-
 /**
  * Namespaces a string to be used as a private setting for a plugin.
  *
@@ -593,74 +531,6 @@ function elgg_get_calling_plugin_id($mainfilename = false) {
        return false;
 }
 
-/**
- * Get the name of the most recent plugin to be called in the
- * call stack (or the plugin that owns the current page, if any).
- *
- * i.e., if the last plugin was in /mod/foobar/, get_plugin_name would return foo_bar.
- *
- * @deprecated 1.8
- *
- * @param boolean $mainfilename If set to true, this will instead determine the
- *                              context from the main script filename called by
- *                              the browser. Default = false.
- *
- * @return string|false Plugin name, or false if no plugin name was called
- */
-function get_plugin_name($mainfilename = false) {
-       elgg_deprecated_notice('get_plugin_name() is deprecated by elgg_get_calling_plugin_id()', 1.8);
-
-       return elgg_get_calling_plugin_id($mainfilename);
-}
-
-/**
- * Load and parse a plugin manifest from a plugin XML file.
- *
- * @example plugins/manifest.xml Example 1.8-style manifest file.
- *
- * @deprecated 1.8
- *
- * @param string $plugin Plugin name.
- * @return array of values
- */
-function load_plugin_manifest($plugin) {
-       elgg_deprecated_notice('load_plugin_manifest() is deprecated by ElggPlugin->getManifest()', 1.8);
-
-       $xml_file = elgg_get_plugin_path() . "$plugin/manifest.xml";
-
-       try {
-               $manifest = new ElggPluginManifest($xml_file, $plugin);
-       } catch(Exception $e) {
-               return false;
-       }
-
-       return $manifest->getManifest();
-}
-
-/**
- * This function checks a plugin manifest 'elgg_version' value against the current install
- * returning TRUE if the elgg_version is >= the current install's version.
- *
- * @deprecated 1.8
- *
- * @param string $manifest_elgg_version_string The build version (eg 2009010201).
- * @return bool
- */
-function check_plugin_compatibility($manifest_elgg_version_string) {
-       elgg_deprecated_notice('check_plugin_compatibility() is deprecated by ElggPlugin->canActivate()', 1.8);
-
-       $version = get_version();
-
-       if (strpos($manifest_elgg_version_string, '.') === false) {
-               // Using version
-               $req_version = (int)$manifest_elgg_version_string;
-
-               return ($version >= $req_version);
-       }
-
-       return false;
-}
-
 /**
  * Returns an array of all provides from all active plugins.
  *
@@ -851,27 +721,6 @@ function elgg_get_plugin_dependency_strings($dep) {
        return $strings;
 }
 
-
-
-/**
- * Shorthand function for finding the plugin settings.
- *
- * @deprecated 1.8
- *
- * @param string $plugin_id Optional plugin id, if not specified
- *                          then it is detected from where you are calling.
- *
- * @return mixed
- */
-function find_plugin_settings($plugin_id = null) {
-       elgg_deprecated_notice('find_plugin_setting() is deprecated by elgg_get_calling_plugin_entity() or elgg_get_plugin_from_id()', 1.8);
-       if ($plugin_id) {
-               return elgg_get_plugin_from_id($plugin_id);
-       } else {
-               return elgg_get_calling_plugin_entity();
-       }
-}
-
 /**
  * Returns the ElggPlugin entity of the last plugin called.
  *
@@ -1134,149 +983,6 @@ function clear_all_plugin_settings($plugin_id = "") {
        return false;
 }
 
-/**
- * Return an array of installed plugins.
- *
- * @deprecated 1.8
- *
- * @param string $status any|enabled|disabled
- * @return array
- */
-function get_installed_plugins($status = 'all') {
-       global $CONFIG;
-
-       elgg_deprecated_notice('get_installed_plugins() was deprecated by elgg_get_plugins()', 1.8);
-
-       $plugins = elgg_get_plugins($status);
-
-       if (!$plugins) {
-               return array();
-       }
-
-       $installed_plugins = array();
-
-       foreach ($plugins as $plugin) {
-               if (!$plugin->isValid()) {
-                       continue;
-               }
-
-               $installed_plugins[$plugin->getID()] = array(
-                       'active' => $plugin->isActive(),
-                       'manifest' => $plugin->manifest->getManifest()
-               );
-       }
-
-       return $installed_plugins;
-}
-
-/**
- * Enable a plugin for a site (default current site)
- *
- * Important: You should regenerate simplecache and the viewpath cache after executing this function
- * otherwise you may experience view display artifacts. Do this with the following code:
- *
- *             elgg_view_regenerate_simplecache();
- *             elgg_filepath_cache_reset();
- *
- * @deprecated 1.8
- *
- * @param string $plugin    The plugin name.
- * @param int    $site_guid The site id, if not specified then this is detected.
- *
- * @return array
- * @throws InvalidClassException
- */
-function enable_plugin($plugin, $site_guid = null) {
-       elgg_deprecated_notice('enable_plugin() was deprecated by ElggPlugin->activate()', 1.8);
-
-       $plugin = sanitise_string($plugin);
-
-       $site_guid = (int) $site_guid;
-       if (!$site_guid) {
-               $site = get_config('site');
-               $site_guid = $site->guid;
-       }
-
-       try {
-               $plugin = new ElggPlugin($plugin);
-       } catch(Exception $e) {
-               return false;
-       }
-
-       if (!$plugin->canActivate($site_guid)) {
-               return false;
-       }
-
-       return $plugin->activate($site_guid);
-}
-
-/**
- * Disable a plugin for a site (default current site)
- *
- * Important: You should regenerate simplecache and the viewpath cache after executing this function
- * otherwise you may experience view display artifacts. Do this with the following code:
- *
- *             elgg_view_regenerate_simplecache();
- *             elgg_filepath_cache_reset();
- *
- * @deprecated 1.8
- *
- * @param string $plugin    The plugin name.
- * @param int    $site_guid The site id, if not specified then this is detected.
- *
- * @return bool
- * @throws InvalidClassException
- */
-function disable_plugin($plugin, $site_guid = 0) {
-       elgg_deprecated_notice('disable_plugin() was deprecated by ElggPlugin->deactivate()', 1.8);
-
-       $plugin = sanitise_string($plugin);
-
-       $site_guid = (int) $site_guid;
-       if (!$site_guid) {
-               $site = get_config('site');
-               $site_guid = $site->guid;
-       }
-
-       try {
-               $plugin = new ElggPlugin($plugin);
-       } catch(Exception $e) {
-               return false;
-       }
-
-       return $plugin->deactivate($site_guid);
-}
-
-/**
- * Return whether a plugin is enabled or not.
- *
- * @deprecated 1.8
- *
- * @param string $plugin    The plugin name.
- * @param int    $site_guid The site id, if not specified then this is detected.
- *
- * @return bool
- */
-function is_plugin_enabled($plugin, $site_guid = 0) {
-       elgg_deprecated_notice('is_plugin_enabled() was deprecated by ElggPlugin->isActive()', 1.8);
-
-       $plugin = sanitise_string($plugin);
-
-       $site_guid = (int) $site_guid;
-       if (!$site_guid) {
-               $site = get_config('site');
-               $site_guid = $site->guid;
-       }
-
-       try {
-               $plugin = new ElggPlugin($plugin);
-       } catch(Exception $e) {
-               return false;
-       }
-
-       return $plugin->isActive($site_guid);
-}
-
 /**
  * Register object, plugin entities as ElggPlugin classes
  *
@@ -1286,7 +992,6 @@ function plugin_run_once() {
        add_subtype("object", "plugin", "ElggPlugin");
 }
 
-
 /**
  * Runs unit tests for the entity objects.
  *
index bf81e4a3a1ce924e5affb91f56d713101ba0b94d..77641e122335217bcd61d08fe66de406b59a8174 100644 (file)
@@ -8,169 +8,6 @@
  * @subpackage PrivateSettings
  */
 
-/**
- * Get entities based on their private data.
- *
- * @param string  $name           The name of the setting
- * @param string  $value          The value of the setting
- * @param string  $type           The type of entity (eg "user", "object" etc)
- * @param string  $subtype        The arbitrary subtype of the entity
- * @param int     $owner_guid     The GUID of the owning user
- * @param string  $order_by       The field to order by; by default, time_created desc
- * @param int     $limit          The number of entities to return; 10 by default
- * @param int     $offset         The indexing offset, 0 by default
- * @param boolean $count          Return a count of entities
- * @param int     $site_guid      The site to get entities for. 0 for current, -1 for any
- * @param mixed   $container_guid The container(s) GUIDs
- *
- * @return array A list of entities.
- * @deprecated 1.8
- */
-function get_entities_from_private_setting($name = "", $value = "", $type = "", $subtype = "",
-$owner_guid = 0, $order_by = "", $limit = 10, $offset = 0, $count = false, $site_guid = 0,
-$container_guid = null) {
-       elgg_deprecated_notice('get_entities_from_private_setting() was deprecated by elgg_get_entities_from_private_setting()!', 1.8);
-
-       $options = array();
-
-       $options['private_setting_name'] = $name;
-       $options['private_setting_value'] = $value;
-
-       // set container_guid to owner_guid to emulate old functionality
-       if ($owner_guid != "") {
-               if (is_null($container_guid)) {
-                       $container_guid = $owner_guid;
-               }
-       }
-
-       if ($type) {
-               $options['types'] = $type;
-       }
-
-       if ($subtype) {
-               $options['subtypes'] = $subtype;
-       }
-
-       if ($owner_guid) {
-               if (is_array($owner_guid)) {
-                       $options['owner_guids'] = $owner_guid;
-               } else {
-                       $options['owner_guid'] = $owner_guid;
-               }
-       }
-
-       if ($container_guid) {
-               if (is_array($container_guid)) {
-                       $options['container_guids'] = $container_guid;
-               } else {
-                       $options['container_guid'] = $container_guid;
-               }
-       }
-
-       $options['limit'] = $limit;
-
-       if ($offset) {
-               $options['offset'] = $offset;
-       }
-
-       if ($order_by) {
-               $options['order_by'];
-       }
-
-       if ($site_guid) {
-               $options['site_guid'];
-       }
-
-       if ($count) {
-               $options['count'] = $count;
-       }
-
-       return elgg_get_entities_from_private_settings($options);
-}
-
-/**
- * Get entities based on their private data by multiple keys.
- *
- * @param string $name           The name of the setting
- * @param mixed  $type           Entity type
- * @param string $subtype        Entity subtype
- * @param int    $owner_guid     The GUID of the owning user
- * @param string $order_by       The field to order by; by default, time_created desc
- * @param int    $limit          The number of entities to return; 10 by default
- * @param int    $offset         The indexing offset, 0 by default
- * @param bool   $count          Count entities
- * @param int    $site_guid      Site GUID. 0 for current, -1 for any.
- * @param mixed  $container_guid Container GUID
- *
- * @return array A list of entities.
- * @deprecated 1.8
- */
-function get_entities_from_private_setting_multi(array $name, $type = "", $subtype = "",
-$owner_guid = 0, $order_by = "", $limit = 10, $offset = 0, $count = false,
-$site_guid = 0, $container_guid = null) {
-
-       elgg_deprecated_notice('get_entities_from_private_setting_multi() was deprecated by elgg_get_entities_from_private_setting()!', 1.8);
-
-       $options = array();
-
-       $pairs = array();
-       foreach ($name as $setting_name => $setting_value) {
-               $pairs[] = array('name' => $setting_name, 'value' => $setting_value);
-       }
-       $options['private_setting_name_value_pairs'] = $pairs;
-
-       // set container_guid to owner_guid to emulate old functionality
-       if ($owner_guid != "") {
-               if (is_null($container_guid)) {
-                       $container_guid = $owner_guid;
-               }
-       }
-
-       if ($type) {
-               $options['types'] = $type;
-       }
-
-       if ($subtype) {
-               $options['subtypes'] = $subtype;
-       }
-
-       if ($owner_guid) {
-               if (is_array($owner_guid)) {
-                       $options['owner_guids'] = $owner_guid;
-               } else {
-                       $options['owner_guid'] = $owner_guid;
-               }
-       }
-
-       if ($container_guid) {
-               if (is_array($container_guid)) {
-                       $options['container_guids'] = $container_guid;
-               } else {
-                       $options['container_guid'] = $container_guid;
-               }
-       }
-
-       $options['limit'] = $limit;
-
-       if ($offset) {
-               $options['offset'] = $offset;
-       }
-
-       if ($order_by) {
-               $options['order_by'];
-       }
-
-       if ($site_guid) {
-               $options['site_guid'];
-       }
-
-       if ($count) {
-               $options['count'] = $count;
-       }
-
-       return elgg_get_entities_from_private_settings($options);
-}
-
 /**
  * Returns entities based upon private settings.  Also accepts all
  * options available to elgg_get_entities().  Supports
index 93d4470239af659ecbec42ae308b6ceb9372804e..f5b97187e05f388c0d3677759654c7973453a624 100644 (file)
@@ -100,7 +100,9 @@ $lib_files = array(
        'opendd.php', 'pagehandler.php', 'pageowner.php', 'pam.php', 'plugins.php',
        'private_settings.php', 'relationships.php', 'river.php', 'sites.php',
        'statistics.php', 'tags.php', 'usersettings.php', 'users.php',
-       'version.php', 'web_services.php', 'widgets.php', 'xml.php', 'xml-rpc.php'
+       'version.php', 'web_services.php', 'widgets.php', 'xml.php', 'xml-rpc.php',
+       
+       'deprecated.php'
 );
 
 foreach ($lib_files as $file) {