1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 16:33:00 +00:00

tweaks page list

This commit is contained in:
Starbeamrainbowlabs 2015-04-09 20:16:17 +01:00
parent 69515ece3e
commit e4f4678d12
2 changed files with 8 additions and 8 deletions

View file

@ -351,6 +351,7 @@ class Slimdown {
//////////////// Functions //////////////// //////////////// Functions ////////////////
/////////////////////////////////////////// ///////////////////////////////////////////
//from http://php.net/manual/en/function.filesize.php#106569 //from http://php.net/manual/en/function.filesize.php#106569
//edited by Starbeamrainbowlabs
function human_filesize($bytes, $decimals = 2) function human_filesize($bytes, $decimals = 2)
{ {
$sz = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "YB", "ZB"]; $sz = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "YB", "ZB"];
@ -507,8 +508,7 @@ switch($_GET["action"])
<th>Page Name</th> <th>Page Name</th>
<th>Size</th> <th>Size</th>
<th>Last Editor</th> <th>Last Editor</th>
<th>Last Edited</th> <th>Last Edit Time</th>
<th>Time Since Last Edit</th>
</tr>\n"; </tr>\n";
foreach($pageindex as $pagename => $pagedetails) foreach($pageindex as $pagename => $pagedetails)
{ {
@ -516,8 +516,8 @@ switch($_GET["action"])
<td><a href='index.php?page=$pagename'>$pagename</a></td> <td><a href='index.php?page=$pagename'>$pagename</a></td>
<td>" . human_filesize($pagedetails->size) . "</td> <td>" . human_filesize($pagedetails->size) . "</td>
<td>$pagedetails->lasteditor</td> <td>$pagedetails->lasteditor</td>
<td>" . date("l jS \of F Y \a\\t h:ia T", $pagedetails->lastmodified) . "</td> <td>" . human_time_since($pagedetails->lastmodified) . " <small>(" . date("l jS \of F Y \a\\t h:ia T", $pagedetails->lastmodified) . ")</small></td>
<td>" . human_time_since($pagedetails->lastmodified) . "</td>
</tr>\n"; </tr>\n";
} }
$content .= " </table>"; $content .= " </table>";

View file

@ -475,6 +475,7 @@ class Slimdown {
//////////////// Functions //////////////// //////////////// Functions ////////////////
/////////////////////////////////////////// ///////////////////////////////////////////
//from http://php.net/manual/en/function.filesize.php#106569 //from http://php.net/manual/en/function.filesize.php#106569
//edited by Starbeamrainbowlabs
function human_filesize($bytes, $decimals = 2) function human_filesize($bytes, $decimals = 2)
{ {
$sz = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "YB", "ZB"]; $sz = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "YB", "ZB"];
@ -631,8 +632,7 @@ switch($_GET["action"])
<th>Page Name</th> <th>Page Name</th>
<th>Size</th> <th>Size</th>
<th>Last Editor</th> <th>Last Editor</th>
<th>Last Edited</th> <th>Last Edit Time</th>
<th>Time Since Last Edit</th>
</tr>\n"; </tr>\n";
foreach($pageindex as $pagename => $pagedetails) foreach($pageindex as $pagename => $pagedetails)
{ {
@ -640,8 +640,8 @@ switch($_GET["action"])
<td><a href='index.php?page=$pagename'>$pagename</a></td> <td><a href='index.php?page=$pagename'>$pagename</a></td>
<td>" . human_filesize($pagedetails->size) . "</td> <td>" . human_filesize($pagedetails->size) . "</td>
<td>$pagedetails->lasteditor</td> <td>$pagedetails->lasteditor</td>
<td>" . date("l jS \of F Y \a\\t h:ia T", $pagedetails->lastmodified) . "</td> <td>" . human_time_since($pagedetails->lastmodified) . " <small>(" . date("l jS \of F Y \a\\t h:ia T", $pagedetails->lastmodified) . ")</small></td>
<td>" . human_time_since($pagedetails->lastmodified) . "</td>
</tr>\n"; </tr>\n";
} }
$content .= " </table>"; $content .= " </table>";