Change Details
| src/IDF/Scm/Git.php |
| 43 | 43 | |
| 44 | 44 | public function getRepositorySize() |
| 45 | 45 | { |
| 46 | | $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -bs ' |
| 46 | $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -sk ' |
| 47 | 47 | .escapeshellarg($this->repo); |
| 48 | 48 | $out = split(' ', shell_exec($cmd), 2); |
| 49 | | return (int) $out[0]; |
| 49 | return (int) $out[0]*1024; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | public function isAvailable() |
| src/IDF/Scm/Mercurial.php |
| 35 | 35 | |
| 36 | 36 | public function getRepositorySize() |
| 37 | 37 | { |
| 38 | | $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -bs ' |
| 38 | $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -sk ' |
| 39 | 39 | .escapeshellarg($this->repo); |
| 40 | 40 | $out = split(' ', shell_exec($cmd), 2); |
| 41 | | return (int) $out[0]; |
| 41 | return (int) $out[0]*1024; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | public static function factory($project) |
| src/IDF/Scm/Svn.php |
| 56 | 56 | if (strpos($this->repo, 'file://') !== 0) { |
| 57 | 57 | return -1; |
| 58 | 58 | } |
| 59 | | $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -bs ' |
| 59 | $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -sk ' |
| 60 | 60 | .escapeshellarg(substr($this->repo, 7)); |
| 61 | 61 | $out = split(' ', shell_exec($cmd), 2); |
| 62 | | return (int) $out[0]; |
| 62 | return (int) $out[0]*1024; |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
| src/IDF/Views/Admin.php |
| 319 | 319 | $res['repositories'] += $size; |
| 320 | 320 | } |
| 321 | 321 | } |
| 322 | | $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -bs ' |
| 322 | $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -sk ' |
| 323 | 323 | .escapeshellarg(Pluf::f('upload_path')); |
| 324 | 324 | $out = split(' ', shell_exec($cmd), 2); |
| 325 | | $res['downloads'] = $out[0]; |
| 326 | | $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -bs ' |
| 325 | $res['downloads'] = $out[0]*1024; |
| 326 | $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -sk ' |
| 327 | 327 | .escapeshellarg(Pluf::f('upload_issue_path')); |
| 328 | 328 | $out = split(' ', shell_exec($cmd), 2); |
| 329 | | $res['attachments'] = $out[0]; |
| 329 | $res['attachments'] = $out[0]*1024; |
| 330 | 330 | $res['total'] = $res['repositories'] + $res['downloads'] + $res['attachments']; |
| 331 | 331 | // TODO: now we need the db |
| 332 | 332 | return $res; |
Download the corresponding diff file