diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-11-06 09:42:03 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2024-11-06 09:42:03 +0000 |
| commit | 807bc5928408345284f0ce602d1682e3d1f4be76 (patch) | |
| tree | e2fb903c0b895c1d233c1236a9dd70b29dd89caf | |
| parent | f3d45b5305955289d41d589f3fc8c5a3f6e4e7ab (diff) | |
remove dead code, fixes #4833
Closes #4833
Merge request studip/studip!3616
| -rw-r--r-- | lib/visual.inc.php | 56 |
1 files changed, 1 insertions, 55 deletions
diff --git a/lib/visual.inc.php b/lib/visual.inc.php index a93bdd8..30c5f2b 100644 --- a/lib/visual.inc.php +++ b/lib/visual.inc.php @@ -627,7 +627,7 @@ function TransformInternalLinks($str){ if (!$str) { return ''; } - + if (mb_strpos($str, 'http') !== 0) { if ($str[0] === '#' || preg_match('/^[a-z][a-z0-9+.-]*:/i', $str)) { return $str; @@ -685,60 +685,6 @@ function display_exception($exception, $as_html = false, $deep = false) { } /** - * Returns the appropriate stud.ip icon for a given mime type. - * - * @param String $mime_type Mime type to get the icon for - * @return String Icon path for the mime type - */ -//DEPRECATED: replaced by FileManager::getIconNameForMimeType -//TODO: test: lib/extern/modules/ExternModuleDownload.php -//TODO: test: lib/extern/modules/ExternModuleTemplateDownload.php -/* -function get_icon_for_mimetype($mime_type) -{ - - $icons_application = [ - 'file-pdf' => ['pdf'], - 'file-ppt' => ['powerpoint','presentation'], - 'file-excel' => ['excel', 'spreadsheet', 'csv'], - 'file-word' => ['word', 'wordprocessingml', 'opendocument.text', 'rtf'], - 'file-archive' => ['zip', 'rar', 'arj', '7z' ] - ]; - list($type, $subtype) = explode('/', $mime_type); - switch ($type) { - case 'image': - $ret = 'file-pic'; - break; - case 'audio': - $ret = 'file-audio'; - break; - case 'video': - $ret = 'file-video'; - break; - case 'text': - $ret = 'file-text'; - if (preg_match('/csv|comma-separated-values/i', $subtype)) { - $ret = 'file-excel'; - } - break; - case 'application': - $ret = 'file-generic'; - foreach($icons_application as $icon => $marker) { - if (preg_match('/' . join('|', array_map('preg_quote', $marker)) . '/i', $subtype)) { - $ret = $icon; - break; - } - } - break; - default: - $ret = 'file-generic'; - } - - return $ret; -} -*/ - -/** * Converts an array of attributes to an html attribute string. * * @param array $attributes Associative array of attributes |
