aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/group.php26
-rw-r--r--engine/lib/metadata.php7
-rw-r--r--engine/lib/plugins.php3
-rw-r--r--engine/lib/views.php5
4 files changed, 21 insertions, 20 deletions
diff --git a/engine/lib/group.php b/engine/lib/group.php
index 29330eeca..feb1f1e7f 100644
--- a/engine/lib/group.php
+++ b/engine/lib/group.php
@@ -261,16 +261,24 @@ function group_gatekeeper($forward = true) {
if ($group = elgg_get_page_owner_entity()) {
if ($group instanceof ElggGroup) {
$url = $group->getURL();
- if (
- ((!elgg_is_logged_in()) && (!$group->isPublicMembership())) ||
- ((!$group->isMember(elgg_get_logged_in_user_entity()) && (!$group->isPublicMembership())))
- ) {
- $allowed = false;
- }
+ if (!$group->isPublicMembership()) {
+ // closed group so must be member or an admin
+
+ if (!elgg_is_logged_in()) {
+ $allowed = false;
+ if ($forward == true) {
+ $_SESSION['last_forward_from'] = current_page_url();
+ register_error(elgg_echo('loggedinrequired'));
+ forward('', 'login');
+ }
+ } else if (!$group->isMember(elgg_get_logged_in_user_entity())) {
+ $allowed = false;
+ }
- // Admin override
- if (elgg_is_admin_logged_in()) {
- $allowed = true;
+ // Admin override
+ if (elgg_is_admin_logged_in()) {
+ $allowed = true;
+ }
}
}
}
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 012c73ad9..34a36d86e 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -746,7 +746,7 @@ function export_metadata_plugin_hook($hook, $entity_type, $returnvalue, $params)
/**
* Takes in a comma-separated string and returns an array of tags
- * which have been trimmed and set to lower case
+ * which have been trimmed
*
* @param string $string Comma-separated tag string
*
@@ -755,12 +755,7 @@ function export_metadata_plugin_hook($hook, $entity_type, $returnvalue, $params)
function string_to_tag_array($string) {
if (is_string($string)) {
$ar = explode(",", $string);
- // trim blank spaces
$ar = array_map('trim', $ar);
- // make lower case : [Marcus Povey 20090605 - Using mb wrapper function
- // using UTF8 safe function where available]
- $ar = array_map('elgg_strtolower', $ar);
- // Remove null values
$ar = array_filter($ar, 'is_not_null');
return $ar;
}
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index 70bfcb28b..123fb18d8 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -298,6 +298,9 @@ function elgg_load_plugins() {
// temporary disable all plugins if there is a file called 'disabled' in the plugin dir
if (file_exists("$plugins_path/disabled")) {
+ if (elgg_is_admin_logged_in() && elgg_in_context('admin')) {
+ system_message(elgg_echo('plugins:disabled'));
+ }
return false;
}
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 052387191..ca0ce7196 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -969,12 +969,7 @@ function elgg_view_annotation(ElggAnnotation $annotation, array $vars = array(),
return elgg_view($view, $vars, $bypass, $debug);
}
- // @todo would be better to always make sure name is initialized properly
$name = $annotation->name;
- $intname = (int) $name;
- if ("{$intname}" == "{$name}") {
- $name = get_metastring($intname);
- }
if (empty($name)) {
return false;
}