Show only accessible projects in header selection

This commit is contained in:
Eike Foken
2011-09-21 00:08:47 +02:00
parent e52bb347ab
commit 37daf6a6b4

View File

@@ -51,12 +51,7 @@
<option disabled="disabled" selected="selected"><strong><?=_('Select a project');?></strong></option>
<?php
endif;
if ($this->access->isAdmin()) {
$theProjects = $this->project->getAll();
} else {
$theProjects = $this->project->getAccessible();
}
foreach ($theProjects as $project):
foreach ($this->project->getAccessible() as $project):
?>
<option title="<?=$project['name']?>" value="<?=site_url('projects/detail/' . $project['id']) . '?active_project=' . $project['id'];?>"<?=($active_project['id'] == $project['id']) ? ' selected' : '';?>><?=$project['mediumname'];?></option>
<?php