[Pkg-owncloud-commits] [php-sabredav] 09/66: remove leading backslash to be compliant with addressbookserver.php example

David Prévot taffit at moszumanska.debian.org
Sat Jan 18 20:08:19 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabredav.

commit 7d28677e8d14687a9d47c9a9267d36d36ce9b75c
Author: Guillaume Virlet <github at virlet.org>
Date:   Sun Nov 17 13:13:54 2013 +0100

    remove leading backslash to be compliant with addressbookserver.php example
---
 examples/calendarserver.php | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/examples/calendarserver.php b/examples/calendarserver.php
index 02ddbbe..9528053 100644
--- a/examples/calendarserver.php
+++ b/examples/calendarserver.php
@@ -16,12 +16,12 @@ date_default_timezone_set('Canada/Eastern');
 // $baseUri = '/';
 
 /* Database */
-$pdo = new \PDO('sqlite:data/db.sqlite');
+$pdo = new PDO('sqlite:data/db.sqlite');
 $pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
 
 //Mapping PHP errors to exceptions
 function exception_error_handler($errno, $errstr, $errfile, $errline ) {
-    throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
+    throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
 }
 set_error_handler("exception_error_handler");
 
@@ -29,33 +29,33 @@ set_error_handler("exception_error_handler");
 require_once 'vendor/autoload.php';
 
 // Backends
-$authBackend = new \Sabre\DAV\Auth\Backend\PDO($pdo);
-$calendarBackend = new \Sabre\CalDAV\Backend\PDO($pdo);
-$principalBackend = new \Sabre\DAVACL\PrincipalBackend\PDO($pdo);
+$authBackend = new Sabre\DAV\Auth\Backend\PDO($pdo);
+$calendarBackend = new Sabre\CalDAV\Backend\PDO($pdo);
+$principalBackend = new Sabre\DAVACL\PrincipalBackend\PDO($pdo);
 
 // Directory structure
 $tree = [
-    new \Sabre\CalDAV\Principal\Collection($principalBackend),
-    new \Sabre\CalDAV\CalendarRootNode($principalBackend, $calendarBackend),
+    new Sabre\CalDAV\Principal\Collection($principalBackend),
+    new Sabre\CalDAV\CalendarRootNode($principalBackend, $calendarBackend),
 ];
 
-$server = new \Sabre\DAV\Server($tree);
+$server = new Sabre\DAV\Server($tree);
 
 if (isset($baseUri))
     $server->setBaseUri($baseUri);
 
 /* Server Plugins */
-$authPlugin = new \Sabre\DAV\Auth\Plugin($authBackend,'SabreDAV');
+$authPlugin = new Sabre\DAV\Auth\Plugin($authBackend,'SabreDAV');
 $server->addPlugin($authPlugin);
 
-$aclPlugin = new \Sabre\DAVACL\Plugin();
+$aclPlugin = new Sabre\DAVACL\Plugin();
 $server->addPlugin($aclPlugin);
 
-$caldavPlugin = new \Sabre\CalDAV\Plugin();
+$caldavPlugin = new Sabre\CalDAV\Plugin();
 $server->addPlugin($caldavPlugin);
 
 // Support for html frontend
-$browser = new \Sabre\DAV\Browser\Plugin();
+$browser = new Sabre\DAV\Browser\Plugin();
 $server->addPlugin($browser);
 
 // And off we go!

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list