Commit Graph

49 Commits

Author SHA1 Message Date
Morris Jobke dc36d30953 Remove all occurences of @brief and @returns from PHPDoc
* test case added to avoid adding them later
2014-05-19 17:50:53 +02:00
Robin McCorkell 87b548ed91 Fix all PHPDoc types and variable names, in /lib 2014-05-13 19:08:14 +01:00
Sjors van der Pluijm e8a287f5bb refs #8376; spaces=>tabs 2014-04-28 19:52:06 +02:00
Sjors van der Pluijm 54f482ff9c refs #8376; added comment and applied patch on other files 2014-04-28 19:32:25 +02:00
Sjors van der Pluijm d7ec1fe447 rewind iterator before iteration starts 2014-04-28 13:05:20 +02:00
Sjors van der Pluijm d8be9d96ed fixes #8376 2014-04-28 10:20:24 +02:00
Morris Jobke a2a0eb370b Merge pull request #8222 from owncloud/type-hinting
Type hinting fixes
2014-04-17 16:08:15 +02:00
Bart Visscher a4b7f5155f Fix PHPdoc in lib/private
using scrutinizer patch
2014-04-15 22:55:20 +02:00
Robin McCorkell eeee9eacea Prevent error from cache update on deleted files 2014-04-13 16:17:13 +01:00
Vincent Petry 8d05848391 Merge pull request #7825 from owncloud/hash-stream
Use streams when generating hashes of remote files
2014-04-10 10:42:04 +02:00
Robin Appelman 1c7a71ca77 use binary safe read 2014-04-02 04:38:54 +02:00
Robin Appelman 54a15a8001 Use streams when generating hashes of remote files 2014-04-02 04:38:54 +02:00
Vincent Petry 0067a4eac2 Added missing fclose in file_get_contents and file_put_contents 2014-04-01 10:08:16 +02:00
Vincent Petry d6ce45fe61 Correctly read the full stream in file_get_contents
When using user-defined stream wrappers, PHP will
return a maximum of 8192 bytes even if more was
requested.

This fix uses stream_get_contents to make sure the full stream is read
and not only the first 8 KB.

Added unit test with a bigger test file to cover this case.
2014-04-01 10:07:16 +02:00
Thomas Müller 70db348475 Merge pull request #7824 from owncloud/hash-parameter-order
Fix parameter order for Storage\Local::hash
2014-03-28 13:06:07 +01:00
Thomas Müller ed97d872af Merge pull request #7325 from owncloud/recursive-mkdir-local
Recursive mkdir fixes #7047
2014-03-25 22:45:14 +01:00
Robin Appelman 7a8f1389fe fix temporary file based common hash 2014-03-21 13:23:14 +01:00
Robin Appelman fffe330bbc Fix parameter order for Storage\Local::hash 2014-03-20 15:32:12 +01:00
Vincent Petry 66bc0f0848 Still return quota value when free space is unknown
Fixed the quota storage wrapper to correctly return the quota value when
the free space is not known (which usually happens when the disk_free_space
function is disabled)
2014-03-19 19:07:11 +01:00
Vincent Petry c1cb9ee9b0 Merge pull request #7650 from owncloud/quota-totalspace
Fixed total space display when data size exceeds quota
2014-03-11 12:40:59 +01:00
Vincent Petry 010eef95c0 Fixed total space display when data size exceeds quota
The total space display in the personal page now shows the quota value
instead of used space when used space exceeds the quota (soft quota).
2014-03-10 17:59:14 +01:00
Vincent Petry 26513bc17b Merge pull request #7624 from owncloud/enc-encryptedusedspacefix
[master] Fixed used space to be based on unencrypted size
2014-03-10 09:38:24 +01:00
Vincent Petry 48d63a6278 Return unencrypted_size of folder when queried
This fixes the "used space" to be based on the unencrypted size, not
encrypted size, to be consistent with how quota/space is handled when
encryption is enabled
2014-03-07 14:59:09 +01:00
Robin Appelman a8c67dc675 Add caching for getLocalFile on remote storages 2014-03-04 15:44:58 +01:00
Vincent Petry a23ef25010 Removed unused deleteAll method on Common storage class
The "deleteAll" method on the Common storage class isn't used anywhere.
Also, it isn't defined on the Storage interface so this fix removes it
completely.
2014-02-24 12:21:48 +01:00
Robin Appelman f86dffd56c Merge branch 'master' into recursive-mkdir-local 2014-02-21 15:43:54 +01:00
Thomas Müller ec45a3c0e2 Merge pull request #6962 from owncloud/quota-space-root
Allow passing a root folder to get the used space from in the quota wrapper
2014-02-20 16:47:59 +01:00
Robin Appelman d1c392d9ad Also make "regular" local storage's mkdir recursive 2014-02-20 15:36:30 +01:00
Joshua Medeiros 76aa4714cf Recursive mkdir fixes #7047 2014-02-20 15:35:00 +01: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 9fac95c2ab Merge branch 'master' into scrutinizer_documentation_patches
Conflicts:
	lib/private/appconfig.php
2014-02-14 23:03:27 +01:00
Vincent Petry 788c8540aa Added isLocal() method to storage, used for xsendfile
Added isLocal() method to Storage to find out whether the storage is
local or not.
This method is used for the x-sendfile logic to find out whether to add
the headers.
2014-02-06 20:53:15 +01:00
Jörn Friedrich Dreyer 2a6a9a8cef polish documentation based on scrutinizer patches 2014-02-06 17:02:21 +01:00
Robin Appelman 20c2aaab00 Actually rename the variable 2014-01-27 16:26:54 +01:00
Robin Appelman c8207312c7 Fix phpdoc 2014-01-27 16:00:10 +01:00
Robin Appelman a521949baf Allow passing a root folder to get the used space from in the quota wrapper 2014-01-27 15:41:56 +01:00
Vincent Petry 1af7dab535 Fixed quota wrapper to not wrap failed fopen streams
When calling fopen() on some storage types, these return false instead
of throwing an exception.

This fix makes sure that in case the stream wasn't opened (for example
when a file doesn't exist any more) the stream isn't wrapped.

Also added 'rb' as another case that doesn't need to be wrapped.

Fixes #6832
2014-01-19 18:51:36 +01:00
Robin Appelman 25370fcb82 Return SPACE_UNKNOWN if disk_free_space is disabled when getting the free space on a local storage 2014-01-02 13:19:10 +01:00
Vincent Petry 6cf9844e9c Added unit test for the test() method
This is to make sure that method isn't broken
2013-12-03 14:35:53 +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
Vincent Petry 69e8e7dbd5 Now using the "Home" storage detection approach for quota
To find out whether to apply a quota, we now try and detect whether the
storage to wrap is a "Home" storage.
2013-11-21 12:17:47 +01:00
Robin Appelman a0d570b4cc Change default mimetype detection for storage backends to only use filename 2013-11-20 15:25:29 +01:00
Vincent Petry 34c92f6656 Now using HomeStorage for legacy home storage ids
Legacy home storage ids with the format "local://path/to/datadir/user1"
are now also wrapped by the HomeStorage.
2013-11-12 18:01:02 +01:00
Robin Appelman 32a703ab36 Do not use -1 as the size for the root folder of the home storage 2013-11-12 16:15:43 +01:00
Thomas Mueller e37047b2a0 WIN: fixing Fatal error: Call to a member function logicToPhysical() on a non-object in C:\jenkins2\workspace\server-stable5-windows\database\mssql\label\WINDOWS\lib\files\storage\mappedlocal.php on line 311 2013-11-02 20:22:12 +01:00
Robin Appelman f1e6e80eb1 add specialized storage backend for home folders 2013-10-29 00:14:23 +01:00
Vincent Petry c8df27de73 Fixed quota stream to not wrap read-only fopen calls 2013-10-25 12:33:16 +02:00
Thomas Müller 51b581a84d php 5.3 compatibility for \OC\Files\Storage 2013-10-08 23:00:41 +02:00
Thomas Müller 9c9dc276b7 move the private namespace OC into lib/private - OCP will stay in lib/public
Conflicts:
	lib/private/vcategories.php
2013-09-30 16:36:59 +02:00