diff --git a/3.0/client/Python/pylibgal3/libg3/G3Items.py b/3.0/client/Python/pylibgal3/libg3/G3Items.py index 0fdae593..ce812551 100644 --- a/3.0/client/Python/pylibgal3/libg3/G3Items.py +++ b/3.0/client/Python/pylibgal3/libg3/G3Items.py @@ -22,7 +22,16 @@ __all__ = ['Album' , 'Image' , 'LocalImage' , 'RemoteImage' , 'LocalMovie' , 'RemoteMovie' , 'getItemFromResp' , 'getItemsFromResp'] from datetime import datetime -import json , weakref , types , os , mimetypes , re +import weakref , types , os , mimetypes , re +try: + import json +except: + try: + import simplejson + except ImportError , e: + raise ImportError('You must have either the "json" or "simplejson"' + 'library installed!') + class BaseRemote(object): def __init__(self , respObj , weakGalObj , weakParent=None): diff --git a/3.0/client/Python/pylibgal3/libg3/Gallery3.py b/3.0/client/Python/pylibgal3/libg3/Gallery3.py index 6345c1a8..13409c8a 100644 --- a/3.0/client/Python/pylibgal3/libg3/Gallery3.py +++ b/3.0/client/Python/pylibgal3/libg3/Gallery3.py @@ -26,7 +26,15 @@ from G3Items import getItemFromResp , getItemsFromResp , BaseRemote , Album , \ RemoteImage , Tag from urllib import quote , urlencode from uuid import uuid4 -import urllib2 , os , json +import urllib2 , os +try: + import json +except: + try: + import simplejson + except ImportError , e: + raise ImportError('You must have either the "json" or "simplejson"' + 'library installed!') class Gallery3(object): """ @@ -129,7 +137,6 @@ class Gallery3(object): uri(str) : The uri string defining the resource on the defined host """ url = self._buildUrl(uri , kwargs) - print url return self.getRespFromUrl(url) def addAlbum(self , parent , albumName , title , description=''): diff --git a/3.0/client/Python/pylibgal3/libg3/__init__.py b/3.0/client/Python/pylibgal3/libg3/__init__.py index eec91668..3805ff18 100644 --- a/3.0/client/Python/pylibgal3/libg3/__init__.py +++ b/3.0/client/Python/pylibgal3/libg3/__init__.py @@ -21,4 +21,4 @@ from G3Items import * from Gallery3 import * -__version__ = '0.1.4' +__version__ = '0.1.5' diff --git a/3.0/modules/webdav/controllers/webdav.php b/3.0/modules/webdav/controllers/webdav.php index da389d25..829de6ec 100644 --- a/3.0/modules/webdav/controllers/webdav.php +++ b/3.0/modules/webdav/controllers/webdav.php @@ -34,6 +34,7 @@ class WebDAV_Controller extends Controller { $server->setBaseUri(url::site("webdav/gallery")); // $server->addPlugin($lock); $server->addPlugin($filter); + $server->addPlugin(new Sabre_DAV_Browser_GuessContentType()); if ($this->_authenticate()) { $server->exec();