From: Michael J. Rubinsky Date: Mon, 31 Jan 2011 14:27:17 +0000 (-0500) Subject: This should be a class constant X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=2a81be672b5d34a933fcb75db723b4b14f1477ff;p=horde.git This should be a class constant --- diff --git a/turba/lib/Object.php b/turba/lib/Object.php index 5cecdca1c..a68e34413 100644 --- a/turba/lib/Object.php +++ b/turba/lib/Object.php @@ -317,7 +317,7 @@ class Turba_Object public function addFile(array $info) { $this->_vfsInit(); - $dir = TURBA_VFS_PATH . '/' . $this->getValue('__uid'); + $dir = Turba::VFS_PATH . '/' . $this->getValue('__uid'); $file = $info['name']; while ($this->_vfs->exists($dir, $file)) { if (preg_match('/(.*)\[(\d+)\](\.[^.]*)?$/', $file, $match)) { @@ -348,7 +348,7 @@ class Turba_Object { $this->_vfsInit(); try { - $this->_vfs->deleteFile(TURBA_VFS_PATH . '/' . $this->getValue('__uid'), $file); + $this->_vfs->deleteFile(Turba::VFS_PATH . '/' . $this->getValue('__uid'), $file); } catch (VFS_Exception $e) { throw new Turba_Exception($e); } @@ -362,9 +362,9 @@ class Turba_Object public function deleteFiles() { $this->_vfsInit(); - if ($this->_vfs->exists(TURBA_VFS_PATH, $this->getValue('__uid'))) { + if ($this->_vfs->exists(Turba::VFS_PATH, $this->getValue('__uid'))) { try { - $this->_vfs->deleteFolder(TURBA_VFS_PATH, $this->getValue('__uid'), true); + $this->_vfs->deleteFolder(Turba::VFS_PATH, $this->getValue('__uid'), true); } catch (VFS_Exception $e) { throw new Turba_Exception($e); } @@ -380,8 +380,8 @@ class Turba_Object { try { $this->_vfsInit(); - if ($this->_vfs->exists(TURBA_VFS_PATH, $this->getValue('__uid'))) { - return $this->_vfs->listFolder(TURBA_VFS_PATH . '/' . $this->getValue('__uid')); + if ($this->_vfs->exists(Turba::VFS_PATH, $this->getValue('__uid'))) { + return $this->_vfs->listFolder(Turba::VFS_PATH . '/' . $this->getValue('__uid')); } } catch (Turba_Exception $e) {} diff --git a/turba/lib/Turba.php b/turba/lib/Turba.php index e94c84d7c..1d8a9eabf 100644 --- a/turba/lib/Turba.php +++ b/turba/lib/Turba.php @@ -1,7 +1,4 @@ read(TURBA_VFS_PATH . '/' . $object->getValue('__uid'), $filename); + $data = $vfs->read(Turba::VFS_PATH . '/' . $object->getValue('__uid'), $filename); } catch (VFS_Exception $e) { Horde::logMessage($e, 'ERR'); throw new Turba_Exception(sprintf(_("Access denied to %s"), $filename));