Skip to content

Commit 19dc507

Browse files
committed
Merged 1.8.13 release into master
Conflicts: README.md mod/twitter/languages/en.php version.php
2 parents 41fbc06 + 8d3a7ab commit 19dc507

File tree

31 files changed

+139
-81
lines changed

31 files changed

+139
-81
lines changed

Diff for: CHANGES.txt

+26-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
Version 1.8.13
2+
(January 29, 2013 from https://github.com/Elgg/Elgg/tree/1.8)
3+
Contributing Developers:
4+
* Cash Costello
5+
* Juho Jaakkola
6+
* Kevin Jardine
7+
* Krzysztof Różalski
8+
* Steve Clay
9+
10+
Security Fixes:
11+
* Added validation of Twitter usernames in Twitter widget
12+
13+
Bugfixes:
14+
* CLI usages with walled garden fixed
15+
* Upgrading from < 1.8 to 1.8 fixed
16+
* Default widgets fixed
17+
* Quotes in object titles no longer result in "qout" in URLs
18+
* List of my groups is ordered now
19+
* Language string river:comment:object:default is defined now
20+
* Added language string for comments: generic_comment:on
21+
22+
Enhancements:
23+
* Added confirm dialog for resetting profile fields (adds language string profile:resetdefault:confirm)
24+
25+
126
Version 1.8.12
227
(January 4th, 2013 from https://github.com/Elgg/Elgg/tree/1.8)
328
Contributing Developers:
@@ -7,7 +32,6 @@ Version 1.8.12
732
* Matt Beckett
833
* Paweł Sroka
934
* Sem
10-
* Srokap
1135
* Steve Clay
1236

1337
Bugfixes:
@@ -34,6 +58,7 @@ Version 1.8.12
3458
* Twitter: Login with twitter supports persistent login and correctly forwards
3559
after login.
3660

61+
3762
Version 1.8.11
3863
(December 5th, 2012 from https://github.com/Elgg/Elgg/tree/1.8)
3964

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Elgg [![Build Status](https://secure.travis-ci.org/Elgg/Elgg.png?branch=master)](https://travis-ci.org/Elgg/Elgg)
22
====
33

4-
Copyright (c) 2008-2012, see COPYRIGHT.txt
4+
Copyright (c) 2008-2013, see COPYRIGHT.txt
55

66
For development credits, see CONTRIBUTORS.txt.
77

Diff for: _graphics/walled_garden/one_column_bottom.png

814 Bytes
Loading

Diff for: _graphics/walled_garden/one_column_top.png

828 Bytes
Loading

Diff for: _graphics/walled_garden/two_column_bottom.png

821 Bytes
Loading

Diff for: _graphics/walled_garden/two_column_top.png

819 Bytes
Loading

Diff for: engine/classes/ElggPlugin.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,7 @@ public function getAllSettings() {
303303
$return = array();
304304

305305
foreach ($private_settings as $setting) {
306-
$name = substr($setting->name, $ps_prefix_len);
307-
$value = $setting->value;
308-
309-
$return[$name] = $value;
306+
$return[$setting->name] = $setting->value;
310307
}
311308

312309
return $return;

Diff for: engine/classes/ElggSite.php

+5
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,11 @@ public function getExportableValues() {
405405
public function checkWalledGarden() {
406406
global $CONFIG;
407407

408+
// command line calls should not invoke the walled garden check
409+
if (PHP_SAPI === 'cli') {
410+
return;
411+
}
412+
408413
if ($CONFIG->walled_garden) {
409414
if ($CONFIG->default_access == ACCESS_PUBLIC) {
410415
$CONFIG->default_access = ACCESS_LOGGED_IN;

Diff for: engine/lib/output.php

+2
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ function elgg_get_friendly_title($title) {
287287

288288
// handle some special cases
289289
$title = str_replace('&amp;', 'and', $title);
290+
// quotes and angle brackets stored in the database as html encoded
291+
$title = htmlspecialchars_decode($title);
290292

291293
$title = ElggTranslit::urlize($title);
292294

Diff for: engine/lib/private_settings.php

-5
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,6 @@ function set_private_setting($entity_guid, $name, $value) {
349349
$name = sanitise_string($name);
350350
$value = sanitise_string($value);
351351

352-
$entity = get_entity($entity_guid);
353-
if (!$entity instanceof ElggEntity) {
354-
return false;
355-
}
356-
357352
$result = insert_data("INSERT into {$CONFIG->dbprefix}private_settings
358353
(entity_guid, name, value) VALUES
359354
($entity_guid, '$name', '$value')

Diff for: engine/lib/upgrades/2011010101.php

+2
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,6 @@
9393
$processed_upgrades = array_unique($processed_upgrades);
9494
elgg_set_processed_upgrades($processed_upgrades);
9595

96+
_elgg_upgrade_unlock();
97+
9698
forward('upgrade.php');

Diff for: js/lib/languages.js

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
*/
55
elgg.provide('elgg.config.translations');
66

7+
// default language - required by unit tests
8+
elgg.config.language = 'en';
9+
710
/**
811
* Analagous to the php version. Merges translations for a
912
* given language into the current translations map.

Diff for: languages/en.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,8 @@
407407
'profile:editdefault:delete:fail' => 'Removed default profile item field failed',
408408
'profile:editdefault:delete:success' => 'Profile field deleted',
409409
'profile:defaultprofile:reset' => 'Profile fields reset to the system default',
410-
'profile:resetdefault' => 'Reset default profile',
410+
'profile:resetdefault' => 'Reset profile fields to system defaults',
411+
'profile:resetdefault:confirm' => 'Are you sure you want to delete your custom profile fields?',
411412
'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.",
412413
'profile:editdefault:success' => 'New profile field added',
413414
'profile:editdefault:fail' => 'Default profile could not be saved',
@@ -665,6 +666,7 @@
665666

666667

667668
'admin:notices:could_not_delete' => 'Could not delete notice.',
669+
'item:object:admin_notice' => 'Admin notice',
668670

669671
'admin:options' => 'Admin options',
670672

@@ -690,7 +692,7 @@
690692
'admin:plugins:label:author' => "Author",
691693
'admin:plugins:label:copyright' => "Copyright",
692694
'admin:plugins:label:categories' => 'Categories',
693-
'admin:plugins:label:licence' => "Licence",
695+
'admin:plugins:label:licence' => "License",
694696
'admin:plugins:label:website' => "URL",
695697
'admin:plugins:label:repository' => "Code",
696698
'admin:plugins:label:bugtracker' => "Report issue",
@@ -1156,7 +1158,7 @@
11561158

11571159
'comments:count' => "%s comments",
11581160

1159-
'riveraction:annotation:generic_comment' => '%s commented on %s',
1161+
'river:comment:object:default' => '%s commented on %s',
11601162

11611163
'generic_comments:add' => "Leave a comment",
11621164
'generic_comments:post' => "Post comment",
@@ -1170,6 +1172,7 @@
11701172
'generic_comment:failure' => "An unexpected error occurred when adding your comment.",
11711173
'generic_comment:none' => 'No comments',
11721174
'generic_comment:title' => 'Comment by %s',
1175+
'generic_comment:on' => '%s on %s',
11731176

11741177
'generic_comment:email:subject' => 'You have a new comment!',
11751178
'generic_comment:email:body' => "You have a new comment on your item \"%s\" from %s. It reads:

Diff for: mod/blog/start.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,12 @@ function blog_page_handler($page) {
124124
$params = blog_get_page_content_archive($user->guid, $page[2], $page[3]);
125125
break;
126126
case 'view':
127-
case 'read': // Elgg 1.7 compatibility
128127
$params = blog_get_page_content_read($page[1]);
129128
break;
129+
case 'read': // Elgg 1.7 compatibility
130+
register_error(elgg_echo("changebookmark"));
131+
forward("blog/view/{$page[1]}");
132+
break;
130133
case 'add':
131134
gatekeeper();
132135
$params = blog_get_page_content_edit($page_type, $page[1]);

Diff for: mod/bookmarks/start.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,14 @@ function bookmarks_page_handler($page) {
125125
include "$pages/friends.php";
126126
break;
127127

128-
case "read":
129128
case "view":
130129
set_input('guid', $page[1]);
131130
include "$pages/view.php";
132131
break;
132+
case 'read': // Elgg 1.7 compatibility
133+
register_error(elgg_echo("changebookmark"));
134+
forward("bookmarks/view/{$page[1]}");
135+
break;
133136

134137
case "add":
135138
gatekeeper();

Diff for: mod/file/start.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,11 @@ function file_page_handler($page) {
121121
file_register_toggle();
122122
include "$file_dir/friends.php";
123123
break;
124-
case 'view':
125124
case 'read': // Elgg 1.7 compatibility
125+
register_error(elgg_echo("changebookmark"));
126+
forward("file/view/{$page[1]}");
127+
break;
128+
case 'view':
126129
set_input('guid', $page[1]);
127130
include "$file_dir/view.php";
128131
break;

Diff for: mod/file/views/default/object/file.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868

6969
$params = array(
7070
'entity' => $file,
71+
'title' => false,
7172
'metadata' => $metadata,
7273
'subtitle' => $subtitle,
7374
);
@@ -79,7 +80,6 @@
7980

8081
echo elgg_view('object/elements/full', array(
8182
'entity' => $file,
82-
'title' => false,
8383
'icon' => $file_icon,
8484
'summary' => $summary,
8585
'body' => $body,

Diff for: mod/groups/views/default/groups/css.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
margin-right: 10px;
1111
}
1212
.groups-profile img {
13-
width: 100%;
14-
height: auto;
13+
width: 100%;
14+
height: auto;
1515
}
1616
.groups-stats {
1717
background: #eeeeee;

Diff for: mod/groups/views/default/groups/profile/summary.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
$owner = $group->getOwnerEntity();
1717

1818
if (!$owner) {
19-
return true;
19+
// not having an owner is very bad so we throw an exception
20+
$msg = elgg_echo('InvalidParameterException:IdNotExistForGUID', array('group owner', $group->guid));
21+
throw new InvalidParameterException($msg);
2022
}
2123

2224
?>

Diff for: mod/notifications/actions/groupsave.php

+5-8
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,11 @@
3030
}
3131
}
3232

33-
// Load important global vars
34-
global $NOTIFICATION_HANDLERS;
35-
foreach($NOTIFICATION_HANDLERS as $method => $foo) {
36-
$subscriptions[$method] = get_input($method.'subscriptions');
37-
$personal[$method] = get_input($method.'personal');
38-
$collections[$method] = get_input($method.'collections');
39-
if (!empty($groups)) {
40-
foreach($groups as $group) {
33+
if (!empty($groups)) {
34+
global $NOTIFICATION_HANDLERS;
35+
foreach ($NOTIFICATION_HANDLERS as $method => $foo) {
36+
$subscriptions[$method] = get_input($method.'subscriptions', array());
37+
foreach ($groups as $group) {
4138
if (in_array($group, $subscriptions[$method])) {
4239
add_entity_relationship($user->guid, 'notify'.$method, $group);
4340
} else {

Diff for: mod/twitter/languages/en.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77

88
'twitter:title' => 'Twitter',
99
'twitter:info' => 'Display your latest tweets',
10-
'twitter:username' => 'Enter your twitter username.',
11-
'twitter:num' => 'The number of tweets to show.',
10+
'twitter:username' => 'Your twitter username',
11+
'twitter:num' => 'Number of tweets to show*',
1212
'twitter:visit' => 'visit my twitter',
13-
'twitter:notset' => 'This Twitter widget is not yet set to go. To display your latest tweets, click on - edit - and fill in your details',
13+
'twitter:notset' => 'This widget needs to be configured. To display your latest tweets, click the customize icon and fill in your Twitter username.',
14+
'twitter:invalid' => 'This widget is configured with an invalid Twitter username. Click the customize icon to correct it.',
15+
'twitter:apibug' => "*Due to a bug in the Twitter 1.0 API, you may see fewer tweets than you ask for.",
1416
);

Diff for: mod/twitter/views/default/widgets/twitter/content.php

+25-14
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,37 @@
66
* @package ElggTwitter
77
*/
88

9-
//some required params
10-
119
$username = $vars['entity']->twitter_username;
10+
11+
if (empty($username)) {
12+
echo "<p>" . elgg_echo("twitter:notset") . "</p>";
13+
return;
14+
}
15+
16+
$username_is_valid = preg_match('~^[a-zA-Z0-9_]{1,20}$~', $username);
17+
if (!$username_is_valid) {
18+
echo "<p>" . elgg_echo("twitter:invalid") . "</p>";
19+
return;
20+
}
21+
22+
1223
$num = $vars['entity']->twitter_num;
24+
if (empty($num)) {
25+
$num = 5;
26+
}
1327

14-
// if the twitter username is empty, then do not show
15-
if ($username) {
28+
// @todo upgrade to 1.1 API https://dev.twitter.com/docs/api/1.1/get/statuses/home_timeline
29+
$script_url = "https://api.twitter.com/1/statuses/user_timeline/" . urlencode($username) . ".json"
30+
. "?callback=twitterCallback2&count=" . (int) $num;
1631

1732
?>
18-
1933
<div id="twitter_widget">
2034
<ul id="twitter_update_list"></ul>
21-
<p class="visit_twitter"><a href="http://twitter.com/<?php echo $username; ?>"><?php echo elgg_echo("twitter:visit"); ?></a></p>
35+
<p class="visit_twitter"><?php echo elgg_view('output/url', array(
36+
'text' => elgg_echo("twitter:visit"),
37+
'href' => 'http://twitter.com/' . urlencode($username),
38+
'is_trusted' => true,
39+
)) ?></p>
2240
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
23-
<script type="text/javascript" src="https://api.twitter.com/1/statuses/user_timeline/<?php echo $username; ?>.json?callback=twitterCallback2&count=<?php echo $num; ?>"></script>
41+
<script type="text/javascript" src="<?php echo htmlspecialchars($script_url, ENT_QUOTES, 'UTF-8') ?>"></script>
2442
</div>
25-
26-
<?php
27-
} else {
28-
29-
echo "<p>" . elgg_echo("twitter:notset") . ".</p>";
30-
31-
}

Diff for: mod/twitter/views/default/widgets/twitter/edit.php

+20-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
<?php
22

3-
/**
4-
* Elgg twitter edit page
5-
*
6-
* @package ElggTwitter
7-
*/
3+
/**
4+
* Elgg twitter edit page
5+
*
6+
* @package ElggTwitter
7+
*/
88

99
?>
10-
<p>
11-
<?php echo elgg_echo("twitter:username"); ?>
12-
<input type="text" name="params[twitter_username]" value="<?php echo htmlentities($vars['entity']->twitter_username); ?>" />
13-
<br /><?php echo elgg_echo("twitter:num"); ?>
14-
<input type="text" name="params[twitter_num]" value="<?php echo htmlentities($vars['entity']->twitter_num); ?>" />
15-
16-
</p>
10+
<div>
11+
<?php echo elgg_echo("twitter:username"); ?>
12+
<?php echo elgg_view('input/text', array(
13+
'name' => 'params[twitter_username]',
14+
'value' => $vars['entity']->twitter_username,
15+
)) ?>
16+
</div>
17+
<div>
18+
<?php echo elgg_echo("twitter:num"); ?>
19+
<?php echo elgg_view('input/text', array(
20+
'name' => 'params[twitter_num]',
21+
'value' => $vars['entity']->twitter_num,
22+
)) ?>
23+
<span class="elgg-text-help"><?php echo elgg_echo("twitter:apibug"); ?></span>
24+
</div>

Diff for: version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
// YYYYMMDD = Elgg Date
1313
// XX = Interim incrementer
14-
$version = 2011110700;
14+
$version = 2013012600;
1515

1616
// Human-friendly version name
1717
$release = '1.9.0-dev';

Diff for: views/default/admin/appearance/profile_fields.php

+10-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@
55

66
$add = elgg_view_form('profile/fields/add', array('class' => 'elgg-form-settings'), array());
77
$list = elgg_view('admin/appearance/profile_fields/list');
8-
$reset = elgg_view_form('profile/fields/reset', array(), array());
8+
9+
$reset = elgg_view('output/confirmlink', array(
10+
'text' => elgg_echo('reset'),
11+
'href' => 'action/profile/fields/reset',
12+
'title' => elgg_echo('profile:resetdefault'),
13+
'confirm' => elgg_echo('profile:resetdefault:confirm'),
14+
'class' => 'elgg-button elgg-button-cancel',
15+
'is_trusted' => 'true',
16+
));
917

1018
$body = <<<__HTML
1119
$add
1220
$list
13-
$reset
21+
<div class="mtl">$reset</div>
1422
__HTML;
1523

1624
echo $body;

0 commit comments

Comments
 (0)