Skip to content

Consolidate getQuota and setQuota methods in User instance - #22252

Merged
6 commits merged into
masterfrom
consolidate-user-set-quota
Feb 9, 2016
Merged

6 commits merged into
masterfrom
consolidate-user-set-quota

Conversation

@blizzz

@blizzz blizzz commented Feb 9, 2016

Copy link
Copy Markdown
Contributor

As @DeepDiver1975 did it with the email setter, we also should have the methods of reading and setting the quota within the user instance.

Please review @PVince81 @DeepDiver1975 @icewind1991

Comment thread lib/private/user/user.php Outdated
*/
public function setQuota($quota) {
if($quota !== 'none' and $quota !== 'default') {
$quota= OC_Helper::computerFileSize($quota);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code needs some space 😄

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDE should reformat on copy and paste ;D

@PVince81

PVince81 commented Feb 9, 2016

Copy link
Copy Markdown
Contributor

Great stuff, setting quota this way looks much nicer.

@PVince81

PVince81 commented Feb 9, 2016

Copy link
Copy Markdown
Contributor

Looks like this still works, tested getting/setting from the users page and also querying the quota with Webdav.

👍

@icewind1991

Copy link
Copy Markdown
Contributor

👍 looks good

@PVince81

PVince81 commented Feb 9, 2016

Copy link
Copy Markdown
Contributor

First error:

11:39:37 1) AvatarTest::testSetAvatar
11:39:37 Missing argument 1 for Mock_User_f009cec1::triggerChange(), called in /ssd/jenkins/workspace/server-master-linux-php7-ci/database/sqlite/label/SLAVE/lib/private/avatar.php on line 140 and defined
11:39:37 
11:39:37 /ssd/jenkins/workspace/server-master-linux-php7-ci/database/sqlite/label/SLAVE/lib/private/avatar.php:140
11:39:37 /ssd/jenkins/workspace/server-master-linux-php7-ci/database/sqlite/label/SLAVE/lib/private/avatar.php:122
11:39:37 /ssd/jenkins/workspace/server-master-linux-php7-ci/database/sqlite/label/SLAVE/tests/lib/avatartest.php:169

@blizzz
blizzz force-pushed the consolidate-user-set-quota branch from acd0e6a to a16feed Compare February 9, 2016 17:11
@blizzz
blizzz force-pushed the consolidate-user-set-quota branch from a16feed to d19c47a Compare February 9, 2016 17:11
@PVince81

PVince81 commented Feb 9, 2016

Copy link
Copy Markdown
Contributor

👍 for the last commits

ghost pushed a commit that referenced this pull request Feb 9, 2016
Consolidate getQuota and setQuota methods in User instance
@ghost
ghost merged commit 962d0c3 into master Feb 9, 2016
@rullzer
rullzer deleted the consolidate-user-set-quota branch February 16, 2016 15:14
$versionsFileview = new \OC\Files\View('/'.$uid.'/files_versions');

// get available disk space for user
$user = \OC::$server->getUserManager()->get($uid);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💣

#23513

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I be damned.

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants