summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2014-03-02 19:22:07 +0000
committerChristopher Smith <chris@jalakai.co.uk>2014-03-02 19:22:07 +0000
commit85312e0a1accea20df49579b509eb88ba5643384 (patch)
tree08c6c8d4b56758ac298d366e5b2c3a19f7eb598e /inc/common.php
parentff388af35a3aed43d96bc31ae6b553f8a37050e0 (diff)
parent74160ca1dea24b237ff3e956d19a420a1593b957 (diff)
downloadrpg-85312e0a1accea20df49579b509eb88ba5643384.tar.gz
rpg-85312e0a1accea20df49579b509eb88ba5643384.tar.bz2
Merge pull request #557 from splitbrain/cachetimeattr
Add _time attribute to cache object and minor PHPDocs improvements
Diffstat (limited to 'inc/common.php')
-rw-r--r--inc/common.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/inc/common.php b/inc/common.php
index bbc0a6e68..9a53ee526 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1141,7 +1141,6 @@ function saveWikiText($id, $text, $summary, $minor = false) {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function saveOldRevision($id) {
- global $conf;
$oldf = wikiFN($id);
if(!@file_exists($oldf)) return '';
$date = filemtime($oldf);
@@ -1231,8 +1230,9 @@ function getGoogleQuery() {
/**
* Return the human readable size of a file
*
- * @param int $size A file size
- * @param int $dec A number of decimal places
+ * @param int $size A file size
+ * @param int $dec A number of decimal places
+ * @return string human readable size
* @author Martin Benjamin <b.martin@cybernet.ch>
* @author Aidan Lister <aidan@php.net>
* @version 1.0.0
@@ -1363,12 +1363,16 @@ function php_to_byte($v) {
$l = substr($v, -1);
$ret = substr($v, 0, -1);
switch(strtoupper($l)) {
+ /** @noinspection PhpMissingBreakStatementInspection */
case 'P':
$ret *= 1024;
+ /** @noinspection PhpMissingBreakStatementInspection */
case 'T':
$ret *= 1024;
+ /** @noinspection PhpMissingBreakStatementInspection */
case 'G':
$ret *= 1024;
+ /** @noinspection PhpMissingBreakStatementInspection */
case 'M':
$ret *= 1024;
case 'K':