@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | // we shall not log on RemoteException |
55 | 55 | $server->addPlugin(new ExceptionLoggerPlugin('webdav', \OC::$server->getLogger())); |
56 | 56 | } |
57 | - $server->on('beforeMethod', function () use ($e) { |
|
57 | + $server->on('beforeMethod', function() use ($e) { |
|
58 | 58 | if ($e instanceof RemoteException) { |
59 | 59 | switch ($e->getCode()) { |
60 | 60 | case OC_Response::STATUS_SERVICE_UNAVAILABLE: |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $server->exec(); |
71 | 71 | } else { |
72 | 72 | $statusCode = OC_Response::STATUS_INTERNAL_SERVER_ERROR; |
73 | - if ($e instanceof \OC\ServiceUnavailableException ) { |
|
73 | + if ($e instanceof \OC\ServiceUnavailableException) { |
|
74 | 74 | $statusCode = OC_Response::STATUS_SERVICE_UNAVAILABLE; |
75 | 75 | } |
76 | 76 | if ($e instanceof RemoteException) { |
@@ -103,11 +103,11 @@ discard block |
||
103 | 103 | return $services[$service]; |
104 | 104 | } |
105 | 105 | |
106 | - return \OC::$server->getConfig()->getAppValue('core', 'remote_' . $service); |
|
106 | + return \OC::$server->getConfig()->getAppValue('core', 'remote_'.$service); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | try { |
110 | - require_once __DIR__ . '/lib/base.php'; |
|
110 | + require_once __DIR__.'/lib/base.php'; |
|
111 | 111 | |
112 | 112 | // All resources served via the DAV endpoint should have the strictest possible |
113 | 113 | // policy. Exempted from this is the SabreDAV browser plugin which overwrites |
@@ -128,18 +128,18 @@ discard block |
||
128 | 128 | if (!$pos = strpos($pathInfo, '/', 1)) { |
129 | 129 | $pos = strlen($pathInfo); |
130 | 130 | } |
131 | - $service=substr($pathInfo, 1, $pos-1); |
|
131 | + $service = substr($pathInfo, 1, $pos - 1); |
|
132 | 132 | |
133 | 133 | $file = resolveService($service); |
134 | 134 | |
135 | - if(is_null($file)) { |
|
135 | + if (is_null($file)) { |
|
136 | 136 | throw new RemoteException('Path not found', OC_Response::STATUS_NOT_FOUND); |
137 | 137 | } |
138 | 138 | |
139 | - $file=ltrim($file, '/'); |
|
139 | + $file = ltrim($file, '/'); |
|
140 | 140 | |
141 | - $parts=explode('/', $file, 2); |
|
142 | - $app=$parts[0]; |
|
141 | + $parts = explode('/', $file, 2); |
|
142 | + $app = $parts[0]; |
|
143 | 143 | |
144 | 144 | // Load all required applications |
145 | 145 | \OC::$REQUESTEDAPP = $app; |
@@ -148,17 +148,17 @@ discard block |
||
148 | 148 | |
149 | 149 | switch ($app) { |
150 | 150 | case 'core': |
151 | - $file = OC::$SERVERROOT .'/'. $file; |
|
151 | + $file = OC::$SERVERROOT.'/'.$file; |
|
152 | 152 | break; |
153 | 153 | default: |
154 | 154 | if (!\OC::$server->getAppManager()->isInstalled($app)) { |
155 | - throw new RemoteException('App not installed: ' . $app); |
|
155 | + throw new RemoteException('App not installed: '.$app); |
|
156 | 156 | } |
157 | 157 | OC_App::loadApp($app); |
158 | - $file = OC_App::getAppPath($app) .'/'. $parts[1]; |
|
158 | + $file = OC_App::getAppPath($app).'/'.$parts[1]; |
|
159 | 159 | break; |
160 | 160 | } |
161 | - $baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/'; |
|
161 | + $baseuri = OC::$WEBROOT.'/remote.php/'.$service.'/'; |
|
162 | 162 | require_once $file; |
163 | 163 | |
164 | 164 | } catch (Exception $ex) { |