From e357d172fa71f9b940ed35df0dd5ee6eb6777d5a Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 24 Dec 2011 07:45:22 -0500 Subject: Fixes #3272 added button to revert avatar --- languages/en.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'languages/en.php') diff --git a/languages/en.php b/languages/en.php index 93099c98f..2f8ab41c9 100644 --- a/languages/en.php +++ b/languages/en.php @@ -363,6 +363,7 @@ $english = array( 'avatar:preview' => 'Preview', 'avatar:upload' => 'Upload a new avatar', 'avatar:current' => 'Current avatar', + 'avatar:revert' => 'Revert your avatar to the default icon', 'avatar:crop:title' => 'Avatar cropping tool', 'avatar:upload:instructions' => "Your avatar is displayed throughout the site. You can change it as often as you'd like. (File formats accepted: GIF, JPG or PNG)", 'avatar:create:instructions' => 'Click and drag a square below to match how you want your avatar cropped. A preview will appear in the box on the right. When you are happy with the preview, click \'Create your avatar\'. This cropped version will be used throughout the site as your avatar.', @@ -371,6 +372,8 @@ $english = array( 'avatar:resize:fail' => 'Resize of the avatar failed', 'avatar:crop:success' => 'Cropping the avatar succeeded', 'avatar:crop:fail' => 'Avatar cropping failed', + 'avatar:revert:success' => 'Reverting the avatar succeeded', + 'avatar:revert:fail' => 'Avatar revert failed', 'profile:edit' => 'Edit profile', 'profile:aboutme' => "About me", @@ -840,6 +843,7 @@ $english = array( 'new' => 'New', 'add' => 'Add', 'create' => 'Create', + 'revert' => 'Revert', 'site' => 'Site', 'activity' => 'Activity', -- cgit v1.2.3 From e04c580e7064c24104f29a8aed295381c351b4a4 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 1 Jan 2012 19:29:17 -0500 Subject: Fixes #3939 if user does not have permissions to see the name of the access collection, it is shown as "Limited" --- engine/lib/access.php | 15 ++++++--------- languages/en.php | 2 ++ views/default/output/access.php | 5 ++++- 3 files changed, 12 insertions(+), 10 deletions(-) (limited to 'languages/en.php') diff --git a/engine/lib/access.php b/engine/lib/access.php index 08b9283cd..7be92fbfc 100644 --- a/engine/lib/access.php +++ b/engine/lib/access.php @@ -838,7 +838,7 @@ function elgg_list_entities_from_access_id(array $options = array()) { * * @param int $entity_access_id The entity's access id * - * @return string 'Public', 'Private', etc. or false if error. + * @return string 'Public', 'Private', etc. * @since 1.7.0 * @todo I think this probably wants get_access_array() instead of get_write_access_array(), * but those two functions return different types of arrays. @@ -849,15 +849,12 @@ function get_readable_access_level($entity_access_id) { //get the access level for object in readable string $options = get_write_access_array(); - //@todo Really? Use array_key_exists() - foreach ($options as $key => $option) { - if ($key == $access) { - $entity_acl = htmlentities($option, ENT_QUOTES, 'UTF-8'); - return $entity_acl; - break; - } + if (array_key_exists($access, $options)) { + return $options[$access]; } - return false; + + // return 'Limited' if the user does not have access to the access collection + return elgg_echo('access:limited:label'); } /** diff --git a/languages/en.php b/languages/en.php index 2f8ab41c9..acc8e0bc0 100644 --- a/languages/en.php +++ b/languages/en.php @@ -270,6 +270,8 @@ $english = array( 'PUBLIC' => "Public", 'access:friends:label' => "Friends", 'access' => "Access", + 'access:limited:label' => "Limited", + 'access:help' => "The access level", /** * Dashboard and widgets diff --git a/views/default/output/access.php b/views/default/output/access.php index 811948323..91c5c721e 100644 --- a/views/default/output/access.php +++ b/views/default/output/access.php @@ -11,6 +11,7 @@ if (isset($vars['entity']) && elgg_instanceof($vars['entity'])) { $access_id = $vars['entity']->access_id; $access_class = 'elgg-access'; $access_id_string = get_readable_access_level($access_id); + $access_id_string = htmlentities($access_id_string, ENT_QUOTES, 'UTF-8'); // if within a group or shared access collection display group name and open/closed membership status // @todo have a better way to do this instead of checking against subtype / class. @@ -35,5 +36,7 @@ if (isset($vars['entity']) && elgg_instanceof($vars['entity'])) { $access_class .= ' elgg-access-private'; } - echo "$access_id_string"; + $help_text = elgg_echo('access:help'); + + echo "$access_id_string"; } -- cgit v1.2.3 From a5d89ccf653748c471a3c62c46a02db3be4e23dc Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Mon, 2 Jan 2012 09:13:37 -0500 Subject: Fixes #4164 adds a server statistics page to admin area --- engine/lib/admin.php | 1 + languages/en.php | 12 +++++++ views/default/admin/statistics/basic.php | 19 ---------- views/default/admin/statistics/numentities.php | 40 ---------------------- views/default/admin/statistics/overview.php | 4 +-- views/default/admin/statistics/overview/basic.php | 19 ++++++++++ .../admin/statistics/overview/numentities.php | 40 ++++++++++++++++++++++ views/default/admin/statistics/server.php | 8 +++++ views/default/admin/statistics/server/php.php | 33 ++++++++++++++++++ .../default/admin/statistics/server/web_server.php | 16 +++++++++ 10 files changed, 131 insertions(+), 61 deletions(-) delete mode 100644 views/default/admin/statistics/basic.php delete mode 100644 views/default/admin/statistics/numentities.php create mode 100644 views/default/admin/statistics/overview/basic.php create mode 100644 views/default/admin/statistics/overview/numentities.php create mode 100644 views/default/admin/statistics/server.php create mode 100644 views/default/admin/statistics/server/php.php create mode 100644 views/default/admin/statistics/server/web_server.php (limited to 'languages/en.php') diff --git a/engine/lib/admin.php b/engine/lib/admin.php index 1f085eee4..5a475a9f0 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -262,6 +262,7 @@ function admin_init() { // statistics elgg_register_admin_menu_item('administer', 'statistics', null, 20); elgg_register_admin_menu_item('administer', 'overview', 'statistics'); + elgg_register_admin_menu_item('administer', 'server', 'statistics'); // users elgg_register_admin_menu_item('administer', 'users', null, 20); diff --git a/languages/en.php b/languages/en.php index acc8e0bc0..d9149a689 100644 --- a/languages/en.php +++ b/languages/en.php @@ -568,6 +568,7 @@ $english = array( 'admin:statistics' => "Statistics", 'admin:statistics:overview' => 'Overview', + 'admin:statistics:server' => 'Server Info', 'admin:appearance' => 'Appearance', 'admin:administer_utilities' => 'Utilities', @@ -726,6 +727,17 @@ $english = array( 'admin:statistics:label:version:release' => "Release", 'admin:statistics:label:version:version' => "Version", + 'admin:server:label:php' => 'PHP', + 'admin:server:label:web_server' => 'Web Server', + 'admin:server:label:server' => 'Server', + 'admin:server:label:log_location' => 'Log Location', + 'admin:server:label:php_version' => 'PHP version', + 'admin:server:label:php_ini' => 'PHP ini file location', + 'admin:server:label:php_log' => 'PHP Log', + 'admin:server:label:mem_avail' => 'Memory available', + 'admin:server:label:mem_used' => 'Memory used', + 'admin:server:error_log' => "Web server's error log", + 'admin:user:label:search' => "Find users:", 'admin:user:label:searchbutton' => "Search", diff --git a/views/default/admin/statistics/basic.php b/views/default/admin/statistics/basic.php deleted file mode 100644 index 2c9b3b88e..000000000 --- a/views/default/admin/statistics/basic.php +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - -
: - , -
: /
\ No newline at end of file diff --git a/views/default/admin/statistics/numentities.php b/views/default/admin/statistics/numentities.php deleted file mode 100644 index af4ae2773..000000000 --- a/views/default/admin/statistics/numentities.php +++ /dev/null @@ -1,40 +0,0 @@ - - - $entry) { - arsort($entry); - foreach ($entry as $a => $b) { - - //This function controls the alternating class - $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; - - if ($a == "__base__") { - $a = elgg_echo("item:{$k}"); - if (empty($a)) - $a = $k; - } else { - if (empty($a)) { - $a = elgg_echo("item:{$k}"); - } else { - $a = elgg_echo("item:{$k}:{$a}"); - } - - if (empty($a)) { - $a = "$k $a"; - } - } - - echo <<< END - - - - -END; - } - } -?> -
{$a}:{$b}
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/overview/basic.php b/views/default/admin/statistics/overview/basic.php new file mode 100644 index 000000000..2c9b3b88e --- /dev/null +++ b/views/default/admin/statistics/overview/basic.php @@ -0,0 +1,19 @@ + + + + + + + + + + +
: - , -
: /
\ No newline at end of file diff --git a/views/default/admin/statistics/overview/numentities.php b/views/default/admin/statistics/overview/numentities.php new file mode 100644 index 000000000..af4ae2773 --- /dev/null +++ b/views/default/admin/statistics/overview/numentities.php @@ -0,0 +1,40 @@ + + + $entry) { + arsort($entry); + foreach ($entry as $a => $b) { + + //This function controls the alternating class + $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; + + if ($a == "__base__") { + $a = elgg_echo("item:{$k}"); + if (empty($a)) + $a = $k; + } else { + if (empty($a)) { + $a = elgg_echo("item:{$k}"); + } else { + $a = elgg_echo("item:{$k}:{$a}"); + } + + if (empty($a)) { + $a = "$k $a"; + } + } + + echo <<< END + + + + +END; + } + } +?> +
{$a}:{$b}
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 @@ + + + + + + + + + + + + + + + + + + + + + + +
:
:
:
:
:
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 @@ + + + + + + + + + + +
:
:
-- cgit v1.2.3