Indefero

Indefero Commit Details


Date:2010-05-19 03:55:50 (14 years 7 months ago)
Author:Loic d'Anterroches
Branch:develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:ad6148cae7a288aa5ac64accc832a0722eed0358
Parents: 2aebc0e0993916502b2590dfe2517173825a7db4
Message:Fixed issue 403, make the calcul of project's disk used space optionnal.

Changes:

File differences

src/IDF/Project.php
366366
367367
368368
369
369
370
370371
371372
372373
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());
src/IDF/Views/Admin.php
357357
358358
359359
360
360
361
361362
362363
363364
......
368369
369370
370371
371
372
373
372374
373375
374376
......
379381
380382
381383
382
384
385
383386
384387
385388
}
}
$last_eval = $conf->getVal('downloads_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)) {
$res['downloads'] = $conf->getVal('downloads_size', 0);
} else {
$conf->setVal('downloads_size_check_date', time());
$conf->setVal('downloads_size', $res['downloads']);
}
$last_eval = $conf->getVal('attachments_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)) {
$res['attachments'] = $conf->getVal('attachments_size', 0);
} else {
$conf->setVal('attachments_size_check_date', time());
$conf->setVal('attachments_size', $res['attachments']);
}
$last_eval = $conf->getVal('database_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)) {
$res['database'] = $conf->getVal('database_size', 0);
} else {
$conf->setVal('database_size_check_date', time());
src/IDF/conf/idf.php-dist
235235
236236
237237
238
239
240
241
242
238243
# $cfg['hg_path'] = 'hg';
# $cfg['git_path'] = 'git';
# If you do not want to have calculations of the repositories, attachments
# and downloads size, set it to true. You can set to false some
# times to times to check the size.
# $cfg['idf_no_size_check'] = false;
return $cfg;

Archive Download the corresponding diff file

Page rendered in 0.08771s using 14 queries.