コード例 #1
0
ファイル: list.php プロジェクト: rsnitsch/dokuwiki
 /**
  * Notice area
  *
  * @param helper_plugin_extension_extension $extension The extension
  * @return string The HTML code
  */
 function make_noticearea(helper_plugin_extension_extension $extension)
 {
     $return = '';
     $missing_dependencies = $extension->getMissingDependencies();
     if (!empty($missing_dependencies)) {
         $return .= '<div class="msg error">' . sprintf($this->getLang('missing_dependency'), '<bdi>' . implode(', ', $missing_dependencies) . '</bdi>') . '</div>';
     }
     if ($extension->isInWrongFolder()) {
         $return .= '<div class="msg error">' . sprintf($this->getLang('wrong_folder'), '<bdi>' . hsc($extension->getInstallName()) . '</bdi>', '<bdi>' . hsc($extension->getBase()) . '</bdi>') . '</div>';
     }
     if (($securityissue = $extension->getSecurityIssue()) !== false) {
         $return .= '<div class="msg error">' . sprintf($this->getLang('security_issue'), '<bdi>' . hsc($securityissue) . '</bdi>') . '</div>';
     }
     if (($securitywarning = $extension->getSecurityWarning()) !== false) {
         $return .= '<div class="msg notify">' . sprintf($this->getLang('security_warning'), '<bdi>' . hsc($securitywarning) . '</bdi>') . '</div>';
     }
     if ($extension->updateAvailable()) {
         $return .= '<div class="msg notify">' . sprintf($this->getLang('update_available'), hsc($extension->getLastUpdate())) . '</div>';
     }
     if ($extension->hasDownloadURLChanged()) {
         $return .= '<div class="msg notify">' . sprintf($this->getLang('url_change'), '<bdi>' . hsc($extension->getDownloadURL()) . '</bdi>', '<bdi>' . hsc($extension->getLastDownloadURL()) . '</bdi>') . '</div>';
     }
     return $return . DOKU_LF;
 }