]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Removed worthless function from previous commit.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 13 Feb 2011 23:02:40 +0000 (23:02 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 13 Feb 2011 23:02:40 +0000 (23:02 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8208 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/metastrings.php

index bcb15c338c3fe996f38999bad3a0735d81edf28b..958afa1bf32fdcdfe10c2bf368983cacc37b24e9 100644 (file)
@@ -663,76 +663,6 @@ function elgg_set_metastring_based_object_enabled_by_id($id, $enabled, $type) {
        return $return;
 }
 
-/**
- * Enables or disables a metastrings-based objects by their entity_guid.
- *
- * @param int    $guid    The object's ID
- * @param string $enabled Value to set to: yes or no
- * @param string $type    The type of table to use: metadata or anntations
- * @param string $name    Optional metastring name. If not set, affects all metadata.
- *
- * @return bool
- */
-function elgg_set_metastring_based_object_enabled_by_guid($guid, $enabled, $type, $name = null) {
-       $valid_types = array('annotations', 'annotation', 'metadata');
-       $guid = (int)$guid;
-       $entity = get_entity($guid);
-
-       if (!in_array($type, $valid_types)) {
-               return false;
-       }
-
-       if (!$entity || !$entity->canEdit()) {
-               return false;
-       }
-
-       switch($enabled) {
-               case true:
-               case 1:
-               case 'yes':
-                       $callback = 'elgg_batch_enable_callback';
-                       break;
-
-               case false:
-               case 0:
-               case 'no':
-                       $callback = 'elgg_batch_disable_callback';
-                       break;
-       }
-
-       $ashe = access_get_show_hidden_status();
-       access_show_hidden_entities(true);
-
-       switch($type) {
-               case 'annotation':
-               case 'annotations':
-                       $getter = 'elgg_get_annotations';
-                       if ($name) {
-                               $options['annotation_name'] = $name;
-                       }
-                       break;
-
-               case 'metadata':
-                       $getter = 'elgg_get_metadata';
-                       if ($name) {
-                               $options['metadata_name'] = $name;
-                       }
-                       break;
-       }
-
-       $options = array(
-               'guid' => $guid,
-               'limit' => 0
-       );
-
-       $batch = new ElggBatch('elgg_get_metadata', $options, 'elgg_batch_disable_callback');
-       $r = $batch->callbackResult;
-
-       access_show_hidden_entities($ashe);
-
-       return $r;
-}
-
 /**
  * Runs metastrings-based objects found using $options through $callback
  *