Code

Fixed Kolab attribute mapping.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Nov 2005 11:09:44 +0000 (11:09 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Nov 2005 11:09:44 +0000 (11:09 +0000)
AlternateEmail addresses wasn't displayed.
GOsa mailQuota caused an error if it wasn't defined

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1920 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_divSelectBox.inc
include/class_mail-methods-kolab.inc
plugins/gofax/faxaccount/class_gofaxAccount.inc
plugins/personal/mail/class_mailAccount.inc

index 303c37e1cf97eb5125c15006d059a7759a7eabcb..a853d16b2d29188889323ed6a1913e9de84610f1 100644 (file)
@@ -31,13 +31,13 @@ class divSelectBox {
 
   function DrawList(){
     $s_return  = "";
-    $s_return .= "<div style=\"height:2px; overflow:hidden;background:#888888;width:".($this->width-18)."px;\"></div>\n";
-    $s_return .= "<div style=\"padding-right:1px;padding-bottom:2px;\" height='".($this->height)."' width='".($this->width)."'>\n";
-    $s_return .= "<div style=\"overflow: auto;height:".$this->height."px;width:".($this->width)."px;\">\n";
+    $s_return .= "<div style=\"height:2px; overflow:hidden;background:#888888;width:100%;margin-right:18px;\"></div>\n";
+    $s_return .= "<div style=\"padding-right:1px;padding-bottom:2px;\" height='100%' width='100%'>\n";
+    $s_return .= "<div style=\"overflow: auto;height:100%;width:100%;\">\n";
     $s_return .= "<table ".
                     "summary='".$this->s_summary."' ".
-                    "width='".($this->width-18)."' ".
-                    "height='".($this->height)."' ".
+                    "width='100%' ".
+                    "height='100%' ".
                     "cellspacing='0' ".
                     "style='overflow:scroll; ".
                     "padding-right:1px; ".
index 98fea37efb740521155b75e050ad3ff5ceb08cab..8a9863e8530f2cb33626f3f91259d03fceec5ad1 100644 (file)
@@ -53,10 +53,20 @@ class mailMethodKolab extends mailMethodCyrus
 
   function fixAttributesOnLoad(&$mailObject)
   {
-    /* Convert attributes and objectClasses */
+    * Convert attributes and objectClasses */
     foreach ($this->attribute_map as $dest => $source){
+      /* Hickert 11.11.05 : Alternate email addresses were saved, but not displayed again.
+      if (isset($mailObject->attrs[$source])){
+        $mailObject->attrs[$dest]= $mailObject->attrs[$source];
+        unset ($mailObject->attrs[$source]);
+      */
+
       if (isset($mailObject->attrs[$source])){
+        unset($mailObject->attrs[$source]['count']);
         $mailObject->attrs[$dest]= $mailObject->attrs[$source];
+        $mailObject->$dest=        $mailObject->attrs[$source];
+
+        unset ($mailObject->$dest['count']);
         unset ($mailObject->attrs[$source]);
       }
     }
index 790525849ac010fbb32b9d1cb323d9ea7977b7c0..24c94a4848a79e00b6c1fbf9d15665e4807cb219 100644 (file)
@@ -411,8 +411,8 @@ class gofaxAccount extends plugin
 
       /* Create our divselect box */
       $divSel = new divSelectBox("divSelectPredefined");
-      $divSel->setHeight(300);
-      $divSel->setWidth(350);
+      $divSel->setHeight(150);
+      $divSel->setWidth(150);
 
       /* NEW LIST MANAGMENT
        * We also need to search for the departments
index 61a8327c2e31a50a15b102f5d02b671e7589a48b..fc1cf61e3210a4c184f71d40a73837272c08f22e 100644 (file)
@@ -637,7 +637,7 @@ class mailAccount extends plugin
     $method->fixAttributesOnStore($this);
 
     /* Remove Mailquota if = "" */
-    if($this->attrs['gosaMailQuota']=="") {
+    if((isset($this->attrs['gosaMailQuota']))&&($this->attrs['gosaMailQuota']=="")) {
       $this->attrs['gosaMailQuota']=array();
     }