Commit 212c09c8887cb71c7bc03f748e68af51a549a772
1 parent
1ecfe639
Use KTMime for MIME functions.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3595 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
3 deletions
lib/dashboard/DashboardNews.inc
| 1 | 1 | <?php |
| 2 | -require_once("$default->fileSystemRoot/lib/documentmanagement/PhysicalDocumentManager.inc"); | |
| 2 | +require_once("$default->fileSystemRoot/lib/mime.inc.php"); | |
| 3 | 3 | /** |
| 4 | 4 | * $Id$ |
| 5 | 5 | * |
| ... | ... | @@ -274,7 +274,7 @@ class DashboardNews extends KTEntity { |
| 274 | 274 | * Displays the news item image |
| 275 | 275 | */ |
| 276 | 276 | function displayImage(){ |
| 277 | - header("Content-Type: " . PhysicalDocumentManager::getMimeTypeName($this->iImageMimeTypeID)); | |
| 277 | + header("Content-Type: " . KTMime::getMimeTypeName($this->iImageMimeTypeID)); | |
| 278 | 278 | header("Content-Length: " . $this->iImageSize); |
| 279 | 279 | echo $this->sImage; |
| 280 | 280 | } |
| ... | ... | @@ -360,7 +360,7 @@ class DashboardNews extends KTEntity { |
| 360 | 360 | $sImageString = fread($fd, filesize($sImagePath)); |
| 361 | 361 | fclose($fd); |
| 362 | 362 | // return the string |
| 363 | - return array("image" => $sImageString, "filesize" => filesize($sImagePath), "mimetypeid" => PhysicalDocumentManager::getMimeTypeID(null, $sImagePath)); | |
| 363 | + return array("image" => $sImageString, "filesize" => filesize($sImagePath), "mimetypeid" => KTMime::getMimeTypeID(null, $sImagePath)); | |
| 364 | 364 | } else { |
| 365 | 365 | return false; |
| 366 | 366 | } | ... | ... |