aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-01-31 23:50:21 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-01-31 23:50:21 +0000
commit0a274719cddf5fd2cc26804fb51fdd28a1bcabe0 (patch)
tree37af4997b98822260900c376e8768da42d48cf7b
parent10136dab54a59af57071c56e11e5ac2b394b0a2a (diff)
downloadelgg-0a274719cddf5fd2cc26804fb51fdd28a1bcabe0.tar.gz
elgg-0a274719cddf5fd2cc26804fb51fdd28a1bcabe0.tar.bz2
Deprecated old search functions and views.
git-svn-id: http://code.elgg.org/elgg/trunk@3872 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--CHANGES.txt2
-rw-r--r--engine/lib/entities.php4
-rw-r--r--engine/lib/group.php7
-rw-r--r--engine/lib/objects.php7
-rw-r--r--engine/lib/sites.php2
-rw-r--r--engine/lib/users.php7
-rw-r--r--mod/search/views/default/search/listing.php2
-rw-r--r--views/default/group/search/finishblurb.php3
-rw-r--r--views/default/group/search/startblurb.php4
-rw-r--r--views/default/user/search/finishblurb.php5
-rw-r--r--views/default/user/search/startblurb.php6
11 files changed, 40 insertions, 9 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index a224c21cf..2c47d2ff3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -36,6 +36,8 @@ http://code.elgg.org/elgg/.....
* clear_all_plugin_settings() added.
* get_entity_relationships() supports inverse relationships. #1472.
* can_write_to_container() can be overridden with the container_permissions_check hook. #1164 (part 2).
+ * Deprecated search_for_*().
+ * Deprecated search_list*().
Services API:
* Separated user and api authenticate processing
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 59dc65658..2519400d6 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -3576,8 +3576,6 @@ function entities_init() {
register_plugin_hook('permissions_check:metadata','all','recursive_delete_permissions_check');
register_plugin_hook('gc','system','entities_gc');
-
- register_plugin_hook('search','all','search_list_entities_by_name');
}
/** Register the import hook */
@@ -3593,4 +3591,4 @@ register_plugin_hook('volatile', 'metadata', 'volatile_data_export_plugin_hook')
register_plugin_hook('entity:icon:url', 'all', 'default_entity_icon_hook', 1000);
/** Register init system event **/
-register_elgg_event_handler('init','system','entities_init'); \ No newline at end of file
+register_elgg_event_handler('init','system','entities_init');
diff --git a/engine/lib/group.php b/engine/lib/group.php
index cbc34b71b..3a6f3adf1 100644
--- a/engine/lib/group.php
+++ b/engine/lib/group.php
@@ -867,8 +867,10 @@ function add_group_tool_option($name,$label,$default_on=true) {
* @param int $offset Offset.
* @param string $order_by The order.
* @param boolean $count Whether to return the count of results or just the results.
+ * @deprecated 1.7
*/
function search_for_group($criteria, $limit = 10, $offset = 0, $order_by = "", $count = false) {
+ elgg_log('search_for_group() was deprecated in 1.7.', 'WARNING');
global $CONFIG;
$criteria = sanitise_string($criteria);
@@ -905,9 +907,10 @@ function search_for_group($criteria, $limit = 10, $offset = 0, $order_by = "", $
/**
* Returns a formatted list of groups suitable for injecting into search.
- *
+ * @deprecated 1.7
*/
function search_list_groups_by_name($hook, $user, $returnvalue, $tag) {
+ elgg_log('search_list_groups_by_name() was deprecated in 1.7.', 'WARNING');
// Change this to set the number of groups that display on the search page
$threshold = 4;
@@ -935,8 +938,10 @@ function search_list_groups_by_name($hook, $user, $returnvalue, $tag) {
* @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_log('list_group_search() was deprecated in 1.7.', 'WARNING');
$offset = (int) get_input('offset');
$limit = (int) $limit;
$count = (int) search_for_group($tag, 10, 0, '', true);
diff --git a/engine/lib/objects.php b/engine/lib/objects.php
index f2faf0d10..8f49ea1fa 100644
--- a/engine/lib/objects.php
+++ b/engine/lib/objects.php
@@ -293,8 +293,10 @@ function delete_object_entity($guid) {
* @param int $offset Offset.
* @param string $order_by The order.
* @param boolean $count Whether to return the count of results or just the results.
+ * @deprecated 1.7
*/
function search_for_object($criteria, $limit = 10, $offset = 0, $order_by = "", $count = false) {
+ elgg_log('search_for_object was deprecated in 1.7.', 'WARNING');
global $CONFIG;
$criteria = sanitise_string($criteria);
@@ -355,9 +357,12 @@ function objects_test($hook, $type, $value, $params) {
/**
* Returns a formatted list of objects suitable for injecting into search.
+ * @deprecated 1.7
*
*/
function search_list_objects_by_name($hook, $user, $returnvalue, $tag) {
+ elgg_log('search_list_objects_by_name was deprecated in 1.7.', 'WARNING');
+
// Change this to set the number of users that display on the search page
$threshold = 4;
@@ -379,4 +384,4 @@ function search_list_objects_by_name($hook, $user, $returnvalue, $tag) {
}
register_elgg_event_handler('init', 'system', 'objects_init', 0);
-register_plugin_hook('unit_test', 'system', 'objects_test'); \ No newline at end of file
+register_plugin_hook('unit_test', 'system', 'objects_test');
diff --git a/engine/lib/sites.php b/engine/lib/sites.php
index 0892f2963..c69032bd2 100644
--- a/engine/lib/sites.php
+++ b/engine/lib/sites.php
@@ -501,8 +501,10 @@ function get_site_by_url($url) {
* @param int $offset Offset.
* @param string $order_by The order.
* @param boolean $count Whether to return the count of results or just the results.
+ * @deprecated 1.7
*/
function search_for_site($criteria, $limit = 10, $offset = 0, $order_by = "", $count = false) {
+ elgg_log('search_for_site() was deprecated in 1.7.', 'WARNING');
global $CONFIG;
$criteria = sanitise_string($criteria);
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 341024a45..5e5486133 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -869,8 +869,10 @@ function get_user_by_email($email) {
* @param int $offset Offset.
* @param string $order_by The order.
* @param boolean $count Whether to return the count of results or just the results.
+ * @deprecated 1.7
*/
function search_for_user($criteria, $limit = 10, $offset = 0, $order_by = "", $count = false) {
+ elgg_log('search_for_user() was deprecated in 1.7.', 'WARNING');
global $CONFIG;
$criteria = sanitise_string($criteria);
@@ -913,8 +915,10 @@ function search_for_user($criteria, $limit = 10, $offset = 0, $order_by = "", $c
* @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_user_search($tag, $limit = 10) {
+ elgg_log('list_user_search() deprecated in 1.7', 'WARNING');
$offset = (int) get_input('offset');
$limit = (int) $limit;
$count = (int) search_for_user($tag, 10, 0, '', true);
@@ -1540,9 +1544,10 @@ function users_init() {
/**
* Returns a formatted list of users suitable for injecting into search.
- *
+ * @deprecated 1.7
*/
function search_list_users_by_name($hook, $user, $returnvalue, $tag) {
+ elgg_log('search_list_users_by_name() was deprecated in 1.7', 'WARNING');
// Change this to set the number of users that display on the search page
$threshold = 4;
diff --git a/mod/search/views/default/search/listing.php b/mod/search/views/default/search/listing.php
index 5142e1fe5..3b699aef7 100644
--- a/mod/search/views/default/search/listing.php
+++ b/mod/search/views/default/search/listing.php
@@ -8,6 +8,8 @@
* @link http://elgg.org/
*/
+var_dump("arg");
+
$entities = $vars['results']['entities'];
$count = $vars['results']['count'] - count($entities);
diff --git a/views/default/group/search/finishblurb.php b/views/default/group/search/finishblurb.php
index 4164c6713..a030fbac5 100644
--- a/views/default/group/search/finishblurb.php
+++ b/views/default/group/search/finishblurb.php
@@ -4,7 +4,10 @@
* @subpackage Core
* @author Curverider Ltd
* @link http://elgg.org/
+ * @deprecated 1.7
*/
+elgg_log('view groups/search/finishblurb was deprecated in 1.7', 'WARNING');
+
if ($vars['count'] > $vars['threshold']) {
?>
diff --git a/views/default/group/search/startblurb.php b/views/default/group/search/startblurb.php
index 3abfe4dc5..64425af69 100644
--- a/views/default/group/search/startblurb.php
+++ b/views/default/group/search/startblurb.php
@@ -4,11 +4,13 @@
* @subpackage Core
* @author Curverider Ltd
* @link http://elgg.org/
+ * @deprecated 1.7
*/
+elgg_log('view groups/search/startblurb was deprecated in 1.7', 'WARNING');
?>
<div class="contentWrapper">
<?php
echo sprintf(elgg_echo("group:search:startblurb"),$vars['tag']);
?>
-</div> \ No newline at end of file
+</div>
diff --git a/views/default/user/search/finishblurb.php b/views/default/user/search/finishblurb.php
index 58c8655e8..87ab0b60d 100644
--- a/views/default/user/search/finishblurb.php
+++ b/views/default/user/search/finishblurb.php
@@ -4,8 +4,11 @@
* @subpackage Core
* @author Curverider Ltd
* @link http://elgg.org/
+ * @deprecated 1.7
*/
+elgg_log('view user/search/finishblurb was deprecated in 1.7', 'WARNING');
+
if ($vars['count'] > $vars['threshold']) {
?>
@@ -14,4 +17,4 @@ if ($vars['count'] > $vars['threshold']) {
?></a></div>
<?php
-} \ No newline at end of file
+}
diff --git a/views/default/user/search/startblurb.php b/views/default/user/search/startblurb.php
index 37c2ff818..2866ba9ad 100644
--- a/views/default/user/search/startblurb.php
+++ b/views/default/user/search/startblurb.php
@@ -3,8 +3,12 @@
* @package Elgg
* @subpackage Core
* @author Curverider Ltd
+ * @deprecated 1.7
* @link http://elgg.org/
*/
+
+elgg_log('view user/search/startblurb was deprecated in 1.7', 'WARNING');
+
?>
<div class="contentWrapper">
<?php
@@ -12,4 +16,4 @@
echo sprintf(elgg_echo("user:search:startblurb"),$vars['tag']);
?>
-</div> \ No newline at end of file
+</div>