diff options
| author | Sem <sembrestels@riseup.net> | 2012-04-25 19:09:22 +0200 | 
|---|---|---|
| committer | Sem <sembrestels@riseup.net> | 2012-04-25 19:09:22 +0200 | 
| commit | 9fe063022e08a4b6fa5f5935f8f185d5d95814a4 (patch) | |
| tree | 87377f7b889efc639935508556beb9baf010e821 /engine/lib/metastrings.php | |
| parent | 24690ed95198c093e6fbb91a94b5d0544c740f89 (diff) | |
| download | elgg-9fe063022e08a4b6fa5f5935f8f185d5d95814a4.tar.gz elgg-9fe063022e08a4b6fa5f5935f8f185d5d95814a4.tar.bz2  | |
Upgraded to Elgg 1.8.4.
Diffstat (limited to 'engine/lib/metastrings.php')
| -rw-r--r-- | engine/lib/metastrings.php | 33 | 
1 files changed, 3 insertions, 30 deletions
diff --git a/engine/lib/metastrings.php b/engine/lib/metastrings.php index 62b60e279..d7cc4e0bc 100644 --- a/engine/lib/metastrings.php +++ b/engine/lib/metastrings.php @@ -727,38 +727,11 @@ function elgg_batch_metastring_based_objects(array $options, $callback) {  		return false;  	} -	switch($options['metastring_type']) { -		case 'metadata': -			$objects = elgg_get_metadata($options); -			break; - -		case 'annotations': -			$objects = elgg_get_annotations($options); -			break; - -		default: -			return false; -	} - -	if (!is_array($objects)) { -		$r = false; -	} elseif (empty($objects)) { -		// ElggBatch returns null if the results are an empty array -		$r = null; -	} else { -		$r = true; -		foreach($objects as $object) { -			$r = $r && $callback($object); -		} -	} +	// @todo restore once ElggBatch supports callbacks that delete rows. +	$batch = new ElggBatch('elgg_get_metastring_based_objects', $options, $callback, 50, false); +	$r = $batch->callbackResult;  	return $r; - -//	// @todo restore once ElggBatch supports callbacks that delete rows. -//	$batch = new ElggBatch('elgg_get_metastring_based_objects', $options, $callback); -//	$r = $batch->callbackResult; -// -//	return $r;  }  /**  | 
