Module: nagvis Branch: master Commit: 6c0b73e31c0b04b74e22b1e4dd101df22c025517 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=6c0b73e31c0b04b74e22b1e4dd101df22c025517
Author: LaMi <[email protected]> Date: Sat Dec 5 13:21:16 2009 +0100 #166 Added check if source file for thumbnail creation exists --- share/server/core/classes/GlobalIndexPage.php | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/share/server/core/classes/GlobalIndexPage.php b/share/server/core/classes/GlobalIndexPage.php index 2344801..3c5d750 100644 --- a/share/server/core/classes/GlobalIndexPage.php +++ b/share/server/core/classes/GlobalIndexPage.php @@ -212,7 +212,11 @@ class GlobalIndexPage { $imgPath = $MAPCFG->BACKGROUND->getFile(GET_PHYSICAL_PATH); $imgPathHtml = $MAPCFG->BACKGROUND->getFile(); - if($this->CORE->checkGd(0) && $MAPCFG->BACKGROUND->getFileType() == 'local') { + // Check if + // a) PHP supports gd + // b) The image is a local one + // c) The image exists + if($this->CORE->checkGd(0) && $MAPCFG->BACKGROUND->getFileType() == 'local' && file_exists($imgPath)) { $sThumbFile = $mapName.'-thumb.'.$this->getFileType($imgPath); $sThumbPath = $this->CORE->getMainCfg()->getValue('paths','sharedvar').$sThumbFile; $sThumbPathHtml = $this->CORE->getMainCfg()->getValue('paths','htmlsharedvar').$sThumbFile; ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
