From 1e3c1afcacac23f4f7d34657dce6ba462b7ed97e Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 29 Sep 2011 19:49:01 -0400 Subject: Fixes #3827 updated documentation on @return for elgg_get_entities* functions --- engine/lib/access.php | 2 +- engine/lib/annotations.php | 10 ++++------ engine/lib/metadata.php | 3 +-- engine/lib/plugins.php | 2 +- engine/lib/private_settings.php | 2 +- engine/lib/relationships.php | 9 +++++++-- 6 files changed, 15 insertions(+), 13 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/access.php b/engine/lib/access.php index 6da747463..20f57ec41 100644 --- a/engine/lib/access.php +++ b/engine/lib/access.php @@ -776,7 +776,7 @@ function elgg_view_access_collections($owner_guid) { * access_id => int The access ID of the entity. * * @see elgg_get_entities() - * @return array + * @return mixed int if count is true, an array of entity objects, or false on failure * @since 1.7.0 */ function elgg_get_entities_from_access_id(array $options = array()) { diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index 80ffbe74e..9ab5a1b39 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -285,14 +285,12 @@ function elgg_list_annotations($options) { */ /** - * Returns entities based upon annotations. Accepts the same values as - * elgg_get_entities_from_metadata() but uses the annotations table. + * Returns entities based upon annotations. Also accepts all options available + * to elgg_get_entities() and elgg_get_entities_from_metadata(). * - * NB: Entity creation time is selected as max_time. To sort based upon + * Entity creation time is selected as max_time. To sort based upon * this, pass 'order_by' => 'maxtime asc' || 'maxtime desc' * - * time_created in this case will be the time the annotation was created. - * * @see elgg_get_entities * @see elgg_get_entities_from_metadata * @@ -321,7 +319,7 @@ function elgg_list_annotations($options) { * * annotation_ids => NULL|ARR Annotation IDs * - * @return array + * @return mixed int if count is true, an array of entity objects, or false on failure * @since 1.7.0 */ function elgg_get_entities_from_annotations(array $options = array()) { diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index a6b1bb43a..2becc5f3c 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -366,7 +366,6 @@ function elgg_enable_metadata(array $options) { * When in doubt, use name_value_pairs. * * @see elgg_get_entities - * @see elgg_get_entities_from_annotations * * @param array $options Array in format: * @@ -398,7 +397,7 @@ function elgg_enable_metadata(array $options) { * * metadata_owner_guids => NULL|ARR guids for metadata owners * - * @return array + * @return mixed int if count is true, an array of entity objects, or false on failure * @since 1.7.0 */ function elgg_get_entities_from_metadata(array $options = array()) { diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index fd85ed9f0..365ef6fdf 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -978,7 +978,7 @@ function elgg_unset_all_plugin_settings($plugin_id = null) { * plugin_user_setting_name_value_pairs_operator => NULL|STR The operator to use for combining * (name = value) OPERATOR (name = value); default AND * - * @return mixed + * @return mixed int if count is true, an array of entity objects, or false on failure */ function elgg_get_entities_from_plugin_user_settings(array $options = array()) { // if they're passing it don't bother diff --git a/engine/lib/private_settings.php b/engine/lib/private_settings.php index e5e7b2213..d7d819e1c 100644 --- a/engine/lib/private_settings.php +++ b/engine/lib/private_settings.php @@ -38,7 +38,7 @@ * their own settings. * * - * @return array + * @return mixed int if count is true, an array of entity objects, or false on failure * @since 1.8.0 */ function elgg_get_entities_from_private_settings(array $options = array()) { diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php index 9d5fd39b6..f1da65a34 100644 --- a/engine/lib/relationships.php +++ b/engine/lib/relationships.php @@ -235,6 +235,11 @@ function get_entity_relationships($guid, $inverse_relationship = FALSE) { /** * Return entities matching a given query joining against a relationship. + * Also accepts all options available to elgg_get_entities() and + * elgg_get_entities_from_metadata(). + * + * @see elgg_get_entities + * @see elgg_get_entities_from_metadata * * @param array $options Array in format: * @@ -244,7 +249,7 @@ function get_entity_relationships($guid, $inverse_relationship = FALSE) { * * inverse_relationship => BOOL Inverse the relationship * - * @return array + * @return mixed int if count is true, an array of entity objects, or false on failure * @since 1.7.0 */ function elgg_get_entities_from_relationship($options) { @@ -365,7 +370,7 @@ function elgg_list_entities_from_relationship(array $options = array()) { * * @param array $options An options array compatible with * elgg_get_entities_from_relationship() - * @return array + * @return mixed int if count is true, an array of entity objects, or false on failure * @since 1.8.0 */ function elgg_get_entities_from_relationship_count(array $options = array()) { -- cgit v1.2.3 From d50ec282fa3da9947968e959affd48825b2a7bbb Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 30 Sep 2011 17:03:51 -0400 Subject: Fixes #3904 action word should come first for encode_text parameter --- engine/lib/navigation.php | 2 +- mod/groups/start.php | 4 ++-- mod/likes/views/default/annotation/likes.php | 2 +- mod/messageboard/start.php | 2 +- mod/messages/views/default/object/messages.php | 2 +- views/default/core/friends/collection.php | 2 +- views/default/output/confirmlink.php | 12 ++++++------ 7 files changed, 13 insertions(+), 13 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php index 27af26be2..778da94e9 100644 --- a/engine/lib/navigation.php +++ b/engine/lib/navigation.php @@ -393,7 +393,7 @@ function elgg_annotation_menu_setup($hook, $type, $return, $params) { 'href' => $url, 'text' => "", 'confirm' => elgg_echo('deleteconfirm'), - 'text_encode' => false + 'encode_text' => false ); $return[] = ElggMenuItem::factory($options); } diff --git a/mod/groups/start.php b/mod/groups/start.php index 9e4694457..0425bdea6 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -435,7 +435,7 @@ function groups_annotation_menu_setup($hook, $type, $return, $params) { 'href' => $url, 'text' => "", 'confirm' => elgg_echo('deleteconfirm'), - 'text_encode' => false + 'encode_text' => false ); $return[] = ElggMenuItem::factory($options); @@ -447,7 +447,7 @@ function groups_annotation_menu_setup($hook, $type, $return, $params) { 'name' => 'edit', 'href' => "#edit-annotation-$annotation->id", 'text' => elgg_echo('edit'), - 'text_encode' => false, + 'encode_text' => false, 'rel' => 'toggle', ); $return[] = ElggMenuItem::factory($options); diff --git a/mod/likes/views/default/annotation/likes.php b/mod/likes/views/default/annotation/likes.php index e1ae20818..2dd01b6cd 100644 --- a/mod/likes/views/default/annotation/likes.php +++ b/mod/likes/views/default/annotation/likes.php @@ -31,7 +31,7 @@ if ($like->canEdit()) { 'href' => "action/likes/delete?annotation_id={$like->id}", 'text' => "", 'confirm' => elgg_echo('deleteconfirm'), - 'text_encode' => false, + 'encode_text' => false, )); } diff --git a/mod/messageboard/start.php b/mod/messageboard/start.php index 8a7f00958..0b0155069 100644 --- a/mod/messageboard/start.php +++ b/mod/messageboard/start.php @@ -150,7 +150,7 @@ function messageboard_annotation_menu_setup($hook, $type, $return, $params) { 'href' => $url, 'text' => "", 'confirm' => elgg_echo('deleteconfirm'), - 'text_encode' => false + 'encode_text' => false ); $return[] = ElggMenuItem::factory($options); } diff --git a/mod/messages/views/default/object/messages.php b/mod/messages/views/default/object/messages.php index b2d127d85..b6f9ed6d5 100644 --- a/mod/messages/views/default/object/messages.php +++ b/mod/messages/views/default/object/messages.php @@ -69,7 +69,7 @@ $delete_link = elgg_view("output/confirmlink", array( 'href' => "action/messages/delete?guid=" . $message->getGUID(), 'text' => "", 'confirm' => elgg_echo('deleteconfirm'), - 'text_encode' => false, + 'encode_text' => false, )); $body = <<owner_guid == elgg_get_logged_in_user_guid()) { 'href' => 'action/friends/collections/delete?collection=' . $coll->id, 'class' => 'delete_collection', 'text' => elgg_view_icon('delete'), - 'text_encode' => false, + 'encode_text' => false, )); echo ""; } diff --git a/views/default/output/confirmlink.php b/views/default/output/confirmlink.php index 31a34ae63..953c15f1b 100644 --- a/views/default/output/confirmlink.php +++ b/views/default/output/confirmlink.php @@ -6,16 +6,16 @@ * @package Elgg * @subpackage Core * - * @uses $vars['text'] The text of the link - * @uses $vars['href'] The address - * @uses $vars['title'] The title text (defaults to confirm text) - * @uses $vars['confirm'] The dialog text - * @uses $vars['text_encode'] Encode special characters? (false) + * @uses $vars['text'] The text of the link + * @uses $vars['href'] The address + * @uses $vars['title'] The title text (defaults to confirm text) + * @uses $vars['confirm'] The dialog text + * @uses $vars['encode_text'] Run $vars['text'] through htmlspecialchars() (false) */ $vars['rel'] = elgg_extract('confirm', $vars, elgg_echo('question:areyousure')); $vars['rel'] = addslashes($vars['rel']); -$encode = elgg_extract('text_encode', $vars, false); +$encode = elgg_extract('encode_text', $vars, false); // always generate missing action tokens $vars['href'] = elgg_add_action_tokens_to_url(elgg_normalize_url($vars['href']), true); -- cgit v1.2.3 From 6b77c7de7a4b1c9d31236ccd7802bf9526cd1f41 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 1 Oct 2011 11:33:06 -0400 Subject: Fixes #3826 using wwwroot in 1.8.x releases --- engine/lib/configuration.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php index b756d2e70..3a2364057 100644 --- a/engine/lib/configuration.php +++ b/engine/lib/configuration.php @@ -464,11 +464,6 @@ function get_config($name, $site_guid = 0) { $dep_version = 1.8; break; - case 'wwwroot': - $new_name = 'www_root'; - $dep_version = 1.8; - break; - case 'sitename': $new_name = 'site_name'; $dep_version = 1.8; @@ -553,7 +548,7 @@ function set_default_config() { 'path' => "$install_root/", 'view_path' => "$install_root/views/", 'plugins_path' => "$install_root/mod/", - 'www_root' => $www_root, + 'wwwroot' => $www_root, 'url' => $www_root, 'site_name' => 'New Elgg site', 'language' => 'en', @@ -561,8 +556,6 @@ function set_default_config() { // compatibility with old names for ppl not using get_config() 'viewpath' => "$install_root/views/", 'pluginspath' => "$install_root/mod/", - 'wwwroot' => $www_root, - 'url' => $www_root, 'sitename' => 'New Elgg site', ); -- cgit v1.2.3 From a186ad16e258c6335e1757a20845c64056b87f15 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 1 Oct 2011 20:09:16 -0400 Subject: Fixes #3913 registering jquery.imgareaselect --- engine/lib/elgglib.php | 3 +++ views/default/forms/avatar/crop.php | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 7bdc5972a..c62175629 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -2031,7 +2031,10 @@ function elgg_init() { elgg_register_js('elgg.userpicker', 'js/lib/userpicker.js'); elgg_register_js('elgg.friendspicker', 'js/lib/friends_picker.js'); elgg_register_js('jquery.easing', 'vendors/jquery/jquery.easing.1.3.packed.js'); + elgg_register_js('jquery.imgareaselect', 'vendors/jquery/jquery.imgareaselect-0.9.8/scripts/jquery.imgareaselect.min.js'); + elgg_register_css('jquery.imgareaselect', 'vendors/jquery/jquery.imgareaselect-0.9.8/css/imgareaselect-deprecated.css'); + // Trigger the shutdown:system event upon PHP shutdown. register_shutdown_function('_elgg_shutdown_hook'); diff --git a/views/default/forms/avatar/crop.php b/views/default/forms/avatar/crop.php index 9fcae25c4..b97db939c 100644 --- a/views/default/forms/avatar/crop.php +++ b/views/default/forms/avatar/crop.php @@ -5,6 +5,9 @@ * @uses $vars['entity'] */ +elgg_load_js('jquery.imgareaselect'); +elgg_load_css('jquery.imgareaselect'); + $master_image = $vars['entity']->getIconUrl('master'); ?> @@ -25,8 +28,6 @@ echo elgg_view('input/submit', array('value' => elgg_echo('avatar:create'))); ?> - -