Commit 212c09c8887cb71c7bc03f748e68af51a549a772

Authored by Neil Blakey-Milner
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
lib/dashboard/DashboardNews.inc
1 <?php 1 <?php
2 -require_once("$default->fileSystemRoot/lib/documentmanagement/PhysicalDocumentManager.inc"); 2 +require_once("$default->fileSystemRoot/lib/mime.inc.php");
3 /** 3 /**
4 * $Id$ 4 * $Id$
5 * 5 *
@@ -274,7 +274,7 @@ class DashboardNews extends KTEntity { @@ -274,7 +274,7 @@ class DashboardNews extends KTEntity {
274 * Displays the news item image 274 * Displays the news item image
275 */ 275 */
276 function displayImage(){ 276 function displayImage(){
277 - header("Content-Type: " . PhysicalDocumentManager::getMimeTypeName($this->iImageMimeTypeID)); 277 + header("Content-Type: " . KTMime::getMimeTypeName($this->iImageMimeTypeID));
278 header("Content-Length: " . $this->iImageSize); 278 header("Content-Length: " . $this->iImageSize);
279 echo $this->sImage; 279 echo $this->sImage;
280 } 280 }
@@ -360,7 +360,7 @@ class DashboardNews extends KTEntity { @@ -360,7 +360,7 @@ class DashboardNews extends KTEntity {
360 $sImageString = fread($fd, filesize($sImagePath)); 360 $sImageString = fread($fd, filesize($sImagePath));
361 fclose($fd); 361 fclose($fd);
362 // return the string 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 } else { 364 } else {
365 return false; 365 return false;
366 } 366 }