From f4361e3ca4789be1ee525049648c450ce21fbdec Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 19 May 2004 06:05:01 +0000 Subject: [PATCH] fixed not working scrolling and search for user-groups, fixed disabled search via admin-ACL's --- admin/inc/class.uiaccounts.inc.php | 39 +++++++++++++++--------------- admin/setup/phpgw_de.lang | 4 ++- admin/setup/phpgw_en.lang | 4 +++ 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/admin/inc/class.uiaccounts.inc.php b/admin/inc/class.uiaccounts.inc.php index 0a15868bbf..885adc7cfe 100755 --- a/admin/inc/class.uiaccounts.inc.php +++ b/admin/inc/class.uiaccounts.inc.php @@ -59,8 +59,8 @@ if(isset($_POST['query'])) { // limit query to limit characters - if(eregi('^[a-z_0-9]+$',$_POST['query'])) - $query = $_POST['query']; + if(eregi('^[a-z_0-9]+$',$_POST['query'])) + $GLOBALS['query'] = $_POST['query']; } if(isset($_POST['start'])) @@ -100,6 +100,8 @@ $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); } $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); + $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['admin']['title'].' - '. + lang('User groups'); $GLOBALS['phpgw']->common->phpgw_header(); $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); @@ -112,24 +114,22 @@ $p->set_block('groups','row','row'); $p->set_block('groups','row_empty','row_empty'); - if ($GLOBALS['phpgw']->acl->check('group_access',2,'admin')) + if (! $GLOBALS['phpgw']->acl->check('account_access',2,'admin')) { - $account_info = $GLOBALS['phpgw']->accounts->get_list('groups',$start,$sort, $order, $query, $total); - $total = $GLOBALS['phpgw']->accounts->total; + $account_info = $GLOBALS['phpgw']->accounts->get_list('groups',$start,$sort, $order, $GLOBALS['query']); } else { - $account_info = $GLOBALS['phpgw']->accounts->get_list('groups',$start,$sort, $order, $query, $total); - $total = $GLOBALS['phpgw']->accounts->total; + $account_info = $GLOBALS['phpgw']->accounts->get_list('groups',$start,$sort, $order); } - - $url = $GLOBALS['phpgw']->link('/index.php'); + $total = $GLOBALS['phpgw']->accounts->total; $var = Array( 'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'], 'left_next_matchs' => $this->nextmatchs->left('/index.php',$start,$total,'menuaction=admin.uiaccounts.list_groups'), - 'right_next_matchs' => $this->nextmatchs->right('/admin/groups.php',$start,$total,'menuaction=admin.uiaccounts.list_groups'), - 'lang_groups' => lang('user groups'), + 'right_next_matchs' => $this->nextmatchs->right('/index.php',$start,$total,'menuaction=admin.uiaccounts.list_groups'), + 'lang_groups' => lang('%1 - %2 of %3 user groups',$start+1,$start+count($account_info),$total), + // 'lang_groups' => lang('user groups'), 'sort_name' => $this->nextmatchs->show_sort_order($sort,'account_lid',$order,'/index.php',lang('name'),'menuaction=admin.uiaccounts.list_groups'), 'header_edit' => lang('Edit'), 'header_delete' => lang('Delete') @@ -158,7 +158,7 @@ $can_delete = True; } - while (list($null,$account) = each($account_info)) + foreach($account_info as $account) { $tr_color = $this->nextmatchs->alternate_row_color($tr_color); $var = Array( @@ -203,7 +203,7 @@ if (! $GLOBALS['phpgw']->acl->check('group_access',2,'admin')) { - $p->set_var('input_search',lang('Search') . ' '); + $p->set_var('input_search',lang('Search') . ' '); } $p->pfp('out','list'); @@ -224,7 +224,7 @@ if(isset($_POST['query'])) { // limit query to limit characters - if(eregi('^[a-z_0-9]+$',$_POST['query'])) + if(eregi('^[a-z_0-9]+$',$_POST['query'])) $GLOBALS['query'] = $_POST['query']; } @@ -267,6 +267,8 @@ $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); } $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); + $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['admin']['title'].' - '. + lang('User accounts'); $GLOBALS['phpgw']->common->phpgw_header(); $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); @@ -280,17 +282,16 @@ $p->set_block('accounts','row','row'); $p->set_block('accounts','row_empty','row_empty'); - if ($GLOBALS['phpgw']->acl->check('account_access',2,'admin')) + if (! $GLOBALS['phpgw']->acl->check('account_access',2,'admin')) { $account_info = $GLOBALS['phpgw']->accounts->get_list('accounts',$start,$sort,$order,$GLOBALS['query']); - $total = $GLOBALS['phpgw']->accounts->total; } else { - $account_info = $GLOBALS['phpgw']->accounts->get_list('accounts',$start,$sort,$order,$GLOBALS['query']); - $total = $GLOBALS['phpgw']->accounts->total; + $account_info = $GLOBALS['phpgw']->accounts->get_list('accounts',$start,$sort,$order); } - + $total = $GLOBALS['phpgw']->accounts->total; + $url = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_users'); $var = Array( diff --git a/admin/setup/phpgw_de.lang b/admin/setup/phpgw_de.lang index f413fbadd7..b79266e10c 100644 --- a/admin/setup/phpgw_de.lang +++ b/admin/setup/phpgw_de.lang @@ -1,4 +1,5 @@ %1 - %2 of %3 user accounts admin de %1 - %2 von %3 Benutzerkonten +%1 - %2 of %3 user groups admin de %1 - %2 von %3 Benutzergruppen %1 not found or not executable !!! admin de %1 nicht gefunden oder nicht ausführbar!!! (stored password will not be shown here) admin de (Gespeichertes Passwort wird hier nicht angezeigt) (to install new applications use
setup [manage applications admin de (Zur Installation neuer Anwendungen verwenden Sie bitte
Setup [Anwendungen Verwalten] !!!) @@ -14,6 +15,7 @@ account preferences admin de Einstellungen der Benutzerkonten acl manager admin de ACL-Manager acl rights admin de ACL-Rechte action admin de Aktion +activate wsiwyg-editor admin de WYSIWYG (formatierter Text) Editor aktivieren add a category admin de Eine Kategorie hinzufügen add a group admin de Eine Gruppe hinzufügen add a new account. admin de Neues Benutzerkonto anlegen @@ -232,7 +234,6 @@ mode admin de Modus month admin de Monat never admin de Nie new group name admin de Neuer Gruppenname -new password [ leave blank for no change admin de new password [ leave blank for no change ] admin de Neues Passwort [ Feld leerlassen, wenn das Passwort nicht geändert werden soll ] next run admin de nächste Ausführung no algorithms available admin de Kein Algorithmus verfügbar @@ -325,6 +326,7 @@ the loginid can not be more then 8 characters admin de Der Benutzername darf nic the testjob sends you a mail everytime it is called. admin de Der Testjob sendet Ihnen jedesmal eine Mail wenn er aufgerufen wird. the two passwords are not the same admin de Die beiden Passwörter stimmen nicht überein the users bellow are still members of group %1 admin de Der unten angezeigten Benutzer sind Mitglied der Gruppe %1 +there already is a group with this name. userid's can not have the same name as a groupid admin de Es gibt bereits ein Gruppe mit diesem Namen. Benutzernamen dürfen nicht identisch mit Gruppennamen sein. they must be removed before you can continue admin de Sie müssen zuvor aus dieser entfernt werden this application is current admin de Diese Anwendung ist aktuell this application requires an upgrade admin de Diese Anwednung benötigt ein Upgrade diff --git a/admin/setup/phpgw_en.lang b/admin/setup/phpgw_en.lang index afc295b68e..14683cb89d 100644 --- a/admin/setup/phpgw_en.lang +++ b/admin/setup/phpgw_en.lang @@ -1,4 +1,5 @@ %1 - %2 of %3 user accounts admin en %1 - %2 of %3 user accounts +%1 - %2 of %3 user groups admin en %1 - %2 of %3 user groups %1 not found or not executable !!! admin en %1 not found or not executable !!! (stored password will not be shown here) admin en (Stored password will not be shown here) (to install new applications use
setup [manage applications] !!!) admin en (To install new applications use
Setup [Manage Applications] !!!) @@ -13,6 +14,7 @@ account preferences admin en Account Preferences acl manager admin en ACL Manager acl rights admin en ACL Rights action admin en Action +activate wsiwyg-editor admin en activate WSIWYG-editor add a category admin en add a category add a group admin en add a group add a new account. admin en Add a new account. @@ -113,6 +115,7 @@ deny access to user accounts admin en Deny access to user accounts deny all users access to grant other users access to their entries ? admin en Deny all users access to grant other users access to their entries ? description can not exceed 255 characters in length ! admin en Description can not exceed 255 characters in length ! disable "auto completion" of the login form admin en Disable "auto completion" of the login form +disable wsiwyg-editor admin en disable WSIWYG-editor disabled (not recomended) admin en disabled (not recomended) display admin en Display do not delete the category and return back to the list admin en do NOT delete the category and return back to the list @@ -318,6 +321,7 @@ the loginid can not be more then 8 characters admin en The loginid can not be mo the testjob sends you a mail everytime it is called. admin en The TestJob sends you a mail everytime it is called. the two passwords are not the same admin en The two passwords are not the same the users bellow are still members of group %1 admin en the users bellow are still members of group %1 +there already is a group with this name. userid's can not have the same name as a groupid admin en There already is a group with this name. Userid's can not have the same name as a groupid they must be removed before you can continue admin en They must be removed before you can continue this application is current admin en This application is current this application requires an upgrade admin en This application requires an upgrade