aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt74
-rw-r--r--README.txt4
-rw-r--r--_graphics/walled_garden/one_column_bottom.pngbin522 -> 1336 bytes
-rw-r--r--_graphics/walled_garden/one_column_top.pngbin517 -> 1345 bytes
-rw-r--r--_graphics/walled_garden/two_column_bottom.pngbin532 -> 1353 bytes
-rw-r--r--_graphics/walled_garden/two_column_top.pngbin547 -> 1366 bytes
-rw-r--r--engine/classes/ElggDiskFilestore.php10
-rw-r--r--engine/classes/ElggPlugin.php5
-rw-r--r--engine/classes/ElggSite.php11
-rw-r--r--engine/lib/admin.php2
-rw-r--r--engine/lib/configuration.php18
-rw-r--r--engine/lib/output.php2
-rw-r--r--engine/lib/private_settings.php5
-rw-r--r--engine/lib/upgrades/2011010101.php2
-rw-r--r--engine/lib/web_services.php8
-rw-r--r--htaccess_dist26
-rw-r--r--js/lib/languages.js3
-rw-r--r--languages/en.php9
-rw-r--r--mod/blog/start.php5
-rw-r--r--mod/bookmarks/start.php5
-rw-r--r--mod/developers/languages/en.php1
-rw-r--r--mod/developers/start.php1
-rw-r--r--mod/developers/views/default/developers/css.php4
-rw-r--r--mod/developers/views/default/forms/developers/settings.php6
-rw-r--r--mod/developers/views/default/page/theme_preview.php10
-rw-r--r--mod/developers/views/default/theme_preview/components.php2
-rw-r--r--mod/developers/views/default/theme_preview/general.php23
-rw-r--r--mod/developers/views/default/theme_preview/miscellaneous.php22
-rw-r--r--mod/developers/views/default/theme_preview/miscellaneous/lightbox.php19
-rw-r--r--mod/developers/views/default/theme_preview/miscellaneous/popup.php15
-rw-r--r--mod/developers/views/default/theme_preview/miscellaneous/site_menu.php15
-rw-r--r--mod/developers/views/default/theme_preview/miscellaneous/system_messages.php35
-rw-r--r--mod/developers/views/default/theme_preview/miscellaneous/toggle.php15
-rw-r--r--mod/developers/views/default/theme_preview/miscellaneous/user_hover_menu.php16
-rw-r--r--mod/developers/views/default/theme_preview/modules.php2
-rw-r--r--mod/file/start.php5
-rw-r--r--mod/file/views/default/object/file.php2
-rw-r--r--mod/groups/lib/groups.php2
-rw-r--r--mod/groups/views/default/groups/css.php7
-rw-r--r--mod/groups/views/default/groups/profile/summary.php6
-rw-r--r--mod/notifications/actions/groupsave.php13
-rw-r--r--mod/search/search_hooks.php59
-rw-r--r--mod/search/start.php2
-rw-r--r--mod/tinymce/views/default/js/tinymce.php2
-rw-r--r--mod/twitter/languages/en.php9
-rw-r--r--mod/twitter/views/default/widgets/twitter/content.php39
-rw-r--r--mod/twitter/views/default/widgets/twitter/edit.php32
-rw-r--r--version.php4
-rw-r--r--views/default/admin/appearance/profile_fields.php12
-rw-r--r--views/default/annotation/generic_comment.php4
-rw-r--r--views/default/core/settings/statistics/online.php9
-rw-r--r--views/default/css/elements/layout.php2
-rw-r--r--views/default/css/elements/modules.php2
-rw-r--r--views/default/css/elements/typography.php3
-rw-r--r--views/default/forms/profile/fields/reset.php12
-rw-r--r--views/default/js/elgg.php3
-rw-r--r--views/default/js/lightbox.php3
57 files changed, 460 insertions, 147 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index ca1bdc675..fd9d0eef6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,77 @@
+Version 1.8.14
+(X xx, 2013 from https://github.com/Elgg/Elgg/tree/1.8)
+ Contributing Developers:
+ * Luciano Lima
+ * Paweł Sroka
+
+ Bugfixes:
+ *
+
+ Enhancements:
+ * Web services fall back to xml if the viewtype is invalid
+
+
+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:
+ * Added validation of Twitter usernames in Twitter widget
+
+ 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
+ * Added language string for comments: generic_comment:on
+
+ 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:
+ * Brett Profitt
+ * Cash Costello
+ * Jerome Bakker
+ * Matt Beckett
+ * Paweł Sroka
+ * Sem
+ * Steve Clay
+
+ Bugfixes:
+ * Added an AJAX workaround for the rewrite test.
+ * Code cleanup to prevent some notices and warnings.
+ * Removed "original_order" in menu item anchor tags.
+ * Site menu's selected item correctly persists through content pages.
+ * Static caches rewritten and improved to prevent stale data being returned.
+ * Installation: Invalid characters in admin username are handled correctly.
+ * Messages: Fixed inbox link in email notifications.
+ * The Wire: Fixed objects not displaying correctly when upgrading from 1.7.
+
+ Enhancements:
+ * Performance improvements and improved caching in entity loading.
+ * Added upgrade locking to prevent concurrent upgrade attempts.
+ * Replaced xml_to_object() and autop() with GPL / MIT-compatible code.
+ * Error messages (register_error()) only fade after being clicked.
+ * Groups: Added a sidebar entry to display membership status and a link to
+ group notification settings.
+ * Groups: Added pending membership and invitation requests to the sidebar.
+ * Groups: Better redirection for invisible and closed groups.
+ * Search: User profile fields are searched.
+ * Pages: Subpages can be reassigned to new parent pages.
+ * 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
index 1dfd7f8ad..bd2296896 100644
--- a/_graphics/walled_garden/one_column_bottom.png
+++ b/_graphics/walled_garden/one_column_bottom.png
Binary files differ
diff --git a/_graphics/walled_garden/one_column_top.png b/_graphics/walled_garden/one_column_top.png
index 429a88b75..dc8de438a 100644
--- a/_graphics/walled_garden/one_column_top.png
+++ b/_graphics/walled_garden/one_column_top.png
Binary files differ
diff --git a/_graphics/walled_garden/two_column_bottom.png b/_graphics/walled_garden/two_column_bottom.png
index 8aeceeeee..21e076991 100644
--- a/_graphics/walled_garden/two_column_bottom.png
+++ b/_graphics/walled_garden/two_column_bottom.png
Binary files differ
diff --git a/_graphics/walled_garden/two_column_top.png b/_graphics/walled_garden/two_column_top.png
index c28b3f630..cd71a4262 100644
--- a/_graphics/walled_garden/two_column_top.png
+++ b/_graphics/walled_garden/two_column_top.png
Binary files differ
diff --git a/engine/classes/ElggDiskFilestore.php b/engine/classes/ElggDiskFilestore.php
index f00376481..7aace43ba 100644
--- a/engine/classes/ElggDiskFilestore.php
+++ b/engine/classes/ElggDiskFilestore.php
@@ -200,18 +200,18 @@ class ElggDiskFilestore extends ElggFilestore {
* @return string The full path of where the file is stored
*/
public function getFilenameOnFilestore(ElggFile $file) {
- $owner = $file->getOwnerEntity();
- if (!$owner) {
- $owner = elgg_get_logged_in_user_entity();
+ $owner_guid = $file->getOwnerGuid();
+ if (!$owner_guid) {
+ $owner_guid = elgg_get_logged_in_user_guid();
}
- if (!$owner) {
+ if (!$owner_guid) {
$msg = elgg_echo('InvalidParameterException:MissingOwner',
array($file->getFilename(), $file->guid));
throw new InvalidParameterException($msg);
}
- return $this->dir_root . $this->makefileMatrix($owner->guid) . $file->getFilename();
+ return $this->dir_root . $this->makefileMatrix($owner_guid) . $file->getFilename();
}
/**
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..1a34df195 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;
@@ -376,7 +381,9 @@ class ElggSite extends ElggEntity {
elgg_register_plugin_hook_handler('index', 'system', 'elgg_walled_garden_index', 1);
if (!$this->isPublicPage()) {
- $_SESSION['last_forward_from'] = current_page_url();
+ if (!elgg_is_xhr()) {
+ $_SESSION['last_forward_from'] = current_page_url();
+ }
register_error(elgg_echo('loggedinrequired'));
forward();
}
@@ -438,8 +445,6 @@ class ElggSite extends ElggEntity {
// include a hook for plugin authors to include public pages
$plugins = elgg_trigger_plugin_hook('public_pages', 'walled_garden', NULL, array());
- // lookup admin-specific public pages
-
// allow public pages
foreach (array_merge($defaults, $plugins) as $public) {
$pattern = "`^{$CONFIG->url}$public/*$`i";
diff --git a/engine/lib/admin.php b/engine/lib/admin.php
index cb9524f11..35ab5599d 100644
--- a/engine/lib/admin.php
+++ b/engine/lib/admin.php
@@ -423,7 +423,7 @@ function admin_pagesetup() {
elgg_register_menu_item('admin_footer', array(
'name' => 'community_forums',
'text' => elgg_echo('admin:footer:community_forums'),
- 'href' => 'http://community.elgg.org/pg/groups/world/',
+ 'href' => 'http://community.elgg.org/groups/all/',
));
elgg_register_menu_item('admin_footer', array(
diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php
index b10e51130..385021581 100644
--- a/engine/lib/configuration.php
+++ b/engine/lib/configuration.php
@@ -138,7 +138,7 @@ function elgg_set_config($name, $value) {
/**
* Save a configuration setting
*
- * @param string $name Configuration name (cannot be greater than 32 characters)
+ * @param string $name Configuration name (cannot be greater than 255 characters)
* @param mixed $value Configuration value. Should be string for installation setting
* @param int $site_guid NULL for installation setting, 0 for default site
*
@@ -227,9 +227,9 @@ function datalist_get($name) {
$name = trim($name);
- // cannot store anything longer than 32 characters in db, so catch here
- if (elgg_strlen($name) > 32) {
- elgg_log("The name length for configuration variables cannot be greater than 32", "ERROR");
+ // cannot store anything longer than 255 characters in db, so catch here
+ if (elgg_strlen($name) > 255) {
+ elgg_log("The name length for configuration variables cannot be greater than 255", "ERROR");
return false;
}
@@ -286,7 +286,7 @@ function datalist_get($name) {
function datalist_set($name, $value) {
global $CONFIG, $DATALIST_CACHE;
- // cannot store anything longer than 32 characters in db, so catch before we set
+ // cannot store anything longer than 255 characters in db, so catch before we set
if (elgg_strlen($name) > 255) {
elgg_log("The name length for configuration variables cannot be greater than 255", "ERROR");
return false;
@@ -332,7 +332,7 @@ function datalist_set($name, $value) {
* This will cause the run once function to be run on all installations. To perform
* additional upgrades, create new functions for each release.
*
- * @warning The function name cannot be longer than 32 characters long due to
+ * @warning The function name cannot be longer than 255 characters long due to
* the current schema for the datalist table.
*
* @internal A datalist entry $functioname is created with the value of time().
@@ -419,9 +419,9 @@ function set_config($name, $value, $site_guid = 0) {
$name = trim($name);
- // cannot store anything longer than 32 characters in db, so catch before we set
- if (elgg_strlen($name) > 32) {
- elgg_log("The name length for configuration variables cannot be greater than 32", "ERROR");
+ // cannot store anything longer than 255 characters in db, so catch before we set
+ if (elgg_strlen($name) > 255) {
+ elgg_log("The name length for configuration variables cannot be greater than 255", "ERROR");
return false;
}
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('&amp;', '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/engine/lib/web_services.php b/engine/lib/web_services.php
index c8e4a13cc..b6289184a 100644
--- a/engine/lib/web_services.php
+++ b/engine/lib/web_services.php
@@ -178,7 +178,7 @@ function authenticate_method($method) {
// check if user authentication is required
if ($API_METHODS[$method]["require_user_auth"] == true) {
if ($user_auth_result == false) {
- throw new APIException($user_pam->getFailureMessage());
+ throw new APIException($user_pam->getFailureMessage(), ErrorResult::$RESULT_FAIL_AUTHTOKEN);
}
}
@@ -1268,10 +1268,10 @@ function service_handler($handler, $request) {
// after the handler, the first identifier is response format
// ex) http://example.org/services/api/rest/xml/?method=test
- $reponse_format = array_shift($request);
+ $response_format = array_shift($request);
// Which view - xml, json, ...
- if ($reponse_format) {
- elgg_set_viewtype($reponse_format);
+ if ($response_format && elgg_is_valid_view_type($response_format)) {
+ elgg_set_viewtype($response_format);
} else {
// default to xml
elgg_set_viewtype("xml");
diff --git a/htaccess_dist b/htaccess_dist
index bf163c69e..4c888e70a 100644
--- a/htaccess_dist
+++ b/htaccess_dist
@@ -101,35 +101,35 @@ RewriteEngine on
#RewriteBase /
# In for backwards compatibility
-RewriteRule ^pg\/([A-Za-z0-9\_\-]+)$ engine/handlers/page_handler.php?handler=$1&%{QUERY_STRING}
-RewriteRule ^pg\/([A-Za-z0-9\_\-]+)\/(.*)$ engine/handlers/page_handler.php?handler=$1&page=$2&%{QUERY_STRING}
-RewriteRule ^tag\/(.+)\/?$ engine/handlers/page_handler.php?handler=search&page=$1
+RewriteRule ^pg\/([A-Za-z0-9\_\-]+)$ engine/handlers/page_handler.php?handler=$1&%{QUERY_STRING} [L]
+RewriteRule ^pg\/([A-Za-z0-9\_\-]+)\/(.*)$ engine/handlers/page_handler.php?handler=$1&page=$2&%{QUERY_STRING} [L]
+RewriteRule ^tag\/(.+)\/?$ engine/handlers/page_handler.php?handler=search&page=$1 [L]
-RewriteRule ^action\/([A-Za-z0-9\_\-\/]+)$ engine/handlers/action_handler.php?action=$1&%{QUERY_STRING}
+RewriteRule ^action\/([A-Za-z0-9\_\-\/]+)$ engine/handlers/action_handler.php?action=$1&%{QUERY_STRING} [L]
-RewriteRule ^cache\/(.*)$ engine/handlers/cache_handler.php?request=$1&%{QUERY_STRING}
+RewriteRule ^cache\/(.*)$ engine/handlers/cache_handler.php?request=$1&%{QUERY_STRING} [L]
-RewriteRule ^services\/api\/([A-Za-z0-9\_\-]+)\/(.*)$ engine/handlers/service_handler.php?handler=$1&request=$2&%{QUERY_STRING}
+RewriteRule ^services\/api\/([A-Za-z0-9\_\-]+)\/(.*)$ engine/handlers/service_handler.php?handler=$1&request=$2&%{QUERY_STRING} [L]
-RewriteRule ^export\/([A-Za-z]+)\/([0-9]+)\/?$ engine/handlers/export_handler.php?view=$1&guid=$2
-RewriteRule ^export\/([A-Za-z]+)\/([0-9]+)\/([A-Za-z]+)\/([A-Za-z0-9\_]+)\/$ engine/handlers/export_handler.php?view=$1&guid=$2&type=$3&idname=$4
+RewriteRule ^export\/([A-Za-z]+)\/([0-9]+)\/?$ engine/handlers/export_handler.php?view=$1&guid=$2 [L]
+RewriteRule ^export\/([A-Za-z]+)\/([0-9]+)\/([A-Za-z]+)\/([A-Za-z0-9\_]+)\/$ engine/handlers/export_handler.php?view=$1&guid=$2&type=$3&idname=$4 [L]
-RewriteRule xml-rpc.php engine/handlers/xml-rpc_handler.php
-RewriteRule mt/mt-xmlrpc.cgi engine/handlers/xml-rpc_handler.php
+RewriteRule xml-rpc.php engine/handlers/xml-rpc_handler.php [L]
+RewriteRule mt/mt-xmlrpc.cgi engine/handlers/xml-rpc_handler.php [L]
# rule for rewrite module test during install - can be removed after installation
-RewriteRule ^rewrite.php$ install.php
+RewriteRule ^rewrite.php$ install.php [L]
# Everything else that isn't a file gets routed through the page handler
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule ^([A-Za-z0-9\_\-]+)$ engine/handlers/page_handler.php?handler=$1 [QSA]
+RewriteRule ^([A-Za-z0-9\_\-]+)$ engine/handlers/page_handler.php?handler=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule ^([A-Za-z0-9\_\-]+)\/(.*)$ engine/handlers/page_handler.php?handler=$1&page=$2 [QSA]
+RewriteRule ^([A-Za-z0-9\_\-]+)\/(.*)$ engine/handlers/page_handler.php?handler=$1&page=$2 [QSA,L]
</IfModule>
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/developers/languages/en.php b/mod/developers/languages/en.php
index 262759e23..856efe008 100644
--- a/mod/developers/languages/en.php
+++ b/mod/developers/languages/en.php
@@ -54,6 +54,7 @@ $english = array(
'theme_preview:modules' => 'Modules',
'theme_preview:navigation' => 'Navigation',
'theme_preview:typography' => 'Typography',
+ 'theme_preview:miscellaneous' => 'Miscellaneous',
// unit tests
'developers:unit_tests:description' => 'Elgg has unit and integration tests for detecting bugs in its core classes and functions.',
diff --git a/mod/developers/start.php b/mod/developers/start.php
index d77a96b36..413a8ed9b 100644
--- a/mod/developers/start.php
+++ b/mod/developers/start.php
@@ -176,6 +176,7 @@ function developers_theme_preview_controller($page) {
'modules',
'navigation',
'typography',
+ 'miscellaneous'
);
foreach ($pages as $page_name) {
diff --git a/mod/developers/views/default/developers/css.php b/mod/developers/views/default/developers/css.php
index 4690945a9..b4f59fdec 100644
--- a/mod/developers/views/default/developers/css.php
+++ b/mod/developers/views/default/developers/css.php
@@ -21,3 +21,7 @@
color: #666;
padding: 20px;
}
+
+.developers-content-thin {
+ max-width: 600px;
+} \ No newline at end of file
diff --git a/mod/developers/views/default/forms/developers/settings.php b/mod/developers/views/default/forms/developers/settings.php
index 584f6af30..78e1372de 100644
--- a/mod/developers/views/default/forms/developers/settings.php
+++ b/mod/developers/views/default/forms/developers/settings.php
@@ -10,20 +10,22 @@ echo '<p>' . elgg_echo('elgg_dev_tools:settings:explanation') . '</p>';
foreach ($vars['data'] as $name => $info) {
echo '<div>';
if ($info['type'] == 'checkbox') {
+ echo '<label>';
echo elgg_view("input/checkbox", array(
'name' => $name,
'value' => $info['value'],
'checked' => $info['checked'],
));
- echo '<label>' . elgg_echo("developers:label:$name") . '</label>';
+ echo elgg_echo("developers:label:$name") . '</label>';
echo '<span class="elgg-text-help">' . elgg_echo("developers:help:$name") . '</span>';
} else {
- echo '<label>' . elgg_echo("developers:label:$name") . '</label>';
+ echo '<label>' . elgg_echo("developers:label:$name");
echo elgg_view("input/{$info['type']}", array(
'name' => $name,
'value' => $info['value'],
'options_values' => $info['options_values'],
));
+ echo '</label>';
echo '<span class="elgg-text-help">' . elgg_echo("developers:help:$name") . '</span>';
}
echo '</div>';
diff --git a/mod/developers/views/default/page/theme_preview.php b/mod/developers/views/default/page/theme_preview.php
index 584387ec1..ee2bc0c0f 100644
--- a/mod/developers/views/default/page/theme_preview.php
+++ b/mod/developers/views/default/page/theme_preview.php
@@ -18,9 +18,19 @@ header("Content-type: text/html; charset=UTF-8");
</head>
<body>
<div class="elgg-page elgg-page-default">
+ <div class="elgg-page-messages">
+ <ul class="elgg-system-messages">
+ <li class="hidden"></li>
+ </ul>
+ </div>
<div class="elgg-page-header">
<div class="elgg-inner">
<h1 class="elgg-heading-site">Theme Sandbox</h1>
+ <?php
+ if (get_input("site_menu", false)) {
+ echo elgg_view_menu('site');
+ }
+ ?>
</div>
</div>
<div class="elgg-page-body">
diff --git a/mod/developers/views/default/theme_preview/components.php b/mod/developers/views/default/theme_preview/components.php
index 2f414cd88..50c155b14 100644
--- a/mod/developers/views/default/theme_preview/components.php
+++ b/mod/developers/views/default/theme_preview/components.php
@@ -22,4 +22,4 @@ $body = elgg_view('theme_preview/components/tags');
echo elgg_view_module('info', 'Tags (.elgg-tag)', $body);
$body = elgg_view('theme_preview/components/messages');
-echo elgg_view_module('info', 'Messages (.elgg-message)', $body);
+echo elgg_view_module('info', 'Messages (.elgg-message)', $body); \ No newline at end of file
diff --git a/mod/developers/views/default/theme_preview/general.php b/mod/developers/views/default/theme_preview/general.php
index 629462873..7d98d4443 100644
--- a/mod/developers/views/default/theme_preview/general.php
+++ b/mod/developers/views/default/theme_preview/general.php
@@ -11,6 +11,29 @@
The preview is divided into sections that are listed in the page menu
(usually in the sidebar but depends on your current theme).
</p>
+<?php
+$simple_cache = elgg_get_config('simplecache_enabled');
+$system_cache = elgg_get_config('system_cache_enabled');
+
+if ($simple_cache || $system_cache) {
+ $advanced = elgg_view('output/url', array(
+ 'text' => 'Advanced Settings',
+ 'href' => 'admin/settings/advanced',
+ 'is_trusted' => true
+ ));
+ $developers = elgg_view('output/url', array(
+ 'text' => 'Developers\' Plugin Settings',
+ 'href' => 'admin/developers/settings',
+ 'is_trusted' => true
+ ));
+
+ $body = "Caches are enabled. Changes you make to CSS and views might not appear. It is
+ always recommended to disable caches while developing themes and plugins. To
+ disable caches, visit the $advanced or $developers pages.";
+
+ echo elgg_view_module('info', 'Warning', $body);
+}
+?>
<p>
<?php
echo elgg_view('output/url', array(
diff --git a/mod/developers/views/default/theme_preview/miscellaneous.php b/mod/developers/views/default/theme_preview/miscellaneous.php
new file mode 100644
index 000000000..2f4ee4acd
--- /dev/null
+++ b/mod/developers/views/default/theme_preview/miscellaneous.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Miscellaneous and complex components
+ */
+
+$body = elgg_view('theme_preview/miscellaneous/lightbox');
+echo elgg_view_module('info', 'Lightbox (.elgg-lightbox)', $body);
+
+$body = elgg_view('theme_preview/miscellaneous/popup');
+echo elgg_view_module('info', 'Popup (rel=popup)', $body);
+
+$body = elgg_view('theme_preview/miscellaneous/toggle');
+echo elgg_view_module('info', 'Toggle (rel=toggle)', $body);
+
+$body = elgg_view('theme_preview/miscellaneous/system_messages');
+echo elgg_view_module('info', 'System Messages and Errors', $body);
+
+$body = elgg_view('theme_preview/miscellaneous/site_menu');
+echo elgg_view_module('info', 'Site Menu', $body);
+
+$body = elgg_view('theme_preview/miscellaneous/user_hover_menu');
+echo elgg_view_module('info', 'User Icon with Hover Menu', $body); \ No newline at end of file
diff --git a/mod/developers/views/default/theme_preview/miscellaneous/lightbox.php b/mod/developers/views/default/theme_preview/miscellaneous/lightbox.php
new file mode 100644
index 000000000..b673c4ee0
--- /dev/null
+++ b/mod/developers/views/default/theme_preview/miscellaneous/lightbox.php
@@ -0,0 +1,19 @@
+<?php
+
+elgg_load_js('lightbox');
+elgg_load_css('lightbox');
+
+$ipsum = elgg_view('developers/ipsum');
+
+$link = elgg_view('output/url', array(
+ 'text' => 'Open lighbox',
+ 'href' => "#elgg-lightbox-test",
+ 'class' => 'elgg-lightbox'
+));
+
+echo $link;
+echo '<div class="hidden">';
+echo elgg_view_module('aside', 'Lightbox Test', $ipsum, array(
+ 'id' => 'elgg-lightbox-test'
+));
+echo '</div>'; \ No newline at end of file
diff --git a/mod/developers/views/default/theme_preview/miscellaneous/popup.php b/mod/developers/views/default/theme_preview/miscellaneous/popup.php
new file mode 100644
index 000000000..b711bb7cc
--- /dev/null
+++ b/mod/developers/views/default/theme_preview/miscellaneous/popup.php
@@ -0,0 +1,15 @@
+<?php
+
+$ipsum = elgg_view('developers/ipsum');
+
+$link = elgg_view('output/url', array(
+ 'text' => 'Popup content',
+ 'href' => "#elgg-popup-test",
+ 'rel' => 'popup'
+));
+
+echo $link;
+echo elgg_view_module('popup', 'Popup Test', $ipsum, array(
+ 'id' => 'elgg-popup-test',
+ 'class' => 'hidden clearfix developers-content-thin',
+)); \ No newline at end of file
diff --git a/mod/developers/views/default/theme_preview/miscellaneous/site_menu.php b/mod/developers/views/default/theme_preview/miscellaneous/site_menu.php
new file mode 100644
index 000000000..e2384b9f7
--- /dev/null
+++ b/mod/developers/views/default/theme_preview/miscellaneous/site_menu.php
@@ -0,0 +1,15 @@
+<?php
+
+if (!get_input('site_menu')) {
+ echo elgg_view('output/url', array(
+ 'text' => 'Show Site Menu',
+ 'href' => elgg_http_add_url_query_elements(current_page_url(), array('site_menu' => 1)),
+ 'is_trusted' => true
+ ));
+} else {
+ echo elgg_view('output/url', array(
+ 'text' => 'Hide Site Menu',
+ 'href' => elgg_http_remove_url_query_element(current_page_url(), 'site_menu'),
+ 'is_trusted' => true
+ ));
+} \ No newline at end of file
diff --git a/mod/developers/views/default/theme_preview/miscellaneous/system_messages.php b/mod/developers/views/default/theme_preview/miscellaneous/system_messages.php
new file mode 100644
index 000000000..a6663a3dc
--- /dev/null
+++ b/mod/developers/views/default/theme_preview/miscellaneous/system_messages.php
@@ -0,0 +1,35 @@
+<?php
+
+// can't use the ipsum because it includes html when wrapping views.
+$message = elgg_view('output/url', array(
+ 'text' => 'Show system message (system_message())',
+ 'is_trusted' => true,
+ 'href' => '#',
+ 'id' => 'developers-system-message',
+// 'onclick' => "elgg.system_message('Elgg System Message');"
+));
+
+$error = elgg_view('output/url', array(
+ 'text' => 'Show error message (register_error())',
+ 'is_trusted' => true,
+ 'href' => '#',
+ 'id' => 'developers-error-message',
+));
+
+?>
+<script type="text/javascript">
+ $(function() {
+ $('#developers-system-message').click(function() {
+ elgg.system_message('Elgg System Message');
+ })
+
+ $('#developers-error-message').click(function() {
+ elgg.register_error('Elgg Error Message');
+ })
+ });
+</script>
+
+<ul>
+ <li><?php echo $message; ?></li>
+ <li><?php echo $error; ?></li>
+</ul> \ No newline at end of file
diff --git a/mod/developers/views/default/theme_preview/miscellaneous/toggle.php b/mod/developers/views/default/theme_preview/miscellaneous/toggle.php
new file mode 100644
index 000000000..abe39ddd8
--- /dev/null
+++ b/mod/developers/views/default/theme_preview/miscellaneous/toggle.php
@@ -0,0 +1,15 @@
+<?php
+
+$ipsum = elgg_view('developers/ipsum');
+
+$link = elgg_view('output/url', array(
+ 'text' => 'Toggle content',
+ 'href' => "#elgg-toggle-test",
+ 'rel' => 'toggle'
+));
+
+echo $link;
+echo elgg_view_module('featured', 'Toggle Test', $ipsum, array(
+ 'id' => 'elgg-toggle-test',
+ 'class' => 'hidden clearfix developers-content-thin',
+)); \ No newline at end of file
diff --git a/mod/developers/views/default/theme_preview/miscellaneous/user_hover_menu.php b/mod/developers/views/default/theme_preview/miscellaneous/user_hover_menu.php
new file mode 100644
index 000000000..45331b6e0
--- /dev/null
+++ b/mod/developers/views/default/theme_preview/miscellaneous/user_hover_menu.php
@@ -0,0 +1,16 @@
+<?php
+
+$me = elgg_get_logged_in_user_entity();
+echo elgg_view_entity_icon($me);
+
+// show another user if available
+$users = elgg_get_entities(array(
+ 'type' => 'user',
+ 'wheres' => array("guid != {$me->getGUID()}"),
+ 'limit' => 1
+));
+
+if (is_array($users) && count($users) > 0) {
+ echo elgg_view_entity_icon($users[0]);
+}
+
diff --git a/mod/developers/views/default/theme_preview/modules.php b/mod/developers/views/default/theme_preview/modules.php
index 3e0acb3a5..c46c94296 100644
--- a/mod/developers/views/default/theme_preview/modules.php
+++ b/mod/developers/views/default/theme_preview/modules.php
@@ -2,5 +2,5 @@
echo elgg_view_module('info', 'Modules (.elgg-module)', elgg_view('theme_preview/modules/modules'));
-echo elgg_view_module('info', 'Widgets (.elgg-widget)', elgg_view('theme_preview/modules/widgets'));
+echo elgg_view_module('info', 'Widgets (.elgg-module-widget)', elgg_view('theme_preview/modules/widgets'));
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 20cd947f8..6f710ddab 100644
--- a/mod/groups/views/default/groups/css.php
+++ b/mod/groups/views/default/groups/css.php
@@ -9,7 +9,10 @@
.groups-profile > .elgg-image {
margin-right: 10px;
}
-
+.groups-profile img {
+ width: 100%;
+ height: auto;
+}
.groups-stats {
background: #eeeeee;
padding: 5px;
@@ -74,4 +77,4 @@
.elgg-menu-groups-my-status li.elgg-state-selected > a {
background-color: #4690D6;
color: white;
-} \ No newline at end of file
+}
diff --git a/mod/groups/views/default/groups/profile/summary.php b/mod/groups/views/default/groups/profile/summary.php
index 54abcb1e5..f1221f19a 100644
--- a/mod/groups/views/default/groups/profile/summary.php
+++ b/mod/groups/views/default/groups/profile/summary.php
@@ -15,6 +15,12 @@ if (!isset($vars['entity']) || !$vars['entity']) {
$group = $vars['entity'];
$owner = $group->getOwnerEntity();
+if (!$owner) {
+ // 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);
+}
+
?>
<div class="groups-profile clearfix elgg-image-block">
<div class="elgg-image">
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/mod/search/search_hooks.php b/mod/search/search_hooks.php
index 245234e0e..47351fb8a 100644
--- a/mod/search/search_hooks.php
+++ b/mod/search/search_hooks.php
@@ -124,24 +124,35 @@ function search_users_hook($hook, $type, $value, $params) {
$query = sanitise_string($params['query']);
- $join = "JOIN {$db_prefix}users_entity ue ON e.guid = ue.guid";
- $params['joins'] = array($join);
-
-// $where = "(ue.guid = e.guid
-// AND (ue.username LIKE '%$query%'
-// OR ue.name LIKE '%$query%'
-// )
-// )";
-
+ $params['joins'] = array(
+ "JOIN {$db_prefix}users_entity ue ON e.guid = ue.guid",
+ "JOIN {$db_prefix}metadata md on e.guid = md.entity_guid",
+ "JOIN {$db_prefix}metastrings msv ON n_table.value_id = msv.id"
+ );
+
+ // username and display name
$fields = array('username', 'name');
$where = search_get_where_sql('ue', $fields, $params, FALSE);
+
+ // profile fields
+ $profile_fields = array_keys(elgg_get_config('profile_fields'));
- $params['wheres'] = array($where);
+ // get the where clauses for the md names
+ // can't use egef_metadata() because the n_table join comes too late.
+ $clauses = elgg_entities_get_metastrings_options('metadata', array(
+ 'metadata_names' => $profile_fields,
+ ));
+
+ $params['joins'] = array_merge($clauses['joins'], $params['joins']);
+ // no fulltext index, can't disable fulltext search in this function.
+ // $md_where .= " AND " . search_get_where_sql('msv', array('string'), $params, FALSE);
+ $md_where = "(({$clauses['wheres'][0]}) AND msv.string LIKE '%$query%')";
+
+ $params['wheres'] = array("(($where) OR ($md_where))");
// override subtype -- All users should be returned regardless of subtype.
$params['subtype'] = ELGG_ENTITIES_ANY_VALUE;
-
- $params['count'] = TRUE;
+ $params['count'] = true;
$count = elgg_get_entities($params);
// no need to continue if nothing here.
@@ -155,11 +166,27 @@ function search_users_hook($hook, $type, $value, $params) {
// add the volatile data for why these entities have been returned.
foreach ($entities as $entity) {
- $username = search_get_highlighted_relevant_substrings($entity->username, $query);
- $entity->setVolatileData('search_matched_title', $username);
+
+ $title = search_get_highlighted_relevant_substrings($entity->name, $query);
- $name = search_get_highlighted_relevant_substrings($entity->name, $query);
- $entity->setVolatileData('search_matched_description', $name);
+ // include the username if it matches but the display name doesn't.
+ if (false !== strpos($entity->username, $query)) {
+ $username = search_get_highlighted_relevant_substrings($entity->username, $query);
+ $title .= " ($username)";
+ }
+
+ $entity->setVolatileData('search_matched_title', $title);
+
+ $matched = '';
+ foreach ($profile_fields as $md) {
+ $text = $entity->$md;
+ if (stristr($text, $query)) {
+ $matched .= elgg_echo("profile:{$md}") . ': '
+ . search_get_highlighted_relevant_substrings($text, $query);
+ }
+ }
+
+ $entity->setVolatileData('search_matched_description', $matched);
}
return array(
diff --git a/mod/search/start.php b/mod/search/start.php
index f493508d8..8a112a3a3 100644
--- a/mod/search/start.php
+++ b/mod/search/start.php
@@ -77,7 +77,7 @@ function search_page_handler($page) {
/**
* Return a string with highlighted matched queries and relevant context
- * Determins context based upon occurance and distance of words with each other.
+ * Determines context based upon occurance and distance of words with each other.
*
* @param string $haystack
* @param string $query
diff --git a/mod/tinymce/views/default/js/tinymce.php b/mod/tinymce/views/default/js/tinymce.php
index 51e99c223..b4db43cee 100644
--- a/mod/tinymce/views/default/js/tinymce.php
+++ b/mod/tinymce/views/default/js/tinymce.php
@@ -39,7 +39,7 @@ elgg.tinymce.init = function() {
editor_selector : "elgg-input-longtext",
theme : "advanced",
language : "<?php echo tinymce_get_site_language(); ?>",
- plugins : "lists,spellchecker,autosave,fullscreen,paste",
+ plugins : "lists,spellchecker,autosave,fullscreen,paste,inlinepopups",
relative_urls : false,
remove_script_host : false,
document_base_url : elgg.config.wwwroot,
diff --git a/mod/twitter/languages/en.php b/mod/twitter/languages/en.php
index 29700744a..11e745ba1 100644
--- a/mod/twitter/languages/en.php
+++ b/mod/twitter/languages/en.php
@@ -4,13 +4,14 @@
*/
$english = array(
-
'twitter:title' => 'Twitter',
'twitter:info' => 'Display your latest tweets',
- 'twitter:username' => 'Enter your twitter username.',
- 'twitter:num' => 'The number of tweets to show.',
+ 'twitter:username' => 'Your twitter username',
+ 'twitter:num' => 'Number of tweets to show*',
'twitter:visit' => 'visit my twitter',
- 'twitter:notset' => 'This Twitter widget is not yet set to go. To display your latest tweets, click on - edit - and fill in your details',
+ 'twitter:notset' => 'This widget needs to be configured. To display your latest tweets, click the customize icon and fill in your Twitter username.',
+ 'twitter:invalid' => 'This widget is configured with an invalid Twitter username. Click the customize icon to correct it.',
+ 'twitter:apibug' => "*Due to a bug in the Twitter 1.0 API, you may see fewer tweets than you ask for.",
);
add_translation("en", $english);
diff --git a/mod/twitter/views/default/widgets/twitter/content.php b/mod/twitter/views/default/widgets/twitter/content.php
index c616d944c..caefd369a 100644
--- a/mod/twitter/views/default/widgets/twitter/content.php
+++ b/mod/twitter/views/default/widgets/twitter/content.php
@@ -6,26 +6,37 @@
* @package ElggTwitter
*/
-//some required params
-
$username = $vars['entity']->twitter_username;
+
+if (empty($username)) {
+ echo "<p>" . elgg_echo("twitter:notset") . "</p>";
+ return;
+}
+
+$username_is_valid = preg_match('~^[a-zA-Z0-9_]{1,20}$~', $username);
+if (!$username_is_valid) {
+ echo "<p>" . elgg_echo("twitter:invalid") . "</p>";
+ return;
+}
+
+
$num = $vars['entity']->twitter_num;
+if (empty($num)) {
+ $num = 5;
+}
-// if the twitter username is empty, then do not show
-if ($username) {
+// @todo upgrade to 1.1 API https://dev.twitter.com/docs/api/1.1/get/statuses/home_timeline
+$script_url = "https://api.twitter.com/1/statuses/user_timeline/" . urlencode($username) . ".json"
+ . "?callback=twitterCallback2&count=" . (int) $num;
?>
-
<div id="twitter_widget">
<ul id="twitter_update_list"></ul>
- <p class="visit_twitter"><a href="http://twitter.com/<?php echo $username; ?>"><?php echo elgg_echo("twitter:visit"); ?></a></p>
+ <p class="visit_twitter"><?php echo elgg_view('output/url', array(
+ 'text' => elgg_echo("twitter:visit"),
+ 'href' => 'http://twitter.com/' . urlencode($username),
+ 'is_trusted' => true,
+ )) ?></p>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
- <script type="text/javascript" src="https://api.twitter.com/1/statuses/user_timeline/<?php echo $username; ?>.json?callback=twitterCallback2&count=<?php echo $num; ?>"></script>
+ <script type="text/javascript" src="<?php echo htmlspecialchars($script_url, ENT_QUOTES, 'UTF-8') ?>"></script>
</div>
-
-<?php
-} else {
-
- echo "<p>" . elgg_echo("twitter:notset") . ".</p>";
-
-}
diff --git a/mod/twitter/views/default/widgets/twitter/edit.php b/mod/twitter/views/default/widgets/twitter/edit.php
index 5da3a7e55..c3fc6f0d5 100644
--- a/mod/twitter/views/default/widgets/twitter/edit.php
+++ b/mod/twitter/views/default/widgets/twitter/edit.php
@@ -1,16 +1,24 @@
<?php
- /**
- * Elgg twitter edit page
- *
- * @package ElggTwitter
- */
+/**
+ * Elgg twitter edit page
+ *
+ * @package ElggTwitter
+ */
?>
- <p>
- <?php echo elgg_echo("twitter:username"); ?>
- <input type="text" name="params[twitter_username]" value="<?php echo htmlentities($vars['entity']->twitter_username); ?>" />
- <br /><?php echo elgg_echo("twitter:num"); ?>
- <input type="text" name="params[twitter_num]" value="<?php echo htmlentities($vars['entity']->twitter_num); ?>" />
-
- </p> \ No newline at end of file
+<div>
+ <?php echo elgg_echo("twitter:username"); ?>
+ <?php echo elgg_view('input/text', array(
+ 'name' => 'params[twitter_username]',
+ 'value' => $vars['entity']->twitter_username,
+ )) ?>
+</div>
+<div>
+ <?php echo elgg_echo("twitter:num"); ?>
+ <?php echo elgg_view('input/text', array(
+ 'name' => 'params[twitter_num]',
+ 'value' => $vars['entity']->twitter_num,
+ )) ?>
+ <span class="elgg-text-help"><?php echo elgg_echo("twitter:apibug"); ?></span>
+</div> \ No newline at end of file
diff --git a/version.php b/version.php
index 77d151bb6..07a08ab4a 100644
--- a/version.php
+++ b/version.php
@@ -11,7 +11,7 @@
// YYYYMMDD = Elgg Date
// XX = Interim incrementer
-$version = 2012120500;
+$version = 2013012900;
// Human-friendly version name
-$release = '1.8.11';
+$release = '1.8.13';
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/core/settings/statistics/online.php b/views/default/core/settings/statistics/online.php
index f50ad9acc..1385ff60f 100644
--- a/views/default/core/settings/statistics/online.php
+++ b/views/default/core/settings/statistics/online.php
@@ -8,20 +8,13 @@
$user = elgg_get_page_owner_entity();
-$logged_in = 0;
-$log = get_system_log($user->guid, "login", "", 'user', '', 1);
-
-if ($log) {
- $logged_in = $log[0]->time_created;
-}
-
$label_name = elgg_echo('usersettings:statistics:label:name');
$label_email = elgg_echo('usersettings:statistics:label:email');
$label_member_since = elgg_echo('usersettings:statistics:label:membersince');
$label_last_login = elgg_echo('usersettings:statistics:label:lastlogin');
$time_created = date("r", $user->time_created);
-$last_login = date("r", $logged_in);
+$last_login = date("r", $user->last_login);
$title = elgg_echo('usersettings:statistics:yourdetails');
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 d93b28d2c..c044cb1cc 100644
--- a/views/default/css/elements/typography.php
+++ b/views/default/css/elements/typography.php
@@ -158,4 +158,5 @@ h6 { font-size: 0.8em; }
}
.elgg-output img {
max-width: 100%;
-} \ No newline at end of file
+ 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;
diff --git a/views/default/js/lightbox.php b/views/default/js/lightbox.php
index d2bceaf90..a1f018eea 100644
--- a/views/default/js/lightbox.php
+++ b/views/default/js/lightbox.php
@@ -3,7 +3,8 @@
* Elgg lightbox
*
* Usage
- * Apply the class elgg-lightbox to links.
+ * Call elgg_load_js('lightbox') and elgg_load_css('lightbox') then
+ * apply the class elgg-lightbox to links.
*
* Advanced Usage
* Elgg is distributed with the Fancybox jQuery library. Please go to