summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-07-14 15:56:21 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-07-14 15:56:21 (GMT)
commit05c0866e9b81eac23171a2e753a3f8fe720757f0 (patch)
tree9b374bbc503c4d0c80dca5ed07feeec318e7c07e
parent253dd2c9f6054919036ccc56e07b6ccdb8608608 (diff)
downloadkolab-webadmin-05c0866e9b81eac23171a2e753a3f8fe720757f0.tar.gz
Only refer to $handler if $handler is indeed set.
-rw-r--r--www/admin/user/deliver.php7
-rw-r--r--www/admin/user/forward.php10
-rw-r--r--www/admin/user/vacation.php15
3 files changed, 21 insertions, 11 deletions
diff --git a/www/admin/user/deliver.php b/www/admin/user/deliver.php
index 93f738c..1c955f1 100644
--- a/www/admin/user/deliver.php
+++ b/www/admin/user/deliver.php
@@ -84,8 +84,11 @@ $smarty->assign( 'menuitems', $menuitems );
$smarty->assign( 'submenuitems',
array_key_exists('submenu',
$menuitems[$sidx])?$menuitems[$sidx]['submenu']:array() );
-$smarty->assign( 'active', $handler->fetchDeliverySegment()->isActive() );
-$smarty->assign( 'inbox', $handler->fetchDeliverySegment()->getDeliveryFolder() );
+if (isset($handler)) {
+ $smarty->assign( 'active', $handler->fetchDeliverySegment()->isActive() );
+ $smarty->assign( 'inbox', $handler->fetchDeliverySegment()->getDeliveryFolder() );
+}
+
$smarty->assign( 'maincontent', 'deliver.tpl' );
$smarty->display('page.tpl');
diff --git a/www/admin/user/forward.php b/www/admin/user/forward.php
index 789ba44..e470279 100644
--- a/www/admin/user/forward.php
+++ b/www/admin/user/forward.php
@@ -86,9 +86,13 @@ $smarty->assign( 'menuitems', $menuitems );
$smarty->assign( 'submenuitems',
array_key_exists('submenu',
$menuitems[$sidx])?$menuitems[$sidx]['submenu']:array() );
-$smarty->assign( 'active', $handler->fetchForwardSegment()->isActive() );
-$smarty->assign( 'keep', $handler->fetchForwardSegment()->getKeepOnServer() );
-$smarty->assign( 'address', $handler->fetchForwardSegment()->getForwardAddress() );
+
+if (isset($handler)) {
+ $smarty->assign( 'active', $handler->fetchForwardSegment()->isActive() );
+ $smarty->assign( 'keep', $handler->fetchForwardSegment()->getKeepOnServer() );
+ $smarty->assign( 'address', $handler->fetchForwardSegment()->getForwardAddress() );
+}
+
$smarty->assign( 'maincontent', 'forward.tpl' );
$smarty->display('page.tpl');
diff --git a/www/admin/user/vacation.php b/www/admin/user/vacation.php
index 3076847..f0cbac0 100644
--- a/www/admin/user/vacation.php
+++ b/www/admin/user/vacation.php
@@ -87,12 +87,15 @@ $smarty->assign( 'menuitems', $menuitems );
$smarty->assign( 'submenuitems',
array_key_exists('submenu',
$menuitems[$sidx])?$menuitems[$sidx]['submenu']:array() );
-$smarty->assign( 'active', $handler->fetchVacationSegment()->isActive() );
-$smarty->assign( 'text', $handler->fetchVacationSegment()->getResponse() );
-$smarty->assign( 'addresses', $addresses );
-$smarty->assign( 'maildomain', $handler->fetchVacationSegment()->getDomain() );
-$smarty->assign( 'reacttospam', !$handler->fetchVacationSegment()->getReactToSpam() );
-$smarty->assign( 'days', $handler->fetchVacationSegment()->getResendAfter() );
+if (isset($handler)) {
+ $smarty->assign( 'active', $handler->fetchVacationSegment()->isActive() );
+ $smarty->assign( 'text', $handler->fetchVacationSegment()->getResponse() );
+ $smarty->assign( 'addresses', $addresses );
+ $smarty->assign( 'maildomain', $handler->fetchVacationSegment()->getDomain() );
+ $smarty->assign( 'reacttospam', !$handler->fetchVacationSegment()->getReactToSpam() );
+ $smarty->assign( 'days', $handler->fetchVacationSegment()->getResendAfter() );
+}
+
$smarty->assign( 'maincontent', 'vacation.tpl' );
$smarty->display('page.tpl');