summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e875e84)
raw | patch | inline | side by side (parent: e875e84)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 11 Oct 2010 10:19:49 +0000 (10:19 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 11 Oct 2010 10:19:49 +0000 (10:19 +0000) |
-Added error handling
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19971 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19971 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/groupware/admin/ogroups/DistributionList/class_DistributionList.inc | patch | blob | history |
diff --git a/gosa-plugins/groupware/admin/ogroups/DistributionList/class_DistributionList.inc b/gosa-plugins/groupware/admin/ogroups/DistributionList/class_DistributionList.inc
index d5330f4e144ac7ea8f144c25333d90f9102c1878..36a4381ec1e447ec4f4fb6825438952f7f576ac7 100644 (file)
private $rpcError = FALSE;
private $rpcErrorMessage = "";
- function __construct($config, $dn, $attrs)
+ public $view_logged = FALSE;
+
+ function __construct($config, $dn, $attrs = NULL)
{
- plugin::plugin($config, $dn, $attr);
+ plugin::plugin($config, $dn, $attrs);
// Get attributes from parent object
foreach(array("uid","cn") as $attr){
// Check whether a mathing distribution-list exsits or not?
$rpc = $this->config->getRpcHandle();
$is_account = $rpc->gwDistExists($this->cn);
-
+ $this->rpcError = FALSE;
+
// An error occured abort here
if(!$rpc->success()){
$this->rpcError = TRUE;
$this->rpcErrorMessage = $rpc->get_error();
- msg_dialog::display(msgPool::rpcError($this->rpcErrorMessage));
+ msg_dialog::display(_("Error"),msgPool::rpcError($this->rpcErrorMessage), ERROR_DIALOG);
return;
}
if(!$rpc->success()){
$this->rpcError = TRUE;
$this->rpcErrorMessage = $rpc->get_error();
- msg_dialog::display(msgPool::rpcError($this->rpcErrorMessage));
+ msg_dialog::display(_("Error"),msgPool::rpcError($this->rpcErrorMessage), ERROR_DIALOG);
return;
}
if(!$rpc->success()){
$this->rpcError = TRUE;
$this->rpcErrorMessage = $rpc->get_error();
- msg_dialog::display(msgPool::rpcError($this->rpcErrorMessage));
+ msg_dialog::display(_("Error"),msgPool::rpcError($this->rpcErrorMessage), ERROR_DIALOG);
return;
}
if(!$rpc->success()){
$this->rpcError = TRUE;
$this->rpcErrorMessage = $rpc->get_error();
- msg_dialog::display(msgPool::rpcError($this->rpcErrorMessage));
+ msg_dialog::display(_("Error"),msgPool::rpcError($this->rpcErrorMessage), ERROR_DIALOG);
return;
}
$this->memberList = $memberList;
$this->primaryMailAddress = $primaryMailAddress;
$this->alternateAddresses = $alternateAddresses;
+ $this->initialized = TRUE;
}
{
plugin::execute();
+ // Initialization failed - Display a stripped template which allows
+ // to retry initialization
+ if(!$this->initialized){
+ $smarty = get_smarty();
+ $smarty->assign('rpcError' , $this->rpcError);
+ $smarty->assign('rpcErrorMessage' , $this->rpcErrorMessage);
+ return($smarty->fetch(get_template_path('DistributionList/initFailed.tpl', TRUE)));
+ }
+
+
// Log account access
if($this->is_account && !$this->view_logged){
$this->view_logged = TRUE;
}
return($display);
}
+
+
+ function save_object()
+ {
+
+ if(isset($_POST['retryInit'])){
+ $this->init();
+ }
+ }
}
?>