From d948178b7999ec6c87a6013af8cda8fa70216bbb Mon Sep 17 00:00:00 2001 From: Jerome Bakker Date: Thu, 26 Apr 2012 14:17:45 +0200 Subject: fixed: group icon fallback error --- mod/groups/icon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/groups/icon.php b/mod/groups/icon.php index 104da4b41..f86f84fa5 100644 --- a/mod/groups/icon.php +++ b/mod/groups/icon.php @@ -35,7 +35,7 @@ if ($filehandler->open("read")) { } if (!$success) { - $location = elgg_get_plugins_path() . "groups/graphics/default{$size}.jpg"; + $location = elgg_get_plugins_path() . "groups/graphics/default{$size}.gif"; $contents = @file_get_contents($location); } -- cgit v1.2.3 From 7303e0b19adae0a3fa5db139e3fafb310dd43485 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Tue, 1 May 2012 18:24:13 -0700 Subject: Fixes #1830. Removed access and write access inputs for non-owners and non-admins. --- mod/pages/actions/pages/edit.php | 14 +++++++++++++- mod/pages/lib/pages.php | 2 +- mod/pages/views/default/forms/pages/edit.php | 15 +++++++++++++-- 3 files changed, 27 insertions(+), 4 deletions(-) (limited to 'mod') diff --git a/mod/pages/actions/pages/edit.php b/mod/pages/actions/pages/edit.php index 6950d4b2f..a32e4a4ba 100644 --- a/mod/pages/actions/pages/edit.php +++ b/mod/pages/actions/pages/edit.php @@ -47,7 +47,19 @@ if ($page_guid) { } if (sizeof($input) > 0) { + // don't change access if not an owner/admin + $user = elgg_get_logged_in_user_entity(); + $can_change_access = true; + + if ($user && $page) { + $can_change_access = $user->isAdmin() || $user->getGUID() == $page->owner_guid; + } + foreach ($input as $name => $value) { + if (($name == 'access_id' || $name == 'write_access_id') && !$can_change_access) { + continue; + } + $page->$name = $value; } } @@ -74,6 +86,6 @@ if ($page->save()) { forward($page->getURL()); } else { - register_error(elgg_echo('pages:error:no_save')); + register_error(elgg_echo('pages:error:notsaved')); forward(REFERER); } diff --git a/mod/pages/lib/pages.php b/mod/pages/lib/pages.php index 5c5323d6f..dbf7b8917 100644 --- a/mod/pages/lib/pages.php +++ b/mod/pages/lib/pages.php @@ -111,4 +111,4 @@ function pages_register_navigation_tree($container) { } } } -} +} \ No newline at end of file diff --git a/mod/pages/views/default/forms/pages/edit.php b/mod/pages/views/default/forms/pages/edit.php index 20737a121..9469f5eb9 100644 --- a/mod/pages/views/default/forms/pages/edit.php +++ b/mod/pages/views/default/forms/pages/edit.php @@ -6,7 +6,18 @@ */ $variables = elgg_get_config('pages'); +$user = elgg_get_logged_in_user_entity(); +$entity = elgg_extract('entity', $vars); +$can_change_access = true; +if ($user && $entity) { + $can_change_access = ($user->isAdmin() || $user->getGUID() == $entity->owner_guid); +} + foreach ($variables as $name => $type) { + // don't show read / write access inputs for non-owners or admin when editing + if (($type == 'access' || $type == 'write_access') && !$can_change_access) { + continue; + } ?>
@@ -14,8 +25,8 @@ foreach ($variables as $name => $type) { if ($type != 'longtext') { echo '
'; } - ?> - $name, 'value' => $vars[$name], )); -- cgit v1.2.3 From b95ed85ddb4a07014f989c13375e0a9e54fa9826 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Tue, 1 May 2012 18:29:31 -0700 Subject: Admin users can create sub pages. --- mod/pages/pages/pages/view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/pages/pages/pages/view.php b/mod/pages/pages/pages/view.php index 5dfb76b55..81477a8d4 100644 --- a/mod/pages/pages/pages/view.php +++ b/mod/pages/pages/pages/view.php @@ -32,7 +32,7 @@ elgg_push_breadcrumb($title); $content = elgg_view_entity($page, array('full_view' => true)); $content .= elgg_view_comments($page); -if (elgg_get_logged_in_user_guid() == $page->getOwnerGuid()) { +if (elgg_is_admin_logged_in() || elgg_get_logged_in_user_guid() == $page->getOwnerGuid()) { $url = "pages/add/$page->guid"; elgg_register_menu_item('title', array( 'name' => 'subpage', -- cgit v1.2.3 From a198fe67109af23a398f8a152d693074dc041396 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Tue, 1 May 2012 18:35:40 -0700 Subject: Refs #2139. Checking in pages delete action for owner / admin --- mod/pages/actions/pages/delete.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/pages/actions/pages/delete.php b/mod/pages/actions/pages/delete.php index dfa0de98d..7a314a280 100644 --- a/mod/pages/actions/pages/delete.php +++ b/mod/pages/actions/pages/delete.php @@ -9,8 +9,9 @@ $guid = get_input('guid'); $page = get_entity($guid); -if ($page) { - if ($page->canEdit()) { +if (elgg_instanceof($page, 'object', 'page') || elgg_instanceof($page, 'object', 'page_top')) { + // only allow owners and admin to delete + if (elgg_is_admin_logged_in() || elgg_get_logged_in_user_guid() == $page->getOwnerGuid()) { $container = get_entity($page->container_guid); // Bring all child elements forward -- cgit v1.2.3 From 0c725e2ceeb9abf2e8b625961548928fa9bca9b2 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Thu, 10 May 2012 10:08:34 -0700 Subject: Fixes #4507. Corrected typo for twitter interstitial page. --- CHANGES.txt | 11 +++++++++++ mod/twitter_api/lib/twitter_api.php | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/CHANGES.txt b/CHANGES.txt index 11060aa2d..460c3b538 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,14 @@ +Version 1.8.5 +(May 15, 2012 from https://github.com/Elgg/Elgg/tree/1.8) + + Contributing Developers: + * Brett Profitt + + Bugfixes: + * Twitter API: New users are forwarded to the correct page after creating + an account with Twitter. + + Version 1.8.4 (April 24, 2012 from https://github.com/Elgg/Elgg/tree/1.8) diff --git a/mod/twitter_api/lib/twitter_api.php b/mod/twitter_api/lib/twitter_api.php index 355123992..fbce00d34 100644 --- a/mod/twitter_api/lib/twitter_api.php +++ b/mod/twitter_api/lib/twitter_api.php @@ -109,7 +109,7 @@ function twitter_api_login() { $user = twitter_api_create_user($twitter); $site_name = elgg_get_site_entity()->name; system_message(elgg_echo('twitter_api:login:email', array($site_name))); - $forward = "twitter_api/intersitial"; + $forward = "twitter_api/interstitial"; } // set twitter services tokens -- cgit v1.2.3 From 7d884d557626ba3b4da24d81a200d4e2d910e0b3 Mon Sep 17 00:00:00 2001 From: Sem Date: Fri, 27 Apr 2012 17:07:49 +0200 Subject: Fixes #2936. PDFs are downloaded "inline" (in the same navigator). --- mod/file/pages/file/download.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/file/pages/file/download.php b/mod/file/pages/file/download.php index 00e6d500e..76c1f1272 100644 --- a/mod/file/pages/file/download.php +++ b/mod/file/pages/file/download.php @@ -26,7 +26,7 @@ $filename = $file->originalfilename; header("Pragma: public"); header("Content-type: $mime"); -if (strpos($mime, "image/") !== false) { +if (strpos($mime, "image/") !== false || $mime == "application/pdf") { header("Content-Disposition: inline; filename=\"$filename\""); } else { header("Content-Disposition: attachment; filename=\"$filename\""); -- cgit v1.2.3 From 50afa2747ff2e63be0a5b933b477ec09b7ab23e4 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 17 May 2012 08:35:30 -0700 Subject: Fixes #4448: Embed plugin now requires file plugin. --- mod/embed/manifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/embed/manifest.xml b/mod/embed/manifest.xml index 46ab2df9e..81ca9194e 100644 --- a/mod/embed/manifest.xml +++ b/mod/embed/manifest.xml @@ -13,10 +13,10 @@ elgg_release 1.8 - + plugin file 1.8.1 - + true -- cgit v1.2.3