]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Deprecated old search functions and views.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 31 Jan 2010 23:50:21 +0000 (23:50 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 31 Jan 2010 23:50:21 +0000 (23:50 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3872 36083f99-b078-4883-b0ff-0f9b5a30f544

CHANGES.txt
engine/lib/entities.php
engine/lib/group.php
engine/lib/objects.php
engine/lib/sites.php
engine/lib/users.php
mod/search/views/default/search/listing.php
views/default/group/search/finishblurb.php
views/default/group/search/startblurb.php
views/default/user/search/finishblurb.php
views/default/user/search/startblurb.php

index a224c21cf1520e34610e90bfda350fbcd1d039b4..2c47d2ff34a35d4be99fa579cd8f464f935b4f80 100644 (file)
@@ -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
index 59dc656588c0b03b93d5bcc083eaeb948b6343e1..2519400d6ad9504d932ca31fcf88c0422b912783 100644 (file)
@@ -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');
index cbc34b71be0dc301b4d21d25443df05b5b345d56..3a6f3adf1f6c416fb7e613f6070792bbbbca6856 100644 (file)
@@ -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);
index f2faf0d10154a8601aa92e36b720f254c3406b30..8f49ea1faae56b935da2e9d14be3e3c07092f39f 100644 (file)
@@ -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');
index 0892f296353343c48b51b2a664ba9a5aa3c514b7..c69032bd25888535495d041d6d4627f8a2b7537b 100644 (file)
@@ -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);
index 341024a45a0cdecffdf0b4c3bdd48ea9d198b418..5e5486133213b24c8d3bbd55a6b5d1d581dcd152 100644 (file)
@@ -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;
 
index 5142e1fe52a3c8037c1059397518794649b6f629..3b699aef784877a54df5b09427c94d07f0e768b9 100644 (file)
@@ -8,6 +8,8 @@
  * @link http://elgg.org/
  */
 
+var_dump("arg");
+
 $entities = $vars['results']['entities'];
 $count = $vars['results']['count'] - count($entities);
 
index 4164c6713feb5e797d2d2a9488bca3015978491e..a030fbac5d12c132a8599e8304bc60032002fd90 100644 (file)
@@ -4,7 +4,10 @@
  * @subpackage Core\r
  * @author Curverider Ltd\r
  * @link http://elgg.org/\r
+ * @deprecated 1.7\r
  */\r
+elgg_log('view groups/search/finishblurb was deprecated in 1.7', 'WARNING');\r
+\r
 if ($vars['count'] > $vars['threshold']) {\r
 \r
 ?>\r
index 3abfe4dc52b6b3f4cf7d8b60bebf802f0d9b5618..64425af69cb80cac9a44b3132436f54f6da08a23 100644 (file)
@@ -4,11 +4,13 @@
  * @subpackage Core\r
  * @author Curverider Ltd\r
  * @link http://elgg.org/\r
+ * @deprecated 1.7\r
  */\r
+elgg_log('view groups/search/startblurb was deprecated in 1.7', 'WARNING');\r
 ?>\r
 \r
 <div class="contentWrapper">\r
        <?php\r
                echo sprintf(elgg_echo("group:search:startblurb"),$vars['tag']);\r
        ?>\r
-</div>
\ No newline at end of file
+</div>\r
index 58c8655e86e70fcd12a38c1a2cc0a35571f80412..87ab0b60db914314141c566e06af17504a5e316c 100644 (file)
@@ -4,8 +4,11 @@
  * @subpackage Core\r
  * @author Curverider Ltd\r
  * @link http://elgg.org/\r
+ * @deprecated 1.7\r
  */\r
 \r
+elgg_log('view user/search/finishblurb was deprecated in 1.7', 'WARNING');\r
+\r
 if ($vars['count'] > $vars['threshold']) {\r
 \r
 ?>\r
@@ -14,4 +17,4 @@ if ($vars['count'] > $vars['threshold']) {
        ?></a></div>\r
 <?php\r
 \r
-}
\ No newline at end of file
+}\r
index 37c2ff818fabcdcfb32a1e97bf72ea0df5e5ee09..2866ba9ad5a2532c45492c5bb1220b1326f4fb46 100644 (file)
@@ -3,8 +3,12 @@
  * @package Elgg\r
  * @subpackage Core\r
  * @author Curverider Ltd\r
+ * @deprecated 1.7\r
  * @link http://elgg.org/\r
  */\r
+\r
+elgg_log('view user/search/startblurb was deprecated in 1.7', 'WARNING');\r
+\r
 ?>\r
 <div class="contentWrapper">\r
        <?php\r
@@ -12,4 +16,4 @@
                echo sprintf(elgg_echo("user:search:startblurb"),$vars['tag']);\r
 \r
        ?>\r
-</div>
\ No newline at end of file
+</div>\r