aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-15 10:31:09 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-15 10:31:09 +0000
commit3191a07d1e5fbd889886150d326101a38e3a3342 (patch)
tree1a7ea9685bf526fe70271ce9f491e4cd87f02346
parentfccc5b915844675041e89cb367623cd9ee6904af (diff)
downloadelgg-3191a07d1e5fbd889886150d326101a38e3a3342.tar.gz
elgg-3191a07d1e5fbd889886150d326101a38e3a3342.tar.bz2
The front page now only shows content and groups.
git-svn-id: https://code.elgg.org/elgg/trunk@1929 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/entities.php7
-rw-r--r--index.php2
2 files changed, 4 insertions, 5 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 427dd5c7d..ee1066e99 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1346,8 +1346,7 @@
$where = array();
- if (is_array($type)) {
-
+ if (is_array($type)) {
$tempwhere = "";
if (sizeof($type))
foreach($type as $typekey => $subtypearray) {
@@ -2045,13 +2044,13 @@
* @param true|false $viewtypetoggle Whether or not to allow gallery view
* @return string A viewable list of entities
*/
- function list_registered_entities($owner_guid = 0, $limit = 10, $fullview = true, $viewtypetoggle = false) {
+ function list_registered_entities($owner_guid = 0, $limit = 10, $fullview = true, $viewtypetoggle = false, $allowedtypes = true) {
$typearray = array();
if ($object_types = get_registered_entity_types()) {
foreach($object_types as $object_type => $subtype_array) {
- if (is_array($subtype_array) && sizeof($subtype_array))
+ if (is_array($subtype_array) && sizeof($subtype_array) && (in_array($object_type,$allowedtypes) || $allowedtypes === true))
foreach($subtype_array as $object_subtype) {
$typearray[$object_type][] = $object_subtype;
}
diff --git a/index.php b/index.php
index c9d966b2f..9ccf21b03 100644
--- a/index.php
+++ b/index.php
@@ -29,7 +29,7 @@
global $CONFIG;
$title = elgg_view_title(elgg_echo('content:latest'));
set_context('search');
- $content = list_registered_entities();
+ $content = list_registered_entities(0,10,true,false,array('object','group'));
set_context('main');
global $autofeed;
$autofeed = false;