Commit ca1cbe73ed5436273ec7052437e6d50ff9425b9e

Authored by michael
1 parent 7c83d1ef

fixed news creation (addslashes on binary image data) and stopped constraining d…

…ashboard image to 80x40


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2666 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/dashboard/DashboardNews.inc
... ... @@ -307,7 +307,7 @@ class DashboardNews {
307 307 $sql = $default->db;
308 308 $result = $sql->query("INSERT INTO $default->news_table (synopsis, body, rank, image, image_size, image_mime_type_id, active) " .
309 309 "VALUES ('$this->sSynopsis', '$this->sBody', $this->iRank, " .
310   - "'$this->sImage', $this->iImageSize, $this->iImageMimeTypeID, " . ($this->bActive ? "1" : "0") . ")");
  310 + "'" . addslashes($this->sImage) . "', $this->iImageSize, $this->iImageMimeTypeID, " . ($this->bActive ? "1" : "0") . ")");
311 311 if ($result) {
312 312 //set the current news item primary key
313 313 $this->iId = $sql->insert_id();
... ... @@ -467,7 +467,7 @@ class DashboardNews {
467 467 function getImageLink() {
468 468 global $default;
469 469 if ($this->iImageSize > 0) {
470   - return "<img width=\"$this->iMaxImageWidth\" height=\"$this->iMaxImageHeight\" src=\"$default->rootUrl/" . $default->siteMap->getPage("viewNewsImage") . "?fNewsID=" . $this->getID() . "\" border=\"0\">";
  470 + return "<img src=\"$default->rootUrl/" . $default->siteMap->getPage("viewNewsImage") . "?fNewsID=" . $this->getID() . "\" border=\"0\">";
471 471 } else {
472 472 return "";
473 473 }
... ...