Code

Added an additional info string when certificates are invalid.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 9 Nov 2006 07:29:44 +0000 (07:29 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 9 Nov 2006 07:29:44 +0000 (07:29 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5054 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/generic/class_user.inc

index 2c546dfab8707b6372ef2f26aaf78c75f9fd24de..b334c6c47eb2280fb4c81fe03be8201165aa4ad9 100644 (file)
@@ -455,8 +455,25 @@ class user extends plugin
           /* Read out data*/
           $timeto   = $certificate->getvalidto_date();
           $timefrom = $certificate->getvalidfrom_date();
-          $str = "<table summary=\"\" border=0><tr><td style='vertical-align:top'>CN</td><td>".preg_replace("/ /", "&nbsp;", $certificate->getname())."</td></tr></table><br>".
-                  sprintf(_("Certificate is valid from %s to %s and is currently %s."), "<b>".date('d M Y',$timefrom)."</b>","<b>".date('d M Y',$timeto)."</b>", $certificate->isvalid()?"<b><font style='color:green'>"._("valid")."</font></b>":"<b><font style='color:red'>"._("invalid")."</font></b>");
+
+          /* Additional info if start end time is '0' */
+          $add_str_info = "";
+          if($timeto == 0 && $timefrom == 0){
+            $add_str_info = "<br><i>"._("(Some types of certificates are currently not supported and may be displayed as 'invalid'.")."</i>";
+          }
+
+          $str = "<table summary=\"\" border=0>
+                    <tr>
+                      <td style='vertical-align:top'>CN</td>
+                      <td>".preg_replace("/ /", "&nbsp;", $certificate->getname())."</td>
+                    </tr>
+                  </table><br>".
+                  
+                  sprintf(_("Certificate is valid from %s to %s and is currently %s."), 
+                        "<b>".date('d M Y',$timefrom)."</b>",
+                        "<b>".date('d M Y',$timeto)."</b>", 
+                        $certificate->isvalid()?"<b><font style='color:green'>"._("valid")."</font></b>": 
+                                                "<b><font style='color:red'>"._("invalid")."</font></b>").$add_str_info;
           $smarty->assign($cert."info",$str);
           $smarty->assign($cert."_state","true");
         } else {