Commit Graph

74 Commits

Author SHA1 Message Date
Vincent Petry 7036309e22 Added rawurlencode for other params in GDrive storage 2015-03-31 15:14:08 +02:00
Vincent Petry 5c9998179f Properly quote file names in listFiles query for GDrive 2015-03-31 15:14:03 +02:00
Lukas Reschke 53f67fc65d Revert "Properly quote file names in listFiles query for GDrive" 2015-03-31 15:12:35 +02:00
Frank Karlitschek b216b3fad0 Merge pull request #15215 from owncloud/ext-gdrivelistfilequoting
Properly quote file names in listFiles query for GDrive
2015-03-31 09:08:59 -04:00
Vincent Petry 534892d456 Added rawurlencode for other params in GDrive storage 2015-03-26 13:57:28 +01:00
Vincent Petry 43588fe2f7 Properly quote file names in listFiles query for GDrive 2015-03-26 12:15:02 +01:00
Jenkins for ownCloud b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Thomas Müller 5855108e9b drop any fallback code related to curl - refs https://github.com/owncloud/core/pull/14838#issuecomment-78586447 2015-03-12 21:43:41 +01:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Adam Williamson 415411a3d5 google: delete original after successful rename
In GDrive, filenames aren't unique, and directories are just
special files - so you can have multiple files with the same
name, multiple directories with the same name, and even files
with the same names as directories.

OC doesn't handle this at all, though, and just wants to act
as if file and directory names *are* unique. So when renaming,
we must check if there's an existing object with the same
file or directory name before we commit the rename, and
explicitly delete it if the rename is successful. (Other
providers like dropbox do the same for files, but intentionally
don't do it for directories; we really need to do it for
directories too.)

A good way to observe this is to run the storage unit tests
and look at the state of the Drive afterwards. Without this
commit, there will be several copies of all the test files
and directories. After this commit, there's just one of each.

We can't just say "hey, Drive lets us do this, what's the
problem?" because we don't handle multiple-objects, same-name
cases - getDriveFile() just bails and prints an error if it
searches for the file or directory with a given name and gets
multiple results.
2014-11-30 15:34:35 -08:00
Robin Appelman a2457b5fb9 Merge pull request #6989 from AdamWill/google-1
Migrate Google Drive external storage app to v1.0.6-beta of the google-api-php-client library
2014-11-26 12:17:57 +01:00
Adam Williamson f76419d190 fix touch() when $mtime is set (Google wants RFC3339) #11267
ownCloud passes us a Unix time integer, but the GDrive API wants
an RFC3339-formatted date. Actually it wants a single particular
RFC3339 format, not just anything that complies will do - it
requires the fractions to be specified, though RFC3339 doesn't.

This resolves issue #11267 (and was also noted by PVince81 in
reviewing PR #6989).
2014-11-10 11:56:01 -08:00
Adam Williamson c237acb395 google: disable compression when curl is not available
This is a slightly hacky workaround for
https://github.com/google/google-api-php-client/issues/59 .
There's a bug in the Google library which makes it go nuts on
file uploads and transfer *way* too much data if compression is
enabled and it's using its own IO handler (not curl). Upstream
'fixed' this (by disabling compression) for one upload
mechanism, but not for the one we use. The bug doesn't seem to
happen if the google lib detects that curl is available and
decides to use it instead of its own handler. So, let's disable
compression, but only if it looks like the Google lib's check
for curl is going to fail.
2014-11-07 22:52:07 -08:00
Adam Williamson 04369fb9cc scrutinizer fix: explicitly declare Google class property $client 2014-11-06 21:28:05 -08:00
Adam Williamson f9bd43ff03 scrutinizer fix: correct @return for getDriveFile() 2014-11-06 21:27:12 -08:00
Adam Williamson 62b859d66f Migrate Google Drive storage app to v1.0.0 of the client library 2014-11-06 18:47:11 -08:00
Vincent Petry 075e8d8e86 Lazy initialize external storages
Fixed the following external storages to not connect in the constructor,
but do it on-demand when getConnection() is called.
- S3
- SWIFT
- SFTP
2014-10-22 12:42:36 +02:00
Robin Appelman d25a9a118f Check if a folder is deletable before we try to recursively delete it 2014-09-17 11:35:16 +02:00
Morris Jobke b3b3354809 move to public namespace 2014-08-19 14:05:08 +02:00
Stephan Peijnik 2df52e54d7 Fix STORAGE_* constants usage by moving those constants into \OC\Files\Filesystem.
As constants not defined within a class cannot be automatically found by the
autoloader moving those constants into a class makes them accessible to
code which uses them.

Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>
2014-08-19 13:55:35 +02:00
Philipp Kapfer 730bca98b4 Moved dependency checks to end of class files
Dependency messages now appear below the configuration options instead of above
Reworked dependency check method to support consolidated messages for multiple backends

Conflicts:
	apps/files_external/lib/google.php
	apps/files_external/lib/swift.php
	apps/files_external/templates/settings.php
2014-04-03 16:46:22 +02:00
Philipp Kapfer 46379113a1 Changed dependency check messages from warnings to notes
Added check for duplicate dependency check messages to display only the first
2014-04-03 16:31:54 +02:00
Philipp Kapfer 8ca897df76 Added cURL dependency check to Google Drive and WebDAV backend
Added check for backend's checkDependencies method to OC_Mount_Config::getBackends() when backend is configured to have some instead of blindly calling it and crashing

Conflicts:
	apps/files_external/lib/config.php
	apps/files_external/lib/google.php
2014-04-03 16:30:48 +02:00
Scrutinizer Auto-Fixer adaee6a5a1 Scrutinizer Auto-Fixes
This patch was automatically generated as part of the following inspection:
https://scrutinizer-ci.com/g/owncloud/core/inspections/cdfecc4e-a37e-4233-8025-f0d7252a8720

Enabled analysis tools:
 - PHP Analyzer
 - JSHint
 - PHP Copy/Paste Detector
 - PHP PDepend
2014-02-19 09:31:54 +01:00
Thomas Müller c6f4f85e27 Merge branch 'master' into scrutinizer_documentation_patches
Conflicts:
	lib/private/migration/content.php
2014-02-18 18:31:33 +01:00
Robin Appelman 181bbd4325 Remove usage of legacy OC_Appconfig 2014-02-13 16:28:49 +01:00
Jörn Friedrich Dreyer 2a6a9a8cef polish documentation based on scrutinizer patches 2014-02-06 17:02:21 +01:00
Vincent Petry c62cce8269 Moved default isReadable/isUpdatable impl into Common class
Also adjusted all ext storage backends to not override these when the
default behavior is expected.
2013-11-22 18:21:17 +01:00
Arthur Schiwon ec3639dc7a Always check variable type before using readdir to avoid surprises 2013-09-04 13:06:04 +02:00
Georg Ehrke cbeccb2fcd Merge branch 'master' into readdir-strict-equals 2013-08-19 17:30:56 +02:00
Robin Appelman c5402f4575 use strict equals in readdir loops to prevent issues with '0' files 2013-08-19 12:04:53 +02:00
kondou 9e8a6b704d Add _many_ newlines at the end of files 2013-08-18 11:06:59 +02:00
Robin Appelman 88cc2ccb3b use renamed constants 2013-07-25 16:14:46 +02:00
Michael Gapczynski c904504365 Remove root option from Google Drive storage, because it is only used for testing and we have our own empty Google account for testing 2013-07-23 10:50:14 -04:00
Michael Gapczynski 00e2b46017 Fix 'most' Google Drive tests 2013-07-13 11:02:07 -04:00
Michael Gapczynski 8793acfb4e substr storage id to prevent problems with storing the change id in appconfig 2013-06-04 18:07:14 -04:00
Michael Gapczynski 8be23efa73 Implement hasUpdated() to watch for changes on Google Drive side 2013-05-30 21:45:16 -04:00
Michael Gapczynski b4bf6a8d3a Include 3rdparty Google Drive SDK 0.6.2 2013-05-17 14:33:37 -04:00
Michael Gapczynski 4bb9c4a42e Fix constant in last commit 2013-05-17 14:03:25 -04:00
Michael Gapczynski 5368c8dafa Prepare for #2013 fix 2013-05-17 11:42:14 -04:00
Michael Gapczynski ee398ccbc2 Setting Redirect URI is not required here 2013-05-16 20:35:07 -04:00
Michael Gapczynski d8c660c6d5 Switch to using Google Drive SDK, closes #2047 2013-05-16 20:09:32 -04:00
Michael Gapczynski 702c27b0e6 Merge branch 'master' into external_storage_ui_feedback
Conflicts:
	apps/files_external/js/settings.js
	apps/files_external/lib/smb.php
	apps/files_external/templates/settings.php
	lib/files/storage/common.php
2013-02-19 19:12:14 -05:00
Michael Gapczynski 6eba790a75 Merge branch 'master' into external_storage_ui_feedback
Conflicts:
	apps/files_external/js/dropbox.js
	apps/files_external/js/google.js
	apps/files_external/js/settings.js
	apps/files_external/lib/amazons3.php
	apps/files_external/lib/dropbox.php
	apps/files_external/lib/google.php
	apps/files_external/lib/smb.php
	apps/files_external/lib/swift.php
	apps/files_external/lib/webdav.php
	lib/filestorage.php
2013-02-11 20:27:05 -05:00
Michael Gapczynski 808a13922c Remove the leading slash from the filename for opendir 2013-02-11 17:55:44 -05:00
Robin Appelman c9c919da57 Move streamwrappers to seperate files and put them in a namespace 2013-01-28 15:34:15 +01:00
Michael Gapczynski 464dafd7d2 Make Google Drive storage id unique, before it was anonymousanonymous 2013-01-09 22:17:39 -05:00
Michael Gapczynski ad902a9848 Move storage backend tests from constructor to test function 2012-12-28 12:00:48 -05:00
Michael Gapczynski 0dbf1d0260 Show status icons for mount points in external storage UI 2012-12-24 13:45:52 -05:00