Skip to content

Commit 1b1bdbd

Browse files
Fix for statistics field presentation when name was not set. and added som parameters in config template
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1506 44740490-163a-0410-bde0-09ae8108e29a
1 parent 0a29747 commit 1b1bdbd

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

modules/statistics/config-templates/module_statistics.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55

66
$config = array (
77

8-
// Access control on statistics page.
98
'protected' => FALSE,
9+
'auth' => 'admin',
10+
'useridattr' => 'eduPersonPrincipalName',
1011

11-
/*
12-
* Which authenticatino source should be used for authentication exception from admin module.
13-
* Set to NULL if only using admin auth.
14-
*/
15-
//'auth' => 'feide',
12+
'default' => 'sso_hoursweek',
13+
14+
'allowedUsers' => array(
15+
'admin'
16+
),
1617

1718
'default' => 'sso_hoursweek',
1819

modules/statistics/lib/Statistics/FieldPresentation/Entity.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ public function getPresentation() {
99

1010
$translation = array('_' => 'All services');
1111
foreach($this->fields AS $field) {
12-
if (array_key_exists($field, $metadata))
13-
$translation[$field] = $this->template->t($metadata[$field]['name'], array(), FALSE);
12+
if (array_key_exists($field, $metadata)) {
13+
if (array_key_exists('name', $metadata[$field])) {
14+
$translation[$field] = $this->template->t($metadata[$field]['name'], array(), FALSE);
15+
}
16+
}
1417
}
1518
return $translation;
1619
}

0 commit comments

Comments
 (0)