summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a0bf70f)
raw | patch | inline | side by side (parent: a0bf70f)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 10 Jun 2005 09:39:48 +0000 (09:39 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 10 Jun 2005 09:39:48 +0000 (09:39 +0000) |
plugins/personal/generic/class_user.inc | patch | blob | history |
index afa0383aa4357b6c8238c7e42332fa5f0e288b29..70b2a56e52bc5d8ab3d6dea4c1095768578c5a2e 100644 (file)
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__))));
$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()."<br>".
- _("Valid from")." ".date('d M Y',$timefrom)." "._("to")." ".date('d M Y',$timeto)." - "._("Serialnumber")." : ".$certificate->getSerialNumber()."<br>".
- _("This certificate is")." <b>".$certificate->isvalid(true)."</b>";
+ _("Serialnumber")." : ".$certificate->getSerialNumber()."<br>".
+ sprintf(_("Certificate is valid from <b>%s</b> to <b>%s</b> and is currently <b>%s</b>."), 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", "<i>"._("No certificate installed")."</i>");
+ $smarty->assign($cert."_state","");
}
}
$smarty->assign("governmentmode", "false");