From d727e34edb5cdec412f1bf965de426a134548f5f Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 3 May 2006 11:07:40 +0000 Subject: [PATCH] Added check to preent white screen git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3194 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_glpiAccount.inc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/admin/systems/class_glpiAccount.inc b/plugins/admin/systems/class_glpiAccount.inc index 353bf8e3f..0f8733c95 100644 --- a/plugins/admin/systems/class_glpiAccount.inc +++ b/plugins/admin/systems/class_glpiAccount.inc @@ -652,9 +652,16 @@ class glpiAccount extends plugin function remove_from_parent() { - $this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']); - if($this->initialy_was_account){ - $this->handle->removeComputerInformations($this->dn); + if(!$this->initialy_was_account){ + return; + } + if(function_exists("mysql_pconnect")){ + $this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']); + if($this->initialy_was_account){ + $this->handle->removeComputerInformations($this->dn); + } + }else{ + print_red(_("Can't remove glpi account, while mysql extension is missing.")); } } -- 2.30.2