projects
/
rock.divinelegy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
524445c
)
Include file size.
author
Cameron Ball
<cameron@getapproved.com.au>
Fri, 5 Dec 2014 02:32:03 +0000
(10:32 +0800)
committer
Cameron Ball
<cameron@getapproved.com.au>
Fri, 5 Dec 2014 02:32:03 +0000
(10:32 +0800)
Controllers/SimfileController.php
patch
|
blob
|
history
diff --git
a/Controllers/SimfileController.php
b/Controllers/SimfileController.php
index
2763fd6
..
ab63396
100644
(file)
--- a/
Controllers/SimfileController.php
+++ b/
Controllers/SimfileController.php
@@
-13,6
+13,7
@@
use DataAccess\StepMania\IPackRepository;
use DataAccess\IFileRepository;
\r
use Domain\Entities\StepMania\ISimfile;
\r
use Domain\Entities\IFile;
\r
use DataAccess\IFileRepository;
\r
use Domain\Entities\StepMania\ISimfile;
\r
use Domain\Entities\IFile;
\r
+use Domain\Util;
\r
\r
class SimfileController implements IDivineController
\r
{
\r
\r
class SimfileController implements IDivineController
\r
{
\r
@@
-89,7
+90,8
@@
class SimfileController implements IDivineController
'contributors' => $pack->getContributors(),
\r
'simfiles' => $packSimfiles,
\r
'banner' => $pack->getBanner() ? 'files/banner/' . $pack->getBanner()->getHash() : 'files/banner/default',
\r
'contributors' => $pack->getContributors(),
\r
'simfiles' => $packSimfiles,
\r
'banner' => $pack->getBanner() ? 'files/banner/' . $pack->getBanner()->getHash() : 'files/banner/default',
\r
- 'mirrors' => $packMirrors
\r
+ 'mirrors' => $packMirrors,
\r
+ 'size' => $pack->getFile() ? Util::bytesToHumanReadable($pack->getFile()->getSize()) : null
\r
);
\r
}
\r
\r
);
\r
}
\r
\r
@@
-181,7
+183,8
@@
class SimfileController implements IDivineController
'fgChanges' => $simfile->hasFgChanges() ? 'Yes' : 'No',
\r
'bpmChanges' => $simfile->hasBPMChanges() ? 'Yes' : 'No',
\r
'banner' => $simfile->getBanner() ? 'files/banner/' . $simfile->getBanner()->getHash() : 'files/banner/default',
\r
'fgChanges' => $simfile->hasFgChanges() ? 'Yes' : 'No',
\r
'bpmChanges' => $simfile->hasBPMChanges() ? 'Yes' : 'No',
\r
'banner' => $simfile->getBanner() ? 'files/banner/' . $simfile->getBanner()->getHash() : 'files/banner/default',
\r
- 'download' => $simfile->getSimfile() ? 'files/simfile/' . $simfile->getSimfile()->getHash() : null
\r
+ 'download' => $simfile->getSimfile() ? 'files/simfile/' . $simfile->getSimfile()->getHash() : null,
\r
+ 'size' => $simfile->getSimfile() ? Util::bytesToHumanReadable($simfile->getSimfile()->getSize()) : null
\r
);
\r
}
\r
}
\r
);
\r
}
\r
}
\r