From: cajus Date: Fri, 10 Jun 2005 09:39:48 +0000 (+0000) Subject: Fixed cert layout X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8747359155887b0f849561f4767ba8980f52a98f;p=gosa.git Fixed cert layout git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@653 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index afa0383aa..70b2a56e5 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -359,9 +359,9 @@ class user extends plugin foreach(array("userCertificate", "userSMIMECertificate", "userPKCS12") as $cert){ if ($this->$cert != ""){ - $smarty->assign("$cert"."_state", _("present")); + $smarty->assign("$cert"."_state", "true"); } else { - $smarty->assign("$cert"."_state", _("absent")); + $smarty->assign("$cert"."_state", ""); } } return ($smarty->fetch (get_template_path('generic_certs.tpl', TRUE, dirname(__FILE__)))); @@ -389,14 +389,16 @@ class user extends plugin $certificate->import($this->$cert); /* Read out data*/ - $timeto = ($certificate->getvalidto_date()); - $timefrom = ($certificate->getvalidfrom_date()); + $timeto = $certificate->getvalidto_date(); + $timefrom = $certificate->getvalidfrom_date(); $str = $certificate->getname()."
". - _("Valid from")." ".date('d M Y',$timefrom)." "._("to")." ".date('d M Y',$timeto)." - "._("Serialnumber")." : ".$certificate->getSerialNumber()."
". - _("This certificate is")." ".$certificate->isvalid(true).""; + _("Serialnumber")." : ".$certificate->getSerialNumber()."
". + sprintf(_("Certificate is valid from %s to %s and is currently %s."), date('d M Y',$timefrom),date('d M Y',$timeto), $certificate->isvalid()?_("valid"):_("invalid")); $smarty->assign($cert."info",$str); + $smarty->assign($cert."_state","true"); } else { - $smarty->assign($cert."info",_("No certificate present")); + $smarty->assign($cert."info", ""._("No certificate installed").""); + $smarty->assign($cert."_state",""); } } $smarty->assign("governmentmode", "false");