aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-15 01:05:45 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-15 01:05:45 +0000
commit9ce11d138f9868b872fe8206dbc3c2f44723605a (patch)
tree273a2aed762c62eea3ac329649b42326a2d91438 /engine/lib
parent76e70b79acc60358a7225c0976fd6b7f2fe3c74f (diff)
downloadelgg-9ce11d138f9868b872fe8206dbc3c2f44723605a.tar.gz
elgg-9ce11d138f9868b872fe8206dbc3c2f44723605a.tar.bz2
Fixes #2808: elgg_get_array_value => elgg_extract
git-svn-id: http://code.elgg.org/elgg/trunk@8247 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/admin.php4
-rw-r--r--engine/lib/annotations.php2
-rw-r--r--engine/lib/elgglib.php2
-rw-r--r--engine/lib/metastrings.php4
-rw-r--r--engine/lib/plugins.php6
-rw-r--r--engine/lib/river.php2
-rw-r--r--engine/lib/views.php2
-rw-r--r--engine/lib/xml.php4
8 files changed, 13 insertions, 13 deletions
diff --git a/engine/lib/admin.php b/engine/lib/admin.php
index 6d0b60101..854a978b5 100644
--- a/engine/lib/admin.php
+++ b/engine/lib/admin.php
@@ -345,9 +345,9 @@ function admin_settings_page_handler($page) {
function admin_plugin_screenshot_page_handler($pages) {
admin_gatekeeper();
- $plugin_id = elgg_get_array_value(0, $pages);
+ $plugin_id = elgg_extract(0, $pages);
// only thumbnail or full.
- $size = elgg_get_array_value(1, $pages, 'thumbnail');
+ $size = elgg_extract(1, $pages, 'thumbnail');
// the rest of the string is the filename
$filename_parts = array_slice($pages, 2);
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php
index 0235476f2..d2f2c6386 100644
--- a/engine/lib/annotations.php
+++ b/engine/lib/annotations.php
@@ -405,7 +405,7 @@ function elgg_get_entities_from_annotation_calculation($options) {
$options = array_merge($defaults, $options);
- $function = sanitize_string(elgg_get_array_value('calculation', $options, 'sum', false));
+ $function = sanitize_string(elgg_extract('calculation', $options, 'sum', false));
// you must cast this as an int or it sorts wrong.
$options['selects'][] = "$function(cast(msv.string as signed)) as calculated";
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index fbd33b219..e9ae8b0ad 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -1432,7 +1432,7 @@ function elgg_http_url_is_identical($url1, $url2, $ignore_params = array('offset
* @return void
* @since 1.8.0
*/
-function elgg_get_array_value($key, array $array, $default = NULL, $strict = true) {
+function elgg_extract($key, array $array, $default = NULL, $strict = true) {
if ($strict) {
return (isset($array[$key])) ? $array[$key] : $default;
} else {
diff --git a/engine/lib/metastrings.php b/engine/lib/metastrings.php
index 8c702239b..8f9debcc0 100644
--- a/engine/lib/metastrings.php
+++ b/engine/lib/metastrings.php
@@ -580,8 +580,8 @@ function elgg_normalize_metastrings_options(array $options = array()) {
// support either metastrings_type or metastring_type
// because I've made this mistake many times and hunting it down is a pain...
- $type = elgg_get_array_value('metastring_type', $options, null);
- $type = elgg_get_array_value('metastrings_type', $options, $type);
+ $type = elgg_extract('metastring_type', $options, null);
+ $type = elgg_extract('metastrings_type', $options, $type);
$options['metastring_type'] = $type;
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index b8fd321a8..872984751 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -657,9 +657,9 @@ function elgg_check_plugins_provides($type, $name, $version = null, $comparison
* @return array
*/
function elgg_get_plugin_dependency_strings($dep) {
- $dep_system = elgg_get_array_value('type', $dep);
- $info = elgg_get_array_value('dep', $dep);
- $type = elgg_get_array_value('type', $info);
+ $dep_system = elgg_extract('type', $dep);
+ $info = elgg_extract('dep', $dep);
+ $type = elgg_extract('type', $info);
if (!$dep_system || !$info || !$type) {
return false;
diff --git a/engine/lib/river.php b/engine/lib/river.php
index 43a1c38d5..4cb9c30f4 100644
--- a/engine/lib/river.php
+++ b/engine/lib/river.php
@@ -515,7 +515,7 @@ function elgg_river_page_handler($page) {
elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());
- $page_type = elgg_get_array_value(0, $page, 'all');
+ $page_type = elgg_extract(0, $page, 'all');
if ($page_type == 'owner') {
$page_type = 'mine';
}
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 1e0ce3764..865212a06 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -681,7 +681,7 @@ function elgg_view_menu($menu_name, array $vars = array()) {
$vars['name'] = $menu_name;
- $sort_by = elgg_get_array_value('sort_by', $vars, 'title');
+ $sort_by = elgg_extract('sort_by', $vars, 'title');
$menu = $CONFIG->menus[$menu_name];
diff --git a/engine/lib/xml.php b/engine/lib/xml.php
index 55ea1b5ad..813bc4ee0 100644
--- a/engine/lib/xml.php
+++ b/engine/lib/xml.php
@@ -127,8 +127,8 @@ function xml_to_object($xml) {
if ($tag['type'] == "complete" || $tag['type'] == "open") {
$elements[$index] = new XmlElement;
$elements[$index]->name = $tag['tag'];
- $elements[$index]->attributes = elgg_get_array_value('attributes', $tag, '');
- $elements[$index]->content = elgg_get_array_value('value', $tag, '');
+ $elements[$index]->attributes = elgg_extract('attributes', $tag, '');
+ $elements[$index]->content = elgg_extract('value', $tag, '');
if ($tag['type'] == "open") {
$elements[$index]->children = array();