aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/metastrings.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-13 23:02:40 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-13 23:02:40 +0000
commit26f9c39ae33bc01b0f8c62b4e27f7ee077d0fadc (patch)
tree7bc4b48a48f7f0e0a5e852e9a34cabaf4f5f4963 /engine/lib/metastrings.php
parent4be522d7544b1aca0e08828bee42a9be7345bf9c (diff)
downloadelgg-26f9c39ae33bc01b0f8c62b4e27f7ee077d0fadc.tar.gz
elgg-26f9c39ae33bc01b0f8c62b4e27f7ee077d0fadc.tar.bz2
Removed worthless function from previous commit.
git-svn-id: http://code.elgg.org/elgg/trunk@8208 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/metastrings.php')
-rw-r--r--engine/lib/metastrings.php70
1 files changed, 0 insertions, 70 deletions
diff --git a/engine/lib/metastrings.php b/engine/lib/metastrings.php
index bcb15c338..958afa1bf 100644
--- a/engine/lib/metastrings.php
+++ b/engine/lib/metastrings.php
@@ -664,76 +664,6 @@ function elgg_set_metastring_based_object_enabled_by_id($id, $enabled, $type) {
}
/**
- * 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
*
* @warning Unlike elgg_get_metastring_based_objects() this will not accept an