diff options
author | Cash Costello <cash.costello@gmail.com> | 2010-07-25 02:01:36 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2010-07-25 02:01:36 +0000 |
commit | 73403645808a81425381f43c25e0ea2c92705312 (patch) | |
tree | 83fb73e9a122054f6f4c2e1c44e399572ee13e28 /pages/server_analysis.php | |
parent | 791ec4925346cb38ecca9a2f2574b012ab64a88a (diff) | |
download | elgg-73403645808a81425381f43c25e0ea2c92705312.tar.gz elgg-73403645808a81425381f43c25e0ea2c92705312.tar.bz2 |
first go at brining tidypics up to code standards
Diffstat (limited to 'pages/server_analysis.php')
-rw-r--r-- | pages/server_analysis.php | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/pages/server_analysis.php b/pages/server_analysis.php index ccffc1632..db3aed5f6 100644 --- a/pages/server_analysis.php +++ b/pages/server_analysis.php @@ -8,48 +8,49 @@ * ********************************************************************/ - include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php"; +include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php"; - global $CONFIG; +global $CONFIG; - admin_gatekeeper(); +admin_gatekeeper(); - set_context('admin'); +set_context('admin'); - $title = 'TidyPics Server Analysis'; +$title = 'TidyPics Server Analysis'; - function tp_readable_size($bytes) - { - if (strpos($bytes, 'M')) - return $bytes . 'B'; - - $size = $bytes / 1024; +function tp_readable_size($bytes) { + if (strpos($bytes, 'M')) { + return $bytes . 'B'; + } + + $size = $bytes / 1024; + if ($size < 1024) { + $size = number_format($size, 2); + $size .= ' KB'; + } else { + $size = $size / 1024; if ($size < 1024) { $size = number_format($size, 2); - $size .= ' KB'; + $size .= ' MB'; } else { $size = $size / 1024; - if($size < 1024) { - $size = number_format($size, 2); - $size .= ' MB'; - } else { - $size = $size / 1024; - $size = number_format($size, 2); - $size .= ' GB'; - } + $size = number_format($size, 2); + $size .= ' GB'; } - return $size; } + return $size; +} - $disablefunc = explode(',', ini_get('disable_functions')); - $exec_avail = "Disabled"; - if (is_callable('exec') && !in_array('exec',$disablefunc)) - $exec_avail = "Enabled"; +$disablefunc = explode(',', ini_get('disable_functions')); +$exec_avail = "Disabled"; +if (is_callable('exec') && !in_array('exec',$disablefunc)) { + $exec_avail = "Enabled"; +} - ob_start(); +ob_start(); - echo elgg_view_title($title); +echo elgg_view_title($title); ?> <div class="contentWrapper"> <table width="100%"> @@ -130,9 +131,8 @@ </div> <?php - $content = ob_get_clean(); +$content = ob_get_clean(); - $body = elgg_view_layout('two_column_left_sidebar', '', $content); +$body = elgg_view_layout('two_column_left_sidebar', '', $content); - echo page_draw($title, $body); -?>
\ No newline at end of file +echo page_draw($title, $body);
\ No newline at end of file |