Update code to fix thomas review's

This commit is contained in:
William MARTIN
2011-04-06 15:33:26 +02:00
parent 352dc3e179
commit 836ff71364
8 changed files with 64 additions and 60 deletions

View File

@@ -42,23 +42,11 @@ class IDF_Views
$projects = self::getProjects($request->user);
$stats = self::getProjectsStatistics ($projects);
$logos = array();
foreach ($projects as $p) {
$logo = $p->getConf()->getVal('logo');
if (!empty($logo)) {
$logo = Pluf::f('upload_path').'/'.$logo;
$logos[$p->shortname] = IDF_FileUtil::getPictureInline($logo);
} else {
$logos[$p->shortname] = "";
}
}
if ($api == true) return $projects;
return Pluf_Shortcuts_RenderToResponse('idf/index.html',
array('page_title' => __('Projects'),
'projects' => $projects,
'stats' => new Pluf_Template_ContextVars($stats),
'logos' => $logos),
'stats' => new Pluf_Template_ContextVars($stats)),
$request);
}