From 89a825cd038df7da609d64ef0254ba58caaede31 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Tue, 20 Feb 2018 21:11:38 -0500 Subject: OAuth2TestVehicle module can create and delete oauth2 database tables. --- Zotlabs/Storage/ZotOauth2Pdo.php | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Zotlabs/Storage/ZotOauth2Pdo.php (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/ZotOauth2Pdo.php b/Zotlabs/Storage/ZotOauth2Pdo.php new file mode 100644 index 000000000..b2c3ce228 --- /dev/null +++ b/Zotlabs/Storage/ZotOauth2Pdo.php @@ -0,0 +1,10 @@ +config; + } +} -- cgit v1.2.3 From 60b38a3a527f64d1bdceac664690519c3b3cff8a Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 16 Mar 2018 15:34:09 -0700 Subject: slight re-org and update of documentation, moving the tutorial to the top. --- Zotlabs/Storage/Directory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index 510d463c1..a2dd1e9b8 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -680,7 +680,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo throw new DAV\Exception\Forbidden('Permission denied.'); } else { - throw new DAV\Exception\NotFound('A component of the request file path could not be found.'); + throw new DAV\Exception\NotFound('A component of the requested file path could not be found.'); } } -- cgit v1.2.3 From 1514b0f4e5c053df60b8873b5411c70be727d227 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 21 Mar 2018 21:19:18 -0700 Subject: initial support for alternative sort orders on the cloud pages. Can be triggered manually but further development is required. --- Zotlabs/Storage/Directory.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index a2dd1e9b8..a2ae0fee8 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -691,7 +691,23 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo } $prefix = ''; - $suffix = ' order by is_dir desc, filename asc '; + + if(! array_key_exists('cloud_sort',$_SESSION)) + $_SESSION['cloud_sort'] = 'name'; + + switch($_SESSION['cloud_sort']) { + case 'size': + $suffix = ' order by is_dir desc, filesize asc '; + break; + // The following provides inconsistent results for directories because we re-calculate the date for directories based on the most recent change + case 'date': + $suffix = ' order by is_dir desc, edited asc '; + break; + case 'name': + default: + $suffix = ' order by is_dir desc, filename asc '; + break; + } $r = q("select $prefix id, uid, hash, filename, filetype, filesize, revision, folder, flags, is_dir, created, edited from attach where folder = '%s' and uid = %d $perms $suffix", dbesc($folder), -- cgit v1.2.3 From 4d08fcf1a7075c933c8b57b9bf1d66acbb19ec07 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 7 Apr 2018 13:29:36 +0200 Subject: Use Add Files/Photos instead of Upload to open the upload dialog --- Zotlabs/Storage/Browser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index f1c95802b..508c39d22 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -274,7 +274,7 @@ class Browser extends DAV\Browser\Plugin { '$actionspanel' => $output, '$shared' => t('Shared'), '$create' => t('Create'), - '$upload' => t('Upload'), + '$upload' => t('Add Files'), '$is_owner' => $is_owner, '$parentpath' => $parentpath, '$cpath' => bin2hex(\App::$query_string), -- cgit v1.2.3 From 34fbcfdfaa70080b7c280ede2910f9a198a7ede2 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 26 Apr 2018 17:25:58 -0700 Subject: set the 'force' flag on attach_mkdir when initiated from a DAV operation. This will report success if it already exists rather than throwing an exception. --- Zotlabs/Storage/Directory.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index a2ae0fee8..d063eed40 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -389,8 +389,12 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo ); if ($r) { + + // When initiated from DAV, set the 'force' flag on attach_mkdir(). This will cause the operation to report success even if the + // folder already exists. + require_once('include/attach.php'); - $result = attach_mkdir($r[0], $this->auth->observer, array('filename' => $name, 'folder' => $this->folder_hash)); + $result = attach_mkdir($r[0], $this->auth->observer, array('filename' => $name, 'folder' => $this->folder_hash, 'force' => true)); if($result['success']) { $sync = attach_export_data($r[0],$result['data']['hash']); -- cgit v1.2.3 From 94df121e0a6dab59f555852c344a14939192bc84 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 27 Apr 2018 02:34:52 -0700 Subject: sql error --- Zotlabs/Storage/Directory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index d063eed40..7068ee15a 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -169,7 +169,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo $x = attach_syspaths($this->auth->owner_id,$this->folder_hash); - $y = q("update attach set display_path = '%s where hash = '%s' and uid = %d", + $y = q("update attach set display_path = '%s' where hash = '%s' and uid = %d", dbesc($x['path']), dbesc($this->folder_hash), intval($this->auth->owner_id) -- cgit v1.2.3 From a3ed0b94cd5d43c70a835a6ed7226f5645f1c121 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 2 May 2018 22:05:55 -0700 Subject: make the cloud logging a bit less verbose until we actually need it. --- Zotlabs/Storage/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php index 53d5d3476..4610aceb7 100644 --- a/Zotlabs/Storage/File.php +++ b/Zotlabs/Storage/File.php @@ -49,7 +49,7 @@ class File extends DAV\Node implements DAV\IFile { $this->data = $data; $this->auth = $auth; - logger(print_r($this->data, true), LOGGER_DATA); + // logger(print_r($this->data, true), LOGGER_DATA); } /** -- cgit v1.2.3