diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/access.php | 4 | ||||
-rw-r--r-- | engine/lib/annotations.php | 18 | ||||
-rw-r--r-- | engine/lib/calendar.php | 12 | ||||
-rw-r--r-- | engine/lib/entities.php | 34 | ||||
-rw-r--r-- | engine/lib/group.php | 6 | ||||
-rw-r--r-- | engine/lib/location.php | 12 | ||||
-rw-r--r-- | engine/lib/metadata.php | 12 | ||||
-rw-r--r-- | engine/lib/relationships.php | 10 | ||||
-rw-r--r-- | engine/lib/users.php | 12 | ||||
-rw-r--r-- | engine/lib/views.php | 8 |
10 files changed, 69 insertions, 59 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php index 053c46e6f..d56eb3dea 100644 --- a/engine/lib/access.php +++ b/engine/lib/access.php @@ -859,7 +859,7 @@ function elgg_list_entities_from_access_id(array $options = array()) { * @deprecated 1.8 Use elgg_list_entities_from_access_id() */ function list_entities_from_access_id($access_id, $entity_type = "", $entity_subtype = "", - $owner_guid = 0, $limit = 10, $fullview = true, $viewtypetoggle = true, $pagination = true) { + $owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = true, $pagination = true) { elgg_deprecated_notice("All list_entities* functions were deprecated in 1.8. Use elgg_list_entities* instead.", 1.8); @@ -870,7 +870,7 @@ function list_entities_from_access_id($access_id, $entity_type = "", $entity_sub 'owner_guids' => $owner_guid, 'limit' => $limit, 'full_view' => $fullview, - 'view_type_toggle' => $viewtypetoggle, + 'list_type_toggle' => $listtypetoggle, 'pagination' => $pagination, )); } diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index 02e5bc6e0..851d558b5 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -486,14 +486,14 @@ $count = false, $timelower = 0, $timeupper = 0) { * @param int $group_guid Group container. Currently only supported if entity_type is object * @param boolean $asc Whether to list in ascending or descending order (default: desc) * @param boolean $fullview Whether to display the entities in full - * @param boolean $viewtypetoggle Can 'gallery' view can be displayed (default: no) + * @param boolean $listtypetoggle Can 'gallery' view can be displayed (default: no) * * @deprecated 1.7 Use elgg_list_entities_from_annotations() * @return string Formatted entity list */ function list_entities_from_annotations($entity_type = "", $entity_subtype = "", $name = "", $value = "", $limit = 10, $owner_guid = 0, $group_guid = 0, $asc = false, $fullview = true, -$viewtypetoggle = false) { +$listtypetoggle = false) { $msg = 'list_entities_from_annotations is deprecated by elgg_list_entities_from_annotations'; elgg_deprecated_notice($msg, 1.8); @@ -537,7 +537,7 @@ $viewtypetoggle = false) { } $options['full_view'] = $fullview; - $options['view_type_toggle'] = $viewtypetoggle; + $options['list_type_toggle'] = $listtypetoggle; $options['pagination'] = $pagination; return elgg_list_entities_from_annotations($options); @@ -940,7 +940,7 @@ $count = false) { * @param int $group_guid Group container. Currently only supported if entity_type is object * @param boolean $asc Whether to list in ascending or descending order (default: desc) * @param boolean $fullview Whether to display the entities in full - * @param boolean $viewtypetoggle Can the 'gallery' view can be displayed (default: no) + * @param boolean $listtypetoggle Can the 'gallery' view can be displayed (default: no) * @param boolean $pagination Add pagination * @param string $orderdir Order desc or asc * @@ -948,7 +948,7 @@ $count = false) { */ function list_entities_from_annotation_count($entity_type = "", $entity_subtype = "", $name = "", $limit = 10, $owner_guid = 0, $group_guid = 0, $asc = false, $fullview = true, -$viewtypetoggle = false, $pagination = true, $orderdir = 'desc') { +$listtypetoggle = false, $pagination = true, $orderdir = 'desc') { if ($asc) { $asc = "asc"; } else { @@ -963,7 +963,7 @@ $viewtypetoggle = false, $pagination = true, $orderdir = 'desc') { '', '', $owner_guid, $limit, $offset, $orderdir, false); return elgg_view_entity_list($entities, $count, $offset, $limit, - $fullview, $viewtypetoggle, $pagination); + $fullview, $listtypetoggle, $pagination); } /** @@ -980,7 +980,7 @@ $viewtypetoggle = false, $pagination = true, $orderdir = 'desc') { * @param int $group_guid Group container. Currently only supported if entity_type is object * @param boolean $asc Whether to list in ascending or descending order (default: desc) * @param boolean $fullview Whether to display the entities in full - * @param boolean $viewtypetoggle Can the 'gallery' view can be displayed (default: no) + * @param boolean $listtypetoggle Can the 'gallery' view can be displayed (default: no) * @param boolean $pagination Display pagination * @param string $orderdir 'desc' or 'asc' * @@ -988,7 +988,7 @@ $viewtypetoggle = false, $pagination = true, $orderdir = 'desc') { */ function list_entities_from_annotation_count_by_metadata($entity_type = "", $entity_subtype = "", $name = "", $mdname = '', $mdvalue = '', $limit = 10, $owner_guid = 0, $group_guid = 0, -$asc = false, $fullview = true, $viewtypetoggle = false, $pagination = true, $orderdir = 'desc') { +$asc = false, $fullview = true, $listtypetoggle = false, $pagination = true, $orderdir = 'desc') { if ($asc) { $asc = "asc"; @@ -1003,7 +1003,7 @@ $asc = false, $fullview = true, $viewtypetoggle = false, $pagination = true, $or $mdvalue, $owner_guid, $limit, $offset, $orderdir, false); return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, - $viewtypetoggle, $pagination); + $listtypetoggle, $pagination); } /** diff --git a/engine/lib/calendar.php b/engine/lib/calendar.php index f1a18ddb8..6ee9980e5 100644 --- a/engine/lib/calendar.php +++ b/engine/lib/calendar.php @@ -516,13 +516,13 @@ $order_by = "", $limit = 10, $offset = 0, $count = false, $site_guid = 0) { * @param int $owner_guid The GUID of the owning user * @param int $limit The number of entities to return; 10 by default * @param boolean $fullview Whether or not to display the full view (default: true) - * @param boolean $viewtypetoggle Whether or not to allow gallery view + * @param boolean $listtypetoggle Whether or not to allow gallery view * @param boolean $navigation Display pagination? Default: true * * @return string A viewable list of entities */ function list_notable_entities($start_time, $end_time, $type= "", $subtype = "", $owner_guid = 0, -$limit = 10, $fullview = true, $viewtypetoggle = false, $navigation = true) { +$limit = 10, $fullview = true, $listtypetoggle = false, $navigation = true) { $offset = (int) get_input('offset'); $count = get_notable_entities($start_time, $end_time, $type, $subtype, @@ -532,7 +532,7 @@ $limit = 10, $fullview = true, $viewtypetoggle = false, $navigation = true) { $owner_guid, "", $limit, $offset); return elgg_view_entity_list($entities, $count, $offset, $limit, - $fullview, $viewtypetoggle, $navigation); + $fullview, $listtypetoggle, $navigation); } /** @@ -545,17 +545,17 @@ $limit = 10, $fullview = true, $viewtypetoggle = false, $navigation = true) { * @param int $owner_guid The GUID of the owning user * @param int $limit The number of entities to return; 10 by default * @param boolean $fullview Whether or not to display the full view (default: true) - * @param boolean $viewtypetoggle Whether or not to allow gallery view + * @param boolean $listtypetoggle Whether or not to allow gallery view * @param boolean $navigation Display pagination? Default: true * * @return string A viewable list of entities */ function list_todays_entities($type= "", $subtype = "", $owner_guid = 0, $limit = 10, -$fullview = true, $viewtypetoggle = false, $navigation = true) { +$fullview = true, $listtypetoggle = false, $navigation = true) { $day_start = get_day_start(); $day_end = get_day_end(); return list_notable_entities($day_start, $day_end, $type, $subtype, $owner_guid, $limit, - $fullview, $viewtypetoggle, $navigation); + $fullview, $listtypetoggle, $navigation); }
\ No newline at end of file diff --git a/engine/lib/entities.php b/engine/lib/entities.php index c8886ac50..3ba416453 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1315,7 +1315,7 @@ function elgg_get_entity_site_where_sql($table, $site_guids) { * * @param array $options Any options from $getter options plus: * full_view => BOOL Display full view entities - * view_type_toggle => BOOL Display gallery / list switch + * list_type_toggle => BOOL Display gallery / list switch * pagination => BOOL Display pagination links * * @param mixed $getter The entity getter function to use to fetch the entities @@ -1331,12 +1331,17 @@ function elgg_list_entities(array $options = array(), $getter = 'elgg_get_entiti 'offset' => (int) max(get_input('offset', 0), 0), 'limit' => (int) max(get_input('limit', 10), 0), 'full_view' => TRUE, - 'view_type_toggle' => FALSE, + 'list_type_toggle' => FALSE, 'pagination' => TRUE, ); $options = array_merge($defaults, $options); + //backwards compatibility + if (isset($options['view_type_toggle'])) { + $options['list_type_toggle'] = $options['view_type_toggle']; + } + $options['count'] = TRUE; $count = $getter($options); @@ -1344,7 +1349,7 @@ function elgg_list_entities(array $options = array(), $getter = 'elgg_get_entiti $entities = $getter($options); return elgg_view_entity_list($entities, $count, $options['offset'], $options['limit'], - $options['full_view'], $options['view_type_toggle'], $options['pagination']); + $options['full_view'], $options['list_type_toggle'], $options['pagination']); } /** @@ -1357,13 +1362,13 @@ function elgg_list_entities(array $options = array(), $getter = 'elgg_get_entiti * @param int $owner_guid Owner GUID * @param int $limit Limit * @param bool $fullview Display entity full views? - * @param bool $viewtypetoggle Allow switching to gallery mode? + * @param bool $listtypetoggle Allow switching to gallery mode? * @param bool $pagination Show pagination? * * @return string */ function list_entities($type= "", $subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, -$viewtypetoggle = false, $pagination = true) { +$listtypetoggle = false, $pagination = true) { elgg_deprecated_notice('list_entities() was deprecated by elgg_list_entities()!', 1.7); @@ -1391,7 +1396,7 @@ $viewtypetoggle = false, $pagination = true) { } $options['full_view'] = $fullview; - $options['view_type_toggle'] = $viewtypetoggle; + $options['list_type_toggle'] = $listtypetoggle; $options['pagination'] = $pagination; return elgg_list_entities($options); @@ -2344,14 +2349,14 @@ function entities_page_handler($page) { * @param int $owner_guid Owner GUID * @param int $limit Limit * @param bool $fullview Show entity full views - * @param bool $viewtypetoggle Show list type toggle + * @param bool $listtypetoggle Show list type toggle * @param bool $allowedtypes A string of the allowed types * * @return string * @deprecated 1.7. Use elgg_list_registered_entities(). */ function list_registered_entities($owner_guid = 0, $limit = 10, $fullview = true, -$viewtypetoggle = false, $allowedtypes = true) { +$listtypetoggle = false, $allowedtypes = true) { elgg_deprecated_notice('list_registered_entities() was deprecated by elgg_list_registered_entities().', 1.7); @@ -2372,7 +2377,7 @@ $viewtypetoggle = false, $allowedtypes = true) { // need to send because might be BOOL $options['full_view'] = $fullview; - $options['view_type_toggle'] = $viewtypetoggle; + $options['list_type_toggle'] = $listtypetoggle; $options['offset'] = get_input('offset', 0); @@ -2388,7 +2393,7 @@ $viewtypetoggle = false, $allowedtypes = true) { * * full_view => BOOL Display full view entities * - * view_type_toggle => BOOL Display gallery / list switch + * list_type_toggle => BOOL Display gallery / list switch * * allowed_types => TRUE|ARRAY True to show all types or an array of valid types. * @@ -2401,12 +2406,17 @@ function elgg_list_registered_entities($options) { $defaults = array( 'full_view' => TRUE, 'allowed_types' => TRUE, - 'view_type_toggle' => FALSE, + 'list_type_toggle' => FALSE, 'pagination' => TRUE, 'offset' => 0 ); $options = array_merge($defaults, $options); + //backwards compatibility + if (isset($options['view_type_toggle'])) { + $options['list_type_toggle'] = $options['view_type_toggle']; + } + $typearray = array(); if ($object_types = get_registered_entity_types()) { @@ -2429,7 +2439,7 @@ function elgg_list_registered_entities($options) { $entities = elgg_get_entities($options); return elgg_view_entity_list($entities, $count, $options['offset'], - $options['limit'], $options['full_view'], $options['view_type_toggle'], $options['pagination']); + $options['limit'], $options['full_view'], $options['list_type_toggle'], $options['pagination']); } /** diff --git a/engine/lib/group.php b/engine/lib/group.php index e554a44c5..def82fa9c 100644 --- a/engine/lib/group.php +++ b/engine/lib/group.php @@ -272,7 +272,7 @@ $order_by = "", $limit = 10, $offset = 0, $count = FALSE) { * @param int $container_guid The GUID of the containing group * @param int $limit The number of entities to display per page (default: 10) * @param bool $fullview Whether or not to display the full view (default: true) - * @param bool $viewtypetoggle Whether or not to allow gallery view (default: true) + * @param bool $listtypetoggle Whether or not to allow gallery view (default: true) * @param bool $pagination Whether to display pagination (default: true) * * @return string List of parsed entities @@ -281,7 +281,7 @@ $order_by = "", $limit = 10, $offset = 0, $count = FALSE) { * @deprecated 1.8 Use elgg_list_entities() instead */ function list_entities_groups($subtype = "", $owner_guid = 0, $container_guid = 0, -$limit = 10, $fullview = true, $viewtypetoggle = true, $pagination = true) { +$limit = 10, $fullview = true, $listtypetoggle = true, $pagination = true) { elgg_deprecated_notice("list_entities_groups was deprecated in 1.8. Use elgg_list_entities() instead.", 1.8); $offset = (int) get_input('offset'); $count = get_objects_in_group($container_guid, $subtype, $owner_guid, @@ -290,7 +290,7 @@ $limit = 10, $fullview = true, $viewtypetoggle = true, $pagination = true) { 0, "", $limit, $offset); return elgg_view_entity_list($entities, $count, $offset, $limit, - $fullview, $viewtypetoggle, $pagination); + $fullview, $listtypetoggle, $pagination); } /** diff --git a/engine/lib/location.php b/engine/lib/location.php index d5d6b7309..039bb5ee0 100644 --- a/engine/lib/location.php +++ b/engine/lib/location.php @@ -220,16 +220,16 @@ $order_by = "", $limit = 10, $offset = 0, $count = false, $site_guid = 0, $conta * @param int $owner_guid The GUID of the owning user * @param int $limit The number of entities to display per page (default: 10) * @param bool $fullview Whether or not to display the full view (default: true) - * @param bool $viewtypetoggle Whether or not to allow gallery view + * @param bool $listtypetoggle Whether or not to allow gallery view * @param bool $navigation Display pagination? Default: true * * @return string A viewable list of entities */ function list_entities_location($location, $type= "", $subtype = "", $owner_guid = 0, $limit = 10, -$fullview = true, $viewtypetoggle = false, $navigation = true) { +$fullview = true, $listtypetoggle = false, $navigation = true) { return list_entities_from_metadata('location', $location, $type, $subtype, $owner_guid, $limit, - $fullview, $viewtypetoggle, $navigation); + $fullview, $listtypetoggle, $navigation); } /** @@ -243,13 +243,13 @@ $fullview = true, $viewtypetoggle = false, $navigation = true) { * @param int $owner_guid The GUID of the owning user * @param int $limit The number of entities to display per page (default: 10) * @param bool $fullview Whether or not to display the full view (default: true) - * @param bool $viewtypetoggle Whether or not to allow gallery view + * @param bool $listtypetoggle Whether or not to allow gallery view * @param bool $navigation Display pagination? Default: true * * @return string A viewable list of entities */ function list_entities_in_area($lat, $long, $radius, $type= "", $subtype = "", $owner_guid = 0, -$limit = 10, $fullview = true, $viewtypetoggle = false, $navigation = true) { +$limit = 10, $fullview = true, $listtypetoggle = false, $navigation = true) { $offset = (int) get_input('offset'); $count = get_entities_in_area($lat, $long, $radius, $type, $subtype, $owner_guid, @@ -258,7 +258,7 @@ $limit = 10, $fullview = true, $viewtypetoggle = false, $navigation = true) { "", $limit, $offset); return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, - $viewtypetoggle, $navigation); + $listtypetoggle, $navigation); } // Some distances in degrees (approximate) diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index 8b6fe364f..71aa6c0f7 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -980,7 +980,7 @@ $site_guid = 0, $count = FALSE, $case_sensitive = TRUE) { * @param int $owner_guid Owner GUID * @param int $limit Number of entities to display per page * @param bool $fullview WDisplay the full view (default: true) - * @param bool $viewtypetoggle Allow users to toggle to the gallery view. Default: true + * @param bool $listtypetoggle Allow users to toggle to the gallery view. Default: true * @param bool $pagination Display pagination? Default: true * @param bool $case_sensitive Case sensitive metadata names? * @@ -990,7 +990,7 @@ $site_guid = 0, $count = FALSE, $case_sensitive = TRUE) { */ function list_entities_from_metadata($meta_name, $meta_value = "", $entity_type = ELGG_ENTITIES_ANY_VALUE, $entity_subtype = ELGG_ENTITIES_ANY_VALUE, -$owner_guid = 0, $limit = 10, $fullview = true, $viewtypetoggle = true, +$owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = true, $pagination = true, $case_sensitive = true) { elgg_deprecated_notice('list_entities_from_metadata() was deprecated by elgg_list_entities_from_metadata()!', 1.8); @@ -1014,7 +1014,7 @@ $pagination = true, $case_sensitive = true) { $entities = elgg_get_entities_from_metadata($options); return elgg_view_entity_list($entities, $count, $offset, $limit, - $fullview, $viewtypetoggle, $pagination); + $fullview, $listtypetoggle, $pagination); } /** @@ -1115,13 +1115,13 @@ $count = false, $meta_array_operator = 'and') { * @param int $owner_guid Owner GUID * @param int $limit Limit * @param bool $fullview WDisplay the full view (default: true) - * @param bool $viewtypetoggle Allow users to toggle to the gallery view. Default: true + * @param bool $listtypetoggle Allow users to toggle to the gallery view. Default: true * @param bool $pagination Display pagination? Default: true * * @return string List of ElggEntities suitable for display */ function list_entities_from_metadata_multi($meta_array, $entity_type = "", $entity_subtype = "", -$owner_guid = 0, $limit = 10, $fullview = true, $viewtypetoggle = true, $pagination = true) { +$owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = true, $pagination = true) { $offset = (int) get_input('offset'); $limit = (int) $limit; @@ -1131,7 +1131,7 @@ $owner_guid = 0, $limit = 10, $fullview = true, $viewtypetoggle = true, $paginat $owner_guid, $limit, $offset, "", $site_guid, false); return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, - $viewtypetoggle, $pagination); + $listtypetoggle, $pagination); } /** diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php index 0b6b9b607..f19c76e8b 100644 --- a/engine/lib/relationships.php +++ b/engine/lib/relationships.php @@ -418,7 +418,7 @@ function elgg_list_entities_from_relationship(array $options = array()) { function list_entities_from_relationship($relationship, $relationship_guid, $inverse_relationship = false, $type = ELGG_ENTITIES_ANY_VALUE, $subtype = ELGG_ENTITIES_ANY_VALUE, $owner_guid = 0, $limit = 10, -$fullview = true, $viewtypetoggle = false, $pagination = true) { +$fullview = true, $listtypetoggle = false, $pagination = true) { elgg_deprecated_notice("list_entities_from_relationship was deprecated by elgg_list_entities_from_relationship()!", 1.8); return elgg_list_entities_from_relationship(array( @@ -430,7 +430,7 @@ $fullview = true, $viewtypetoggle = false, $pagination = true) { 'owner_guid' => $owner_guid, 'limit' => $limit, 'full_view' => $fullview, - 'view_type_toggle' => $viewtypetoggle, + 'list_type_toggle' => $listtypetoggle, 'pagination' => $pagination, )); } @@ -541,7 +541,7 @@ $subtype = "", $owner_guid = 0, $limit = 10, $offset = 0, $count = false, $site_ * @param int $owner_guid The owner (default: all) * @param int $limit The number of entities to display on a page * @param bool $fullview Whether or not to display the full view (default: true) - * @param bool $viewtypetoggle Whether or not to allow gallery view + * @param bool $listtypetoggle Whether or not to allow gallery view * @param bool $pagination Whether to display pagination (default: true) * * @return string The viewable list of entities @@ -549,7 +549,7 @@ $subtype = "", $owner_guid = 0, $limit = 10, $offset = 0, $count = false, $site_ function list_entities_by_relationship_count($relationship, $inverse_relationship = true, $type = "", $subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, -$viewtypetoggle = false, $pagination = true) { +$listtypetoggle = false, $pagination = true) { $limit = (int) $limit; $offset = (int) get_input('offset'); @@ -558,7 +558,7 @@ $viewtypetoggle = false, $pagination = true) { $entities = get_entities_by_relationship_count($relationship, $inverse_relationship, $type, $subtype, $owner_guid, $limit, $offset); - return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $viewtypetoggle, $pagination); + return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $listtypetoggle, $pagination); } /** diff --git a/engine/lib/users.php b/engine/lib/users.php index b116e1083..c9a534b62 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -496,7 +496,7 @@ $timeupper = 0) { * @param string $subtype The object subtype * @param int $limit The number of entities to display on a page * @param bool $fullview Whether or not to display the full view (default: true) - * @param bool $viewtypetoggle Whether or not to allow gallery view (default: true) + * @param bool $listtypetoggle Whether or not to allow gallery view (default: true) * @param bool $pagination Whether to display pagination (default: true) * @param int $timelower The earliest time the entity can have been created. Default: all * @param int $timeupper The latest time the entity can have been created. Default: all @@ -505,7 +505,7 @@ $timeupper = 0) { * @deprecated 1.8 Use elgg_list_entities() instead */ function list_user_objects($user_guid, $subtype = ELGG_ENTITIES_ANY_VALUE, $limit = 10, -$fullview = true, $viewtypetoggle = true, $pagination = true, $timelower = 0, $timeupper = 0) { +$fullview = true, $listtypetoggle = true, $pagination = true, $timelower = 0, $timeupper = 0) { elgg_deprecated_notice("list_user_objects() was deprecated in favor of elgg_list_entities()", 1.8); $offset = (int) get_input('offset'); @@ -513,7 +513,7 @@ $fullview = true, $viewtypetoggle = true, $pagination = true, $timelower = 0, $t $count = (int) count_user_objects($user_guid, $subtype, $timelower, $timeupper); $entities = get_user_objects($user_guid, $subtype, $limit, $offset, $timelower, $timeupper); - return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $viewtypetoggle, + return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $listtypetoggle, $pagination); } @@ -591,7 +591,7 @@ $timelower = 0, $timeupper = 0) { * @param string $subtype The object subtype * @param int $limit The number of entities to display on a page * @param bool $fullview Whether or not to display the full view (default: true) - * @param bool $viewtypetoggle Whether or not to allow you to flip to gallery mode (default: true) + * @param bool $listtypetoggle Whether or not to allow you to flip to gallery mode (default: true) * @param bool $pagination Whether to display pagination (default: true) * @param int $timelower The earliest time the entity can have been created. Default: all * @param int $timeupper The latest time the entity can have been created. Default: all @@ -599,7 +599,7 @@ $timelower = 0, $timeupper = 0) { * @return string The list in a form suitable to display */ function list_user_friends_objects($user_guid, $subtype = "", $limit = 10, $fullview = true, -$viewtypetoggle = true, $pagination = true, $timelower = 0, $timeupper = 0) { +$listtypetoggle = true, $pagination = true, $timelower = 0, $timeupper = 0) { $offset = (int) get_input('offset'); $limit = (int) $limit; @@ -609,7 +609,7 @@ $viewtypetoggle = true, $pagination = true, $timelower = 0, $timeupper = 0) { $timelower, $timeupper); return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, - $viewtypetoggle, $pagination); + $listtypetoggle, $pagination); } /** diff --git a/engine/lib/views.php b/engine/lib/views.php index 144595c50..9098950e3 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -800,14 +800,14 @@ function elgg_view_annotation(ElggAnnotation $annotation, $bypass = true, $debug * @param int $offset The current indexing offset * @param int $limit The number of entities to display per page * @param bool $fullview Whether or not to display the full view (default: true) - * @param bool $viewtypetoggle Whether or not to allow users to toggle to gallery view + * @param bool $listtypetoggle Whether or not to allow users to toggle to gallery view * @param bool $pagination Whether pagination is offered. * * @return string The list of entities * @access private */ function elgg_view_entity_list($entities, $count, $offset, $limit, $fullview = true, -$viewtypetoggle = true, $pagination = true) { +$listtypetoggle = true, $pagination = true) { $count = (int) $count; $limit = (int) $limit; @@ -827,8 +827,8 @@ $viewtypetoggle = true, $pagination = true) { 'baseurl' => $_SERVER['REQUEST_URI'], 'fullview' => $fullview, 'context' => $context, - 'viewtypetoggle' => $viewtypetoggle, - 'viewtype' => get_input('search_viewtype', 'list'), + 'listtypetoggle' => $listtypetoggle, + 'listtype' => get_input('listtype', 'list'), 'pagination' => $pagination )); |