Sortiere Repositories und USer alphabetisch
bernd

bernd commited on 2011-12-21 16:51:54
Zeige 2 geänderte Dateien mit 4 Einfügungen und 1 Löschungen.


git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2096 87cf0b9e-d624-0410-a070-f6ee81989793
... ...
@@ -27,7 +27,7 @@ foreach ($repos as $repo => $settings) {
27 27
     $public_url = 'http://git.schokokeks.org/'.$repo.'.git';
28 28
     $public_string = '(Öffentlich abrufbar über <a href="'.$public_url.'">'.$public_url.'</a>)';
29 29
   }
30
-  output("<div><p><strong>{$repo}</strong> ".internal_link('edit', icon_edit('Zugriffsrechte bearbeiten'), 'repo='.$repo)." ".internal_link('delete', icon_delete('Repository löschen'), 'repo='.$repo)."{$description}<br />{$url} {$public_string}</p><ul>");
30
+  output("<div><p><strong>{$repo}</strong> ".internal_link('edit', icon_edit('Zugriffsrechte bearbeiten'), 'repo='.$repo)." ".internal_link('delete', icon_delete('Repository löschen'), 'repo='.$repo)."{$description}<br />push-Adresse: {$url} {$public_string}</p><ul>");
31 31
   foreach ($settings['users'] as $user => $rights) {
32 32
     if ($user == 'gitweb') {
33 33
       continue;
... ...
@@ -112,6 +112,7 @@ function list_repos()
112 112
   if ($current_repo) {
113 113
     $repos[$current_repo]['users'] = $current_repo_users;
114 114
   }
115
+  ksort($repos);
115 116
   DEBUG($repos);
116 117
   return $repos;
117 118
 }
... ...
@@ -139,6 +140,7 @@ function list_users() {
139 140
       break;
140 141
     }
141 142
   }
143
+  sort($users);
142 144
   DEBUG($users);
143 145
   return $users;
144 146
 }
... ...
@@ -333,6 +335,7 @@ function save_repo($repo, $permissions, $description)
333 335
 
334 336
   $data[] = "\n";
335 337
   if ($description) {
338
+    $description = preg_replace('/[\'"\r\n/', '', $description);
336 339
     $realname = $_SESSION['userinfo']['name'];
337 340
     $data[] = "{$repo} \"{$realname}\" = \"{$description}\"\n";
338 341
   }
339 342