Changeset 52c9172778e5d153c7db8d0957fe720d413134cb

Show
Ignore:
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:
1 modified

Legend:

Unmodified
Added
Removed
  • Model/User.php

    r3605ef4 r52c9172  
    246246 
    247247  function canUpload($user, $size) { 
    248     $this->bindModel(array('hasMany' => array('Media'))); 
     248    $this->bindModel(array('hasMany' => array('MyFile'))); 
    249249    $userId = intval($user['User']['id']); 
    250250    if ($userId < 1) { 
     
    252252    } 
    253253 
    254     $current = $this->Media->countBytes($userId, false); 
     254    $current = $this->MyFile->countBytes($userId, false); 
    255255    $quota = $user['User']['quota']; 
    256256    if ($current + $size <= $quota) {