Fixed issue 403, make the calcul of project's disk used space optionnal.

This commit is contained in:
Loic d'Anterroches
2010-05-19 10:55:50 +02:00
parent 2aebc0e099
commit ad6148cae7
3 changed files with 13 additions and 4 deletions

View File

@@ -366,7 +366,8 @@ class IDF_Project extends Pluf_Model
public function getRepositorySize($force=false)
{
$last_eval = $this->getConf()->getVal('repository_size_check_date', 0);
if (!$force and $last_eval > time()-172800) {
if (Pluf::f('idf_no_size_check', false) or
(!$force and $last_eval > time()-172800)) {
return $this->getConf()->getVal('repository_size', -1);
}
$this->getConf()->setVal('repository_size_check_date', time());