Do not offer these blocks if there is no chance they'll work.
authorGunnar Wrobel <p@rdus.de>
Thu, 2 Dec 2010 04:58:35 +0000 (05:58 +0100)
committerGunnar Wrobel <p@rdus.de>
Thu, 2 Dec 2010 04:58:35 +0000 (05:58 +0100)
horde/lib/Block/feed.php
horde/lib/Block/google.php
horde/lib/Block/vatid.php

index 2052b30..ef58124 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
-$block_name = _("Syndicated Feed");
+if (class_exists('Horde_Feed')) {
+    $block_name = _("Syndicated Feed");
+}
 
 /**
  * @package Horde_Block
index fddeaf8..811b937 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
-$block_name = _("Google Search");
+if (isset($GLOBALS['conf']['api']['googlesearch'])) {
+    $block_name = _("Google Search");
+}
 
 /**
  * @package Horde_Block
index 0463b16..036c894 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
-$block_name = _("EU VAT identification");
+if (class_exists('SOAP_Client')) {
+    $block_name = _("EU VAT identification");
+}
 
 /**
  * @package Horde_Block