Code

Posix account expiration date was set to 1970 for new created accounts
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 9 Nov 2006 04:48:02 +0000 (04:48 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 9 Nov 2006 04:48:02 +0000 (04:48 +0000)
- is now set to current date

Fixed w3c warnings in "mail add local" template.
Fixed malformed usage of class var ($this-var) in samba class.

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

plugins/personal/mail/mail_locals.tpl
plugins/personal/posix/class_posixAccount.inc
plugins/personal/samba/class_sambaAccount.inc

index 3af89089dc533a470a0fc034fb5539fb4d2540c4..d277ceb458c8ce830eb7079343ecd20c4d79a8af 100644 (file)
@@ -1,40 +1,74 @@
 <table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=4>
-<tr>
-  <td style="vertical-align:top;width:600px">
-   <div class="contentboxh" style="height:20px;">
-    <p class="contentboxh" style="font-size:12px">
-     <b><LABEL for="local_list">{t}Select addresses to add{/t}</LABEL> {$hint}</b><br>
-    </p>
-   </div>
-   <div class="contentboxb">
-    <p class="contentboxb" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
-     <select id="local_list" style="width:600px; margin-top:4px; height:450px;" name="local_list[]" size="15" multiple>
-               {html_options options=$mailusers}
-     </select>
-    </p>
-   </div>
-  </td>
-  <td style="vertical-align:top;">
-   <div class="contentboxh" style="height:20px;">
-    <p class="contentboxh" style="font-size:12px"><img src="{$launchimage}" align="right" alt="[F]"><b>
-       {t}Filters{/t}</b></p>
-   </div>
-   <div class="contentboxb" style="background-color:#F8F8F8">
-     <table summary="" style="width:100%;border-top:1px solid #B0B0B0; background-color:#F8F8F8">
-      {$alphabet}
-     </table>
-    <table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8"><tr><td><LABEL for="depselect"><img alt="" src="{$tree_image}" align=middle>&nbsp;
-    <select id="depselect" name="depselect" size=1 onChange="mainform.submit()" title="{t}Choose the department the search will be based on{/t}">
-               {html_options options=$deplist selected=$depselect}
-    </select></td></tr></table>
-    <table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8"><tr><td style="width:18px"><img alt="" src="{$search_image}" align=middle></td><td>
-    <input type='text' name='regex' maxlength='20' style="width:99%" value='{$regex}' title='{t}Regular expression for matching addresses{/t}' onChange="mainform.submit()"></td></tr></table>
-    <table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8"><tr><td width="18px"><img src="{$usearch_image}" align=middle alt={t}Display addresses of user{/t}""></td>
-    <td><input type='text' name='muser' maxlength='20' style="width:99%" value='{$muser}' title='{t}User name of which addresses are shown{/t}' onChange="mainform.submit()"></td></tr></table>
-   {$apply}
-   </div>
-  </td>
-</tr>
+  <tr>
+    <td style="vertical-align:top;width:600px">
+      <div class="contentboxh" style="height:20px;">
+        <p class="contentboxh" style="font-size:12px">
+          <b>
+            <LABEL for="local_list">{t}Select addresses to add{/t}</LABEL> 
+            {$hint}
+          </b>
+          <br>
+        </p>
+      </div>
+      <div class="contentboxb">
+        <p class="contentboxb" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
+          <select id="local_list" style="width:600px; margin-top:4px; height:450px;" name="local_list[]" size="15" multiple>
+                 {html_options options=$mailusers}
+          </select>
+        </p>
+      </div>
+    </td>
+    <td style="vertical-align:top;">
+      <div class="contentboxh" style="height:20px;">
+        <p class="contentboxh" style="font-size:12px">
+          <img src="{$launchimage}" align="right" alt="[F]">
+          <b>{t}Filters{/t}</b>
+        </p>
+      </div>
+      <div class="contentboxb" style="background-color:#F8F8F8">
+        <table summary="" style="width:100%;border-top:1px solid #B0B0B0; background-color:#F8F8F8">
+          {$alphabet}
+        </table>
+        <table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
+          <tr>
+            <td>
+              <LABEL for="depselect">{t}Select department{/t}</LABEL>
+              <img alt="" src="{$tree_image}" align=middle>&nbsp;
+              <select id="depselect" name="depselect" size=1 onChange="mainform.submit()" 
+                title="{t}Choose the department the search will be based on{/t}">
+                      {html_options options=$deplist selected=$depselect}
+                  </select>
+            </td>
+          </tr>
+        </table>
+    
+        <table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
+          <tr>
+            <td style="width:18px">
+              <img alt="" src="{$search_image}" align="middle">
+            </td>
+            <td>
+              <input type='text' name='regex' maxlength='20' style="width:99%" value='{$regex}' 
+                title='{t}Regular expression for matching addresses{/t}' onChange="mainform.submit()">
+            </td>
+          </tr>
+        </table>
+
+        <table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
+          <tr>
+            <td style="width:18px;">
+              <img src="{$usearch_image}" align=middle alt="{t}Display addresses of user{/t}">
+            </td>
+            <td>
+              <input type='text' name='muser' maxlength='20' style="width:99%" value='{$muser}' 
+                title='{t}User name of which addresses are shown{/t}' onChange="mainform.submit()">
+            </td>
+          </tr>
+        </table>
+        {$apply}
+      </div>
+    </td>
+  </tr>
 </table>
 
 <p class="plugbottom">
@@ -42,3 +76,6 @@
   &nbsp;
   <input type=submit name="add_locals_cancel" value="{t}Cancel{/t}">
 </p>
+<!-- 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+-->
index 7ae5503f28e667b5ba6cdd0c8d7fdbc33f26664e..1cebfa35b5ded55c8926495fed5ef3b58562bb47 100644 (file)
@@ -459,7 +459,15 @@ class posixAccount extends plugin
     }
 
     /* Fill calendar */
-    $date= getdate($this->shadowExpire);
+   
+    /* If this $this->shadowExpire is empty 
+        use current date as base for calculating selectbox values.
+       (This attribute is empty if this is a new user )*/ 
+    if(empty($this->shadowExpire)){
+      $date= getdate(time());
+    }else{
+      $date= getdate($this->shadowExpire);
+    }
 
     $days= array();
     for($d= 1; $d<32; $d++){
index 8a7f5ab8808efb015f70cd881be772f1c3e003dc..c6de16a518f5ae9a2dc307f5dc9f0ca1015815ea 100644 (file)
@@ -986,7 +986,7 @@ class sambaAccount extends plugin
         $this->handle_post_events("modify",array("uid" => $this->uid));
       }
     } else {
-      $this->handle_post_events("add",array("uid" => $this>uid));
+      $this->handle_post_events("add",array("uid" => $this->uid));
     }
 
   }