|
From: <kla...@mn...> - 2012-06-19 11:51:40
|
The branch, staging has been updated
Summary of changes:
web/infos/datenschutz.php | 34 +++++++++++++++++++---------------
1 files changed, 19 insertions(+), 15 deletions(-)
...from ce5aa31397af3ae2091f5b565ed46e0cbd83ff20 (commit) to (505ffda6bc654e44f03781babc0880dcbf37f3bc)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 505ffda6bc654e44f03781babc0880dcbf37f3bc
Author: Christoph Thelen <chr...@mn...>
Date: Tue Jun 19 13:50:58 2012 +0200
Use pre-defined ordering of table rows
-----------------------------------------------------------------------
Complete Diff
diff --git a/web/infos/datenschutz.php b/web/infos/datenschutz.php
index fcf4bb2..bb05013 100644
--- a/web/infos/datenschutz.php
+++ b/web/infos/datenschutz.php
@@ -86,25 +86,36 @@ foreach ($deployreader->getProjectIterator() as $num => $build) {
}
$descriptions = array(
- 'ForumPost' => "Forenbeiträge",
- 'Diary' => "Arbeitsjournal-Einträge",
+ 'Messaging' => "Private Nachrichten",
+ 'Picture' => "Benutzerfoto",
+ 'Name' => "Vor- und Nachname",
'Address' => "Adresse",
- 'CourseEntry' => "Eintrittsdatum in einen Kurs",
'Email' => "E-Mailadresse",
- 'Usergroup' => "Benutzergruppe",
- 'Picture' => "Benutzerfoto",
+ 'Diary' => "Arbeitsjournal-Einträge",
'LastLogin' => "Letzter Login-Zeitpunkt",
'OnlineState' => "Online-Status",
- 'CourseEnrollment' => "Kursteilnahme: belegte Kurse",
'Activity' => "Aktivitäten im Foyer/Kurskontext",
- 'Name' => "Vor- und Nachname",
+ 'CourseEnrollment' => "Kursteilnahme: belegte Kurse",
+ 'CourseEntry' => "Eintrittsdatum in einen Kurs",
+ 'ForumPost' => "Forenbeiträge",
'Announcement' => "Mitteilungen",
'Upload' => "Upload-Daten",
+ 'Usergroup' => "Benutzergruppe",
'CoursePolicy' => "Kurs-Policy",
- 'Messaging' => "Private Nachrichten",
'' => ' ',
);
+// Setup mapping 'description' => 'position in table'
+$orderkeys = array_keys($descriptions);
+$tableOrdering = array_combine($orderkeys, array_keys($orderkeys));
+array_pop($tableOrdering); // Remove last element (empty description)
+
+$tableValues = array_values($data->table);
+foreach ($tableValues as $v) {
+ $position = $tableOrdering[$v[0]->content];
+ $data->table[$position] = $v;
+}
+
$data->table = array_map(
function ($a) use ($descriptions) {
$a[0]->content = $descriptions[$a[0]->content];
@@ -113,13 +124,6 @@ $data->table = array_map(
$data->table
);
-usort(
- $data->table,
- function($a, $b) {
- return strcmp($a[0]->content, $b[0]->content);
- }
-);
-
if (! isset($SHOW_INLINE)) {
include_once PATH_TO_ROOT . "common/header.inc.php";
}
hooks/post-receive
--
estudy
|