Пример #1
0
 /**
  * Checks the status of the certificate
  *
  * @param object $adapter The certificate adapter
  * @return boolean Returns TRUE if the certificate is complete, FALSE otherwise
  */
 function _isComplete($adapter)
 {
     if (is_object($adapter) && method_exists($adapter, "getCertificatePath")) {
         if (self::isActive()) {
             $obj_id = $adapter->getCertificateID();
             if ($obj_id && !self::isObjectActive($obj_id)) {
                 return FALSE;
             }
             $certificatepath = $adapter->getCertificatePath();
             if (file_exists($certificatepath)) {
                 $xslpath = $adapter->getCertificatePath() . ilCertificate::_getXSLName();
                 if (file_exists($xslpath) && filesize($xslpath) > 0) {
                     return TRUE;
                 }
             }
         }
     }
     return FALSE;
 }