dir/mod/home.php
Hypolite Petovan a8dc2e65f4 Merge branch 'master' into feature/redesign-prototype
# Conflicts:
#	.gitignore
#	.htconfig.php
#	.htconfig.php-dist
#	boot.php
#	include/dba.php
#	mod/health.php
#	util/htconfig.vagrant.php
2017-04-20 22:33:41 -04:00

18 lines
469 B
PHP

<?php
use Friendica\Directory\Rendering\View;
use Friendica\Directory\Helper\Profile as ProfileHelper;
if(! function_exists('home_content')) {
function home_content(&$a) {
$profiles = q("SELECT * FROM profile WHERE comm=1 AND LENGTH(pdesc)>0 ORDER BY RAND() LIMIT 3");
$view = new View('homepage', 'minimal');
$view->addHelper('photoUrl', ProfileHelper::get('photoUrl'));
$view->output(array(
'profiles' => $profiles
));
}}