From 15d426cce3d75f9f7a3d8d972884327b687e7606 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 7 Jul 2010 13:38:43 +0000
Subject: [PATCH] Supress errors when language files are missing in dashboard
 widgets.

---
 interface/web/dashboard/dashlets/limits.php  | 3 ++-
 interface/web/dashboard/dashlets/modules.php | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php
index c2abb1c65..0f01ca235 100644
--- a/interface/web/dashboard/dashlets/limits.php
+++ b/interface/web/dashboard/dashlets/limits.php
@@ -106,8 +106,9 @@ class dashlet_limits {
 		$tpl = new tpl;
 		$tpl->newTemplate("dashlets/templates/limits.htm");
 		
+		$wb = array();
 		$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dashlet_limits.lng';
-		include($lng_file);
+		if(is_file($lng_file)) include($lng_file);
 		$tpl->setVar($wb);
 		
 		if($app->auth->is_admin()) {
diff --git a/interface/web/dashboard/dashlets/modules.php b/interface/web/dashboard/dashlets/modules.php
index 7824cd5a1..fa3f76108 100644
--- a/interface/web/dashboard/dashlets/modules.php
+++ b/interface/web/dashboard/dashlets/modules.php
@@ -11,8 +11,9 @@ class dashlet_modules {
 		$tpl = new tpl;
 		$tpl->newTemplate("dashlets/templates/modules.htm");
 		
+		$wb = array();
 		$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dashlet_modules.lng';
-		include($lng_file);
+		if(is_file($lng_file)) include($lng_file);
 		$tpl->setVar($wb);
 		
 		/*
-- 
GitLab