From 3ac9ea18edcc4a0eb73aad555f4ecdce959f7a5a Mon Sep 17 00:00:00 2001 From: Michael Slusarz Date: Sun, 14 Feb 2010 14:51:53 -0700 Subject: [PATCH] style --- ingo/lib/Ingo.php | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/ingo/lib/Ingo.php b/ingo/lib/Ingo.php index 40588f422..a0e4f01aa 100644 --- a/ingo/lib/Ingo.php +++ b/ingo/lib/Ingo.php @@ -69,25 +69,25 @@ class Ingo $_SESSION['ingo']['script_generate'] = $ingo_script->generateAvailable(); /* Disable categories as specified in preferences */ - $disabled = array(); + $categories = array_merge($ingo_script->availableActions(), $ingo_script->availableCategories()); if ($prefs->isLocked('blacklist')) { - $disabled[] = Ingo_Storage::ACTION_BLACKLIST; + unset($categories[Ingo_Storage::ACTION_BLACKLIST]); } if ($prefs->isLocked('whitelist')) { - $disabled[] = Ingo_Storage::ACTION_WHITELIST; + unset($categories[Ingo_Storage::ACTION_WHITELIST]); } if ($prefs->isLocked('vacation')) { - $disabled[] = Ingo_Storage::ACTION_VACATION; + unset($categories[Ingo_Storage::ACTION_VACATION]); } if ($prefs->isLocked('forward')) { - $disabled[] = Ingo_Storage::ACTION_FORWARD; + unset($categories[Ingo_Storage::ACTION_FORWARD]); } if ($prefs->isLocked('spam')) { - $disabled[] = Ingo_Storage::ACTION_SPAM; + unset($categories[Ingo_Storage::ACTION_SPAM]); } /* Set the list of categories this driver supports. */ - $_SESSION['ingo']['script_categories'] = array_merge($ingo_script->availableActions(), array_diff($ingo_script->availableCategories(), $disabled)); + $_SESSION['ingo']['script_categories'] = $categories; } /** @@ -126,8 +126,7 @@ class Ingo } $text .= '"'; } - $text .= ">\n"; - $text .= '\n"; + $text .= "\n\n"; if ($registry->hasMethod('mail/createFolder')) { $text .= '\n"; @@ -143,8 +142,7 @@ class Ingo Horde_Text_Filter::filter($label, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true)), "\n"); } - $text .= ''; - return $text; + return $text . ''; } catch (Horde_Exception $e) {} } @@ -178,9 +176,9 @@ class Ingo if (empty($GLOBALS['ingo_shares'])) { $user = ($full || (isset($_SESSION['ingo']['backend']['hordeauth']) && - $_SESSION['ingo']['backend']['hordeauth'] === 'full')) ? - Horde_Auth::getAuth() : - Horde_Auth::getBareAuth(); + $_SESSION['ingo']['backend']['hordeauth'] === 'full')) + ? Horde_Auth::getAuth() + : Horde_Auth::getBareAuth(); } else { list(, $user) = explode(':', $_SESSION['ingo']['current_share'], 2); } @@ -305,7 +303,7 @@ class Ingo } /* Check for valid backend configuration. */ - if (!isset($backend)) { + if (is_null($backend)) { throw new Ingo_Exception(_("No backend configured for this host")); } -- 2.11.0