[20898] Bug fix : fix the error box being displayed even if not necessary

Caeies <[email protected]>
Newsgroups gmane.comp.web.phpgroupware.cvs
Message-ID <[email protected]>
Revision: 20898
          http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=20898
Author:   Caeies
Date:     2009-11-25 17:58:11 +0000 (Wed, 25 Nov 2009)
Log Message:
-----------
Bug fix : fix the error box being displayed even if not necessary

Modified Paths:
--------------
    modules/admin/trunk/inc/class.uiaccounts.inc.php

Modified: modules/admin/trunk/inc/class.uiaccounts.inc.php
===================================================================
--- modules/admin/trunk/inc/class.uiaccounts.inc.php	2009-11-25 17:56:33 UTC (rev 20897)
+++ modules/admin/trunk/inc/class.uiaccounts.inc.php	2009-11-25 17:58:11 UTC (rev 20898)
@@ -949,7 +949,6 @@
 			$data = array
 			(
 				'page_title'			=> $account_id ? lang('edit user') : lang('add user'),
-				'msgbox_data'			=> array('msgbox_text' => $GLOBALS['phpgw']->common->error_list($errors)),
 				'edit_url'				=> $GLOBALS['phpgw']->link('/index.php',
 												array('menuaction' => 'admin.uiaccounts.edit_user')),
 				'lang_lid'				=> lang('loginid'),
@@ -990,6 +989,8 @@
 				'url_contacts_text'		=> $url_contacts_text,
 				'tabs'					=> phpgwapi_yui::tabview_generate($tabs, 'data')
 			);
+			if(is_array($errors) && count($errors))
+				$data['msgbox_data'] = array('msgbox_text' => $GLOBALS['phpgw']->common->error_list($errors));
 
 			/*
 				create the menu on the left, if needed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.