From 6b4fa801bcf63a681f99b07d649c5acce9ef07ee Mon Sep 17 00:00:00 2001 From: hukoeth Date: Sat, 18 Sep 2010 17:42:29 +0800 Subject: [PATCH] Fix variable not defined error --- .../helpers/photoannotation.php | 22 +++++-------------- .../helpers/photoannotation_theme.php | 2 +- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/modules/photoannotation/helpers/photoannotation.php b/modules/photoannotation/helpers/photoannotation.php index f43e66fc..ee126c99 100644 --- a/modules/photoannotation/helpers/photoannotation.php +++ b/modules/photoannotation/helpers/photoannotation.php @@ -230,17 +230,6 @@ class photoannotation_Core { } return $notification_settings; } - - public static function get_user_cloud() { - $users = ORM::factory("user")->order_by("name", "ASC")->find_all(); - foreach ($users as $user) { - $items_users_count = ORM::factory("items_user")->where("user_id", "=", $user->id)->count_all(); - if ($items_users_count > 0) { - $user_array[] = $user->display_name(); - } - } - return $user_array; - } static function cloud($count) { $users = ORM::factory("user")->order_by("name", "ASC")->find_all(); @@ -262,12 +251,13 @@ class photoannotation_Core { $user_array[$user->name]->url = user_profile::url($user->id); } } - $cloud->users = array_slice($user_array, 0, $count); - $cloud->max_count = $maxcount; - if (!$cloud->max_count) { - return; + if (isset($user_array)) { + $cloud->users = array_slice($user_array, 0, $count); + $cloud->max_count = $maxcount; + return $cloud; + } else { + return ""; } - return $cloud; } } diff --git a/modules/photoannotation/helpers/photoannotation_theme.php b/modules/photoannotation/helpers/photoannotation_theme.php index e255b883..15f584f8 100644 --- a/modules/photoannotation/helpers/photoannotation_theme.php +++ b/modules/photoannotation/helpers/photoannotation_theme.php @@ -38,7 +38,7 @@ class photoannotation_theme_Core { } else { $border_thickness = "1px"; } - if (!$noborder || !$noeditablehover || !$nohover) { + if (!$noborder || !$noclickablehover || !$nohover) { if (!$noborder) { $v .= ".image-annotate-area {\n border: 1px solid ". $bordercolor .";\n