From 2623516ca68e1059bc8f34565719c64563282933 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 9 Nov 2006 07:29:44 +0000 Subject: [PATCH] Added an additional info string when certificates are invalid. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5054 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/generic/class_user.inc | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 2c546dfab..b334c6c47 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -455,8 +455,25 @@ class user extends plugin /* Read out data*/ $timeto = $certificate->getvalidto_date(); $timefrom = $certificate->getvalidfrom_date(); - $str = "
CN".preg_replace("/ /", " ", $certificate->getname())."

". - 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").""); + + /* Additional info if start end time is '0' */ + $add_str_info = ""; + if($timeto == 0 && $timefrom == 0){ + $add_str_info = "
"._("(Some types of certificates are currently not supported and may be displayed as 'invalid'.").""; + } + + $str = " + + + + +
CN".preg_replace("/ /", " ", $certificate->getname())."

". + + 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")."").$add_str_info; $smarty->assign($cert."info",$str); $smarty->assign($cert."_state","true"); } else { -- 2.30.2