diff options
Diffstat (limited to 'views/default/admin')
-rw-r--r-- | views/default/admin/plugins.php | 8 | ||||
-rw-r--r-- | views/default/admin/statistics/overview.php | 4 | ||||
-rw-r--r-- | views/default/admin/statistics/overview/basic.php (renamed from views/default/admin/statistics/basic.php) | 0 | ||||
-rw-r--r-- | views/default/admin/statistics/overview/numentities.php (renamed from views/default/admin/statistics/numentities.php) | 0 | ||||
-rw-r--r-- | views/default/admin/statistics/server.php | 8 | ||||
-rw-r--r-- | views/default/admin/statistics/server/php.php | 50 | ||||
-rw-r--r-- | views/default/admin/statistics/server/web_server.php | 16 |
7 files changed, 77 insertions, 9 deletions
diff --git a/views/default/admin/plugins.php b/views/default/admin/plugins.php index b793175e0..42f153d0f 100644 --- a/views/default/admin/plugins.php +++ b/views/default/admin/plugins.php @@ -64,13 +64,7 @@ foreach ($installed_plugins as $id => $plugin) { if (isset($plugin_categories)) { foreach ($plugin_categories as $category) { if (!array_key_exists($category, $categories)) { - // if localization string not defined, fall back to original category string - $cat_raw_string = "admin:plugins:category:$category"; - $cat_display_string = elgg_echo($cat_raw_string); - if ($cat_display_string == $cat_raw_string) { - $cat_display_string = ucwords($category); - } - $categories[$category] = $cat_display_string; + $categories[$category] = ElggPluginManifest::getFriendlyCategory($category); } } } diff --git a/views/default/admin/statistics/overview.php b/views/default/admin/statistics/overview.php index 2f5b25121..ac5aaac36 100644 --- a/views/default/admin/statistics/overview.php +++ b/views/default/admin/statistics/overview.php @@ -8,6 +8,6 @@ echo elgg_view('admin/statistics/extend'); -echo elgg_view_module('inline', elgg_echo('admin:statistics:label:basic'), elgg_view('admin/statistics/basic')); +echo elgg_view_module('inline', elgg_echo('admin:statistics:label:basic'), elgg_view('admin/statistics/overview/basic')); -echo elgg_view_module('inline', elgg_echo('admin:statistics:label:numentities'), elgg_view('admin/statistics/numentities'));
\ No newline at end of file +echo elgg_view_module('inline', elgg_echo('admin:statistics:label:numentities'), elgg_view('admin/statistics/overview/numentities')); diff --git a/views/default/admin/statistics/basic.php b/views/default/admin/statistics/overview/basic.php index 2c9b3b88e..2c9b3b88e 100644 --- a/views/default/admin/statistics/basic.php +++ b/views/default/admin/statistics/overview/basic.php diff --git a/views/default/admin/statistics/numentities.php b/views/default/admin/statistics/overview/numentities.php index af4ae2773..af4ae2773 100644 --- a/views/default/admin/statistics/numentities.php +++ b/views/default/admin/statistics/overview/numentities.php diff --git a/views/default/admin/statistics/server.php b/views/default/admin/statistics/server.php new file mode 100644 index 000000000..9d21addc1 --- /dev/null +++ b/views/default/admin/statistics/server.php @@ -0,0 +1,8 @@ +<?php +/** + * Server information + */ + +echo elgg_view_module('inline', elgg_echo('admin:server:label:web_server'), elgg_view('admin/statistics/server/web_server')); + +echo elgg_view_module('inline', elgg_echo('admin:server:label:php'), elgg_view('admin/statistics/server/php')); diff --git a/views/default/admin/statistics/server/php.php b/views/default/admin/statistics/server/php.php new file mode 100644 index 000000000..7c6a51383 --- /dev/null +++ b/views/default/admin/statistics/server/php.php @@ -0,0 +1,50 @@ +<?php +/** + * Server PHP info + */ + +$php_log = ini_get('error_log'); +if (!$php_log) { + $php_log = elgg_echo('admin:server:error_log'); +} + +$post_max_size = elgg_get_ini_setting_in_bytes('post_max_size'); +$upload_max_filesize = elgg_get_ini_setting_in_bytes('upload_max_filesize'); + +$post_max_size_warning = ''; +if ($upload_max_filesize > $post_max_size) { + // @todo show a link to something like http://nigel.mcnie.name/blog/uploadmaxfilesizepostmaxsize-experimentation ? + $post_max_size_warning = elgg_echo('admin:server:warning:post_max_too_small'); +} + +?> +<table class="elgg-table-alt"> + <tr class="odd"> + <td><b><?php echo elgg_echo('admin:server:label:php_version'); ?> :</b></td> + <td><?php echo phpversion(); ?></td> + </tr> + <tr class="even"> + <td><b><?php echo elgg_echo('admin:server:label:php_ini'); ?> :</b></td> + <td><?php echo php_ini_loaded_file(); ?></td> + </tr> + <tr class="odd"> + <td><b><?php echo elgg_echo('admin:server:label:php_log'); ?> :</b></td> + <td><?php echo $php_log; ?></td> + </tr> + <tr class="even"> + <td><b><?php echo elgg_echo('admin:server:label:mem_avail'); ?> :</b></td> + <td><?php echo number_format(elgg_get_ini_setting_in_bytes('memory_limit')); ?></td> + </tr> + <tr class="odd"> + <td><b><?php echo elgg_echo('admin:server:label:mem_used'); ?> :</b></td> + <td><?php echo number_format(memory_get_peak_usage()); ?></td> + </tr> + <tr class="even"> + <td><b><?php echo elgg_echo('admin:server:label:post_max_size'); ?> :</b></td> + <td><?php echo number_format($post_max_size); ?></td> + </tr> + <tr class="odd"> + <td><b><?php echo elgg_echo('admin:server:label:upload_max_filesize'); ?> :</b></td> + <td><?php echo number_format($upload_max_filesize) . ' ' . $post_max_size_warning; ?></td> + </tr> +</table> diff --git a/views/default/admin/statistics/server/web_server.php b/views/default/admin/statistics/server/web_server.php new file mode 100644 index 000000000..904a54f4b --- /dev/null +++ b/views/default/admin/statistics/server/web_server.php @@ -0,0 +1,16 @@ +<?php +/** + * Web server info + */ + +?> +<table class="elgg-table-alt"> + <tr class="odd"> + <td><b><?php echo elgg_echo('admin:server:label:server'); ?> :</b></td> + <td><?php echo $_SERVER['SERVER_SOFTWARE']; ?></td> + </tr> + <tr class="even"> + <td><b><?php echo elgg_echo('admin:server:label:log_location'); ?> :</b></td> + <td><?php echo getenv('APACHE_LOG_DIR'); ?></td> + </tr> +</table> |