diff options
28 files changed, 88 insertions, 53 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index acfb7055e..8b8838e71 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,26 @@ +Version 1.8.13 +(January 29, 2013 from https://github.com/Elgg/Elgg/tree/1.8) + Contributing Developers: + * Cash Costello + * Juho Jaakkola + * Kevin Jardine + * Krzysztof Różalski + * Steve Clay + + Security Fixes: + + Bugfixes: + * CLI usages with walled garden fixed + * Upgrading from < 1.8 to 1.8 fixed + * Default widgets fixed + * Quotes in object titles no longer result in "qout" in URLs + * List of my groups is ordered now + * Language string river:comment:object:default is defined now + + Enhancements: + * Added confirm dialog for resetting profile fields (adds language string profile:resetdefault:confirm) + + Version 1.8.12 (January 4th, 2013 from https://github.com/Elgg/Elgg/tree/1.8) Contributing Developers: @@ -7,7 +30,6 @@ Version 1.8.12 * Matt Beckett * Paweł Sroka * Sem - * Srokap * Steve Clay Bugfixes: @@ -34,6 +56,7 @@ Version 1.8.12 * Twitter: Login with twitter supports persistent login and correctly forwards after login. + Version 1.8.11 (December 5th, 2012 from https://github.com/Elgg/Elgg/tree/1.8) diff --git a/README.txt b/README.txt index 5d9261ee4..dd604fd2b 100644 --- a/README.txt +++ b/README.txt @@ -1,5 +1,5 @@ Elgg -Copyright (c) 2008-2012 See COPYRIGHT.txt +Copyright (c) 2008-2013 See COPYRIGHT.txt See CONTRIBUTORS.txt for development credits. @@ -21,4 +21,4 @@ in the root of the package you downloaded. For installation instructions, see INSTALL.txt. -For upgrade instructions, see UPGRADE.txt.
\ No newline at end of file +For upgrade instructions, see UPGRADE.txt. diff --git a/_graphics/walled_garden/one_column_bottom.png b/_graphics/walled_garden/one_column_bottom.png Binary files differindex 1dfd7f8ad..bd2296896 100644 --- a/_graphics/walled_garden/one_column_bottom.png +++ b/_graphics/walled_garden/one_column_bottom.png diff --git a/_graphics/walled_garden/one_column_top.png b/_graphics/walled_garden/one_column_top.png Binary files differindex 429a88b75..dc8de438a 100644 --- a/_graphics/walled_garden/one_column_top.png +++ b/_graphics/walled_garden/one_column_top.png diff --git a/_graphics/walled_garden/two_column_bottom.png b/_graphics/walled_garden/two_column_bottom.png Binary files differindex 8aeceeeee..21e076991 100644 --- a/_graphics/walled_garden/two_column_bottom.png +++ b/_graphics/walled_garden/two_column_bottom.png diff --git a/_graphics/walled_garden/two_column_top.png b/_graphics/walled_garden/two_column_top.png Binary files differindex c28b3f630..cd71a4262 100644 --- a/_graphics/walled_garden/two_column_top.png +++ b/_graphics/walled_garden/two_column_top.png diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php index 32b5f952a..8f71b79a8 100644 --- a/engine/classes/ElggPlugin.php +++ b/engine/classes/ElggPlugin.php @@ -303,10 +303,7 @@ class ElggPlugin extends ElggObject { $return = array(); foreach ($private_settings as $setting) { - $name = substr($setting->name, $ps_prefix_len); - $value = $setting->value; - - $return[$name] = $value; + $return[$setting->name] = $setting->value; } return $return; diff --git a/engine/classes/ElggSite.php b/engine/classes/ElggSite.php index f7f5b68ea..1fe49b85c 100644 --- a/engine/classes/ElggSite.php +++ b/engine/classes/ElggSite.php @@ -362,6 +362,11 @@ class ElggSite extends ElggEntity { public function checkWalledGarden() { global $CONFIG; + // command line calls should not invoke the walled garden check + if (PHP_SAPI === 'cli') { + return; + } + if ($CONFIG->walled_garden) { if ($CONFIG->default_access == ACCESS_PUBLIC) { $CONFIG->default_access = ACCESS_LOGGED_IN; diff --git a/engine/lib/output.php b/engine/lib/output.php index bff0bf6e9..9295f2173 100644 --- a/engine/lib/output.php +++ b/engine/lib/output.php @@ -287,6 +287,8 @@ function elgg_get_friendly_title($title) { // handle some special cases $title = str_replace('&', 'and', $title); + // quotes and angle brackets stored in the database as html encoded + $title = htmlspecialchars_decode($title); $title = ElggTranslit::urlize($title); diff --git a/engine/lib/private_settings.php b/engine/lib/private_settings.php index 1fa9bdb66..7541f7b3b 100644 --- a/engine/lib/private_settings.php +++ b/engine/lib/private_settings.php @@ -349,11 +349,6 @@ function set_private_setting($entity_guid, $name, $value) { $name = sanitise_string($name); $value = sanitise_string($value); - $entity = get_entity($entity_guid); - if (!$entity instanceof ElggEntity) { - return false; - } - $result = insert_data("INSERT into {$CONFIG->dbprefix}private_settings (entity_guid, name, value) VALUES ($entity_guid, '$name', '$value') diff --git a/engine/lib/upgrades/2011010101.php b/engine/lib/upgrades/2011010101.php index a1ee92622..f4411ee20 100644 --- a/engine/lib/upgrades/2011010101.php +++ b/engine/lib/upgrades/2011010101.php @@ -93,4 +93,6 @@ $processed_upgrades[] = '2011010101.php'; $processed_upgrades = array_unique($processed_upgrades); elgg_set_processed_upgrades($processed_upgrades); +_elgg_upgrade_unlock(); + forward('upgrade.php'); diff --git a/js/lib/languages.js b/js/lib/languages.js index a8ba72c31..99a1ba0ee 100644 --- a/js/lib/languages.js +++ b/js/lib/languages.js @@ -4,6 +4,9 @@ */ elgg.provide('elgg.config.translations'); +// default language - required by unit tests +elgg.config.language = 'en'; + /** * Analagous to the php version. Merges translations for a * given language into the current translations map. diff --git a/languages/en.php b/languages/en.php index f3acc50ee..353896047 100644 --- a/languages/en.php +++ b/languages/en.php @@ -405,7 +405,8 @@ $english = array( 'profile:editdefault:delete:fail' => 'Removed default profile item field failed', 'profile:editdefault:delete:success' => 'Profile field deleted', 'profile:defaultprofile:reset' => 'Profile fields reset to the system default', - 'profile:resetdefault' => 'Reset default profile', + 'profile:resetdefault' => 'Reset profile fields to system defaults', + 'profile:resetdefault:confirm' => 'Are you sure you want to delete your custom profile fields?', 'profile:explainchangefields' => "You can replace the existing profile fields with your own using the form below. \n\n Give the new profile field a label, for example, 'Favorite team', then select the field type (eg. text, url, tags), and click the 'Add' button. To re-order the fields drag on the handle next to the field label. To edit a field label - click on the label's text to make it editable. \n\n At any time you can revert back to the default profile set up, but you will lose any information already entered into custom fields on profile pages.", 'profile:editdefault:success' => 'New profile field added', 'profile:editdefault:fail' => 'Default profile could not be saved', @@ -663,6 +664,7 @@ $english = array( 'admin:notices:could_not_delete' => 'Could not delete notice.', + 'item:object:admin_notice' => 'Admin notice', 'admin:options' => 'Admin options', @@ -688,7 +690,7 @@ $english = array( 'admin:plugins:label:author' => "Author", 'admin:plugins:label:copyright' => "Copyright", 'admin:plugins:label:categories' => 'Categories', - 'admin:plugins:label:licence' => "Licence", + 'admin:plugins:label:licence' => "License", 'admin:plugins:label:website' => "URL", 'admin:plugins:label:repository' => "Code", 'admin:plugins:label:bugtracker' => "Report issue", @@ -1139,7 +1141,7 @@ If you requested this, click on the link below. Otherwise ignore this email. 'comments:count' => "%s comments", - 'riveraction:annotation:generic_comment' => '%s commented on %s', + 'river:comment:object:default' => '%s commented on %s', 'generic_comments:add' => "Leave a comment", 'generic_comments:post' => "Post comment", @@ -1153,6 +1155,7 @@ If you requested this, click on the link below. Otherwise ignore this email. 'generic_comment:failure' => "An unexpected error occurred when adding your comment.", 'generic_comment:none' => 'No comments', 'generic_comment:title' => 'Comment by %s', + 'generic_comment:on' => '%s on %s', 'generic_comment:email:subject' => 'You have a new comment!', 'generic_comment:email:body' => "You have a new comment on your item \"%s\" from %s. It reads: diff --git a/mod/blog/start.php b/mod/blog/start.php index 8cbaf5cca..eb6eee05f 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -124,9 +124,12 @@ function blog_page_handler($page) { $params = blog_get_page_content_archive($user->guid, $page[2], $page[3]); break; case 'view': - case 'read': // Elgg 1.7 compatibility $params = blog_get_page_content_read($page[1]); break; + case 'read': // Elgg 1.7 compatibility + register_error(elgg_echo("changebookmark")); + forward("blog/view/{$page[1]}"); + break; case 'add': gatekeeper(); $params = blog_get_page_content_edit($page_type, $page[1]); diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php index 66e22b565..3846f5165 100644 --- a/mod/bookmarks/start.php +++ b/mod/bookmarks/start.php @@ -125,11 +125,14 @@ function bookmarks_page_handler($page) { include "$pages/friends.php"; break; - case "read": case "view": set_input('guid', $page[1]); include "$pages/view.php"; break; + case 'read': // Elgg 1.7 compatibility + register_error(elgg_echo("changebookmark")); + forward("bookmarks/view/{$page[1]}"); + break; case "add": gatekeeper(); diff --git a/mod/file/start.php b/mod/file/start.php index 172042332..7ea050ce3 100644 --- a/mod/file/start.php +++ b/mod/file/start.php @@ -121,8 +121,11 @@ function file_page_handler($page) { file_register_toggle(); include "$file_dir/friends.php"; break; - case 'view': case 'read': // Elgg 1.7 compatibility + register_error(elgg_echo("changebookmark")); + forward("file/view/{$page[1]}"); + break; + case 'view': set_input('guid', $page[1]); include "$file_dir/view.php"; break; diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php index b3f530183..64f19c483 100644 --- a/mod/file/views/default/object/file.php +++ b/mod/file/views/default/object/file.php @@ -68,6 +68,7 @@ if ($full && !elgg_in_context('gallery')) { $params = array( 'entity' => $file, + 'title' => false, 'metadata' => $metadata, 'subtitle' => $subtitle, ); @@ -79,7 +80,6 @@ if ($full && !elgg_in_context('gallery')) { echo elgg_view('object/elements/full', array( 'entity' => $file, - 'title' => false, 'icon' => $file_icon, 'summary' => $summary, 'body' => $body, diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index ea7308d39..d8d0f568d 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -152,7 +152,7 @@ function groups_handle_mine_page() { elgg_register_title_button(); - $content = elgg_list_entities_from_relationship_count(array( + $content = elgg_list_entities_from_relationship(array( 'type' => 'group', 'relationship' => 'member', 'relationship_guid' => elgg_get_page_owner_guid(), diff --git a/mod/groups/views/default/groups/css.php b/mod/groups/views/default/groups/css.php index f475f7d9e..6f710ddab 100644 --- a/mod/groups/views/default/groups/css.php +++ b/mod/groups/views/default/groups/css.php @@ -10,8 +10,8 @@ margin-right: 10px; } .groups-profile img { - width: 100%; - height: auto; + width: 100%; + height: auto; } .groups-stats { background: #eeeeee; diff --git a/mod/groups/views/default/groups/profile/summary.php b/mod/groups/views/default/groups/profile/summary.php index 6eca9745e..f1221f19a 100644 --- a/mod/groups/views/default/groups/profile/summary.php +++ b/mod/groups/views/default/groups/profile/summary.php @@ -16,7 +16,9 @@ $group = $vars['entity']; $owner = $group->getOwnerEntity(); if (!$owner) { - return true; + // not having an owner is very bad so we throw an exception + $msg = elgg_echo('InvalidParameterException:IdNotExistForGUID', array('group owner', $group->guid)); + throw new InvalidParameterException($msg); } ?> diff --git a/mod/notifications/actions/groupsave.php b/mod/notifications/actions/groupsave.php index 7838f7e63..2dd2a6db3 100644 --- a/mod/notifications/actions/groupsave.php +++ b/mod/notifications/actions/groupsave.php @@ -30,14 +30,11 @@ if ($groupmemberships = elgg_get_entities_from_relationship($options)) { } } -// Load important global vars -global $NOTIFICATION_HANDLERS; -foreach($NOTIFICATION_HANDLERS as $method => $foo) { - $subscriptions[$method] = get_input($method.'subscriptions'); - $personal[$method] = get_input($method.'personal'); - $collections[$method] = get_input($method.'collections'); - if (!empty($groups)) { - foreach($groups as $group) { +if (!empty($groups)) { + global $NOTIFICATION_HANDLERS; + foreach ($NOTIFICATION_HANDLERS as $method => $foo) { + $subscriptions[$method] = get_input($method.'subscriptions', array()); + foreach ($groups as $group) { if (in_array($group, $subscriptions[$method])) { add_entity_relationship($user->guid, 'notify'.$method, $group); } else { diff --git a/views/default/admin/appearance/profile_fields.php b/views/default/admin/appearance/profile_fields.php index 91d14b874..f1d78c19f 100644 --- a/views/default/admin/appearance/profile_fields.php +++ b/views/default/admin/appearance/profile_fields.php @@ -5,12 +5,20 @@ $add = elgg_view_form('profile/fields/add', array('class' => 'elgg-form-settings'), array()); $list = elgg_view('admin/appearance/profile_fields/list'); -$reset = elgg_view_form('profile/fields/reset', array(), array()); + +$reset = elgg_view('output/confirmlink', array( + 'text' => elgg_echo('reset'), + 'href' => 'action/profile/fields/reset', + 'title' => elgg_echo('profile:resetdefault'), + 'confirm' => elgg_echo('profile:resetdefault:confirm'), + 'class' => 'elgg-button elgg-button-cancel', + 'is_trusted' => 'true', +)); $body = <<<__HTML $add $list -$reset +<div class="mtl">$reset</div> __HTML; echo $body; diff --git a/views/default/annotation/generic_comment.php b/views/default/annotation/generic_comment.php index 9891510e0..22a8d9211 100644 --- a/views/default/annotation/generic_comment.php +++ b/views/default/annotation/generic_comment.php @@ -55,13 +55,13 @@ HTML; //@todo need link to actual comment! - $on = elgg_echo('on'); + $commented_on = elgg_echo('generic_comment:on', array($commenter_link, $entity_link)); $excerpt = elgg_get_excerpt($comment->value, 80); $body = <<<HTML <span class="elgg-subtext"> - $commenter_link $on $entity_link ($friendlytime): $excerpt + $commented_on ($friendlytime): $excerpt </span> HTML; diff --git a/views/default/css/elements/layout.php b/views/default/css/elements/layout.php index 25a2bffb7..9d92752b4 100644 --- a/views/default/css/elements/layout.php +++ b/views/default/css/elements/layout.php @@ -118,4 +118,4 @@ } .elgg-page-footer a:hover { color: #666; -}
\ No newline at end of file +} diff --git a/views/default/css/elements/modules.php b/views/default/css/elements/modules.php index 74092c774..a37ae094b 100644 --- a/views/default/css/elements/modules.php +++ b/views/default/css/elements/modules.php @@ -191,4 +191,4 @@ a.elgg-widget-collapsed:before { .elgg-widget-placeholder { border: 2px dashed #dedede; margin-bottom: 15px; -}
\ No newline at end of file +} diff --git a/views/default/css/elements/typography.php b/views/default/css/elements/typography.php index 4c2c3c774..c044cb1cc 100644 --- a/views/default/css/elements/typography.php +++ b/views/default/css/elements/typography.php @@ -157,6 +157,6 @@ h6 { font-size: 0.8em; } padding: 3px 5px; } .elgg-output img { - max-width: 100%; - height: auto; -}
\ No newline at end of file + max-width: 100%; + height: auto; +} diff --git a/views/default/forms/profile/fields/reset.php b/views/default/forms/profile/fields/reset.php deleted file mode 100644 index c0bb1b7f4..000000000 --- a/views/default/forms/profile/fields/reset.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -/** - * Reset profile fields form - */ - -echo '<div class="elgg-foot">'; -$params = array( - 'value' => elgg_echo('profile:resetdefault'), - 'class' => 'elgg-button-cancel', -); -echo elgg_view('input/submit', $params); -echo '</div>'; diff --git a/views/default/js/elgg.php b/views/default/js/elgg.php index b82d98ce4..6fe03484d 100644 --- a/views/default/js/elgg.php +++ b/views/default/js/elgg.php @@ -56,7 +56,8 @@ if (0) { ?><script><?php } elgg.version = '<?php echo get_version(); ?>'; elgg.release = '<?php echo get_version(true); ?>'; elgg.config.wwwroot = '<?php echo elgg_get_site_url(); ?>'; -elgg.security.interval = 5 * 60 * 1000; <?php //@todo make this configurable ?> +<?php //@todo make this configurable ?> +elgg.security.interval = 5 * 60 * 1000; elgg.config.domReady = false; elgg.config.language = '<?php echo isset($CONFIG->language) ? $CONFIG->language : 'en'; ?>'; elgg.config.languageReady = false; |