Changeset 52c9172778e5d153c7db8d0957fe720d413134cb
- Timestamp:
- 02/04/12 10:57:36 (4 months ago)
- Author:
- Xemle <xemle@phtagr.org>
- Children:
- a4401eef74856f8f535f045b8cf584368f45c645
- Parents:
- 9287efa097e9bcfcba4e7a1f59c4782f94e0eac2
- git-committer:
- Xemle <xemle@phtagr.org> / 2012-02-04T10:57:36Z+0100
- Message:
-
Fix User->canUpload()
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r3605ef4
|
r52c9172
|
|
| 246 | 246 | |
| 247 | 247 | function canUpload($user, $size) { |
| 248 | | $this->bindModel(array('hasMany' => array('Media'))); |
| | 248 | $this->bindModel(array('hasMany' => array('MyFile'))); |
| 249 | 249 | $userId = intval($user['User']['id']); |
| 250 | 250 | if ($userId < 1) { |
| … |
… |
|
| 252 | 252 | } |
| 253 | 253 | |
| 254 | | $current = $this->Media->countBytes($userId, false); |
| | 254 | $current = $this->MyFile->countBytes($userId, false); |
| 255 | 255 | $quota = $user['User']['quota']; |
| 256 | 256 | if ($current + $size <= $quota) { |