openrat-webdav

git clone http://git.code.weiherhei.de/openrat-webdav.git
Log | Files | Refs

commit 62f3bdb6d52e339a398e196f7c239c1d0ca5379a
parent 9b6b0033765dddf8011e21301184e5ec83166062
Author: Jan Dankert <develop@jandankert.de>
Date:   Thu,  7 Nov 2019 01:07:03 +0100

No direct calls any more. All data of the CMS is transferred via the API within an array.

Diffstat:
cms/CMS.class.php | 6+++---
cms/Client.class.php | 5+----
dav/DAV.class.php | 2+-
dav/method/GET.class.php | 2+-
4 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/cms/CMS.class.php b/cms/CMS.class.php @@ -96,7 +96,7 @@ class CMS function filevalue($id) { - $result = $this->call(CMS_READ,'file','show',array('id'=>$id),true ); + $result = $this->call(CMS_READ,'file','show',array('id'=>$id) ); return $result; } @@ -117,11 +117,11 @@ class CMS } - protected function call( $method,$action,$subaction,$parameter=array(),$direct=false ) + protected function call( $method,$action,$subaction,$parameter=array() ) { Logger::trace( "Executing $method $action/$subaction"."\n".$this->__toString() ); - $result = $this->client->call( $method,$action,$subaction,$parameter,false ); + $result = $this->client->call( $method,$action,$subaction,$parameter ); Logger::trace( "API-Result of $method $action/$subaction:"."\n".$this->__toString()."\n".print_r($result,true)); diff --git a/cms/Client.class.php b/cms/Client.class.php @@ -25,7 +25,7 @@ class Client protected $requestHeader; - public function call($method,$action,$subaction,$parameter=array(),$direct=false) + public function call($method,$action,$subaction,$parameter=array()) { global $config; $error = ''; @@ -185,9 +185,6 @@ class Client } } - if ( $direct ) - return $body; - $result = unserialize($body); if ( $result === false ) { diff --git a/dav/DAV.class.php b/dav/DAV.class.php @@ -325,7 +325,7 @@ abstract class DAV public function __destruct() { - $this->store[$this->storekey] = $this->client->client->cookies; + $this->store[$this->storeKey] = $this->client->client->cookies; shm_put_var($this->shm,self::MEMKEY,$this->store); } diff --git a/dav/method/GET.class.php b/dav/method/GET.class.php @@ -63,7 +63,7 @@ class DAV_GET extends DAV // Der Browser hat so die Moeglichkeit, einen Fortschrittsbalken zu zeigen header('Content-Length: '.$file['size'] ); - echo $filevalue; + echo $filevalue['value']; break;