Author: Lars Michelsen <[email protected]>
Date: Sun Feb 27 00:04:48 2011 +0100
Committer: Lars Michelsen <[email protected]>
Commit-Date: Sun Feb 27 00:04:48 2011 +0100
Fixed shape/background upload when no local dir exists
---
.../core/classes/CoreModManageBackgrounds.php | 2 +-
share/server/core/classes/CoreModManageShapes.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/share/server/core/classes/CoreModManageBackgrounds.php
b/share/server/core/classes/CoreModManageBackgrounds.php
index 284dfaf..5ee395f 100644
--- a/share/server/core/classes/CoreModManageBackgrounds.php
+++ b/share/server/core/classes/CoreModManageBackgrounds.php
@@ -89,7 +89,7 @@ class CoreModManageBackgrounds extends CoreModule {
if(!preg_match(MATCH_PNG_GIF_JPG_FILE, $fileName))
new GlobalMessage('ERROR',
$this->CORE->getLang()->getText('The uploaded file is no image (png,jpg,gif)
file or contains unwanted chars.'));
- $filePath = $this->CORE->getMainCfg()->getPath('sys', 'local',
'backgrounds').$fileName;
+ $filePath = $this->CORE->getMainCfg()->getPath('sys', '',
'backgrounds').$fileName;
return move_uploaded_file($a['image_file']['tmp_name'],
$filePath) && $this->CORE->setPerms($filePath);
}
diff --git a/share/server/core/classes/CoreModManageShapes.php
b/share/server/core/classes/CoreModManageShapes.php
index 8c8cdec..1484b59 100644
--- a/share/server/core/classes/CoreModManageShapes.php
+++ b/share/server/core/classes/CoreModManageShapes.php
@@ -82,7 +82,7 @@ class CoreModManageShapes extends CoreModule {
if(!preg_match(MATCH_PNG_GIF_JPG_FILE, $fileName))
new GlobalMessage('ERROR',
$this->CORE->getLang()->getText('The uploaded file is no image (png,jpg,gif)
file or contains unwanted chars.'));
- $filePath = $this->CORE->getMainCfg()->getPath('sys', 'local',
'shapes').$fileName;
+ $filePath = $this->CORE->getMainCfg()->getPath('sys', '',
'shapes').$fileName;
return move_uploaded_file($a['image_file']['tmp_name'],
$filePath) && $this->CORE->setPerms($filePath);
}
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins