aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/annotations.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-14 01:24:51 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-14 01:24:51 +0000
commitc6fa7b510dc938a14ddd1d2ecf2c98017924b9da (patch)
treef8f9c28b7040cea9ad9fc1e9e4c4ee6d7dca2d58 /engine/lib/annotations.php
parentd3c49d7ee73a6f0bc680868147cc68cccba611a9 (diff)
downloadelgg-c6fa7b510dc938a14ddd1d2ecf2c98017924b9da.tar.gz
elgg-c6fa7b510dc938a14ddd1d2ecf2c98017924b9da.tar.bz2
Refs #2912. Added checks for constraints in dangerous functions. Unit tests no longer remove all metadata/annotations.
git-svn-id: http://code.elgg.org/elgg/trunk@8215 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/annotations.php')
-rw-r--r--engine/lib/annotations.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php
index 9b3b49626..d4483ab82 100644
--- a/engine/lib/annotations.php
+++ b/engine/lib/annotations.php
@@ -200,7 +200,7 @@ function elgg_get_annotations(array $options = array()) {
* @since 1.8
*/
function elgg_delete_annotations(array $options) {
- if (!$options || !is_array($options)) {
+ if (!elgg_is_valid_options_for_batch_operation($options, 'annotations')) {
return false;
}
@@ -218,7 +218,7 @@ function elgg_delete_annotations(array $options) {
* @since 1.8
*/
function elgg_disable_annotations(array $options) {
- if (!$options || !is_array($options)) {
+ if (!elgg_is_valid_options_for_batch_operation($options, 'annotations')) {
return false;
}