openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit d758c7bd9a004decc1ceee659f4550b4a618dace
parent 6f0c9ce3d206f634d7a872d5da185a3561ee35e3
Author: dankert <devnull@localhost>
Date:   Wed, 10 Oct 2007 20:23:39 +0200

Anzeigen der Gruppen-Mitgliedschaften im Profil.

Diffstat:
actionClasses/ProfileAction.class.php | 11+++++++++++
actionClasses/ProfileAction.ini.php | 7+++++--
language/de.ini.php | 6++++--
objectClasses/User.class.php | 12+++++++++---
themes/default/templates/profile/groups.tpl.src.php | 6++++++
5 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/actionClasses/ProfileAction.class.php b/actionClasses/ProfileAction.class.php @@ -148,4 +148,15 @@ class ProfileAction extends Action $this->setTemplateVar( 'allstyles',$this->user->getAvailableStyles() ); } + + + + /** + * Anzeige aller Gruppen des angemeldeten Benutzers. + * + */ + function groups() + { + $this->setTemplateVar( 'groups',$this->user->getGroups() ); + } } \ No newline at end of file diff --git a/actionClasses/ProfileAction.ini.php b/actionClasses/ProfileAction.ini.php @@ -6,6 +6,9 @@ goto=edit target=saveprofile menu=edit +[groups] +menu=edit + [pwchange] target=savepw menu=edit @@ -28,4 +31,4 @@ goto=edit goto=edit [menu] -edit=edit,pwchange,mail- \ No newline at end of file +edit=edit,pwchange,mail,groups+ \ No newline at end of file diff --git a/language/de.ini.php b/language/de.ini.php @@ -889,4 +889,6 @@ MENU_INDEX_APPLICATIONS_DESC="Weitere Anwendungen starten" MENU_HELP=Hilfe MENU_HELP_DESC=Onlinehilfe MENU_FOLDER_CREATE=Neu -MENU_FOLDER_CREATE_DESC=Hinzufügen von Verzeichnis, Seite, Datei oder Verknüpfung- \ No newline at end of file +MENU_FOLDER_CREATE_DESC=Hinzufügen von Verzeichnis, Seite, Datei oder Verknüpfung +MENU_PROFILE_GROUPS=Gruppen +MENU_PROFILE_GROUPS_DESC=Mitgliedschaft in Gruppen+ \ No newline at end of file diff --git a/objectClasses/User.class.php b/objectClasses/User.class.php @@ -20,6 +20,9 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // --------------------------------------------------------------------------- // $Log$ +// Revision 1.25 2007-10-10 18:23:38 dankert +// Anzeigen der Gruppen-Mitgliedschaften im Profil. +// // Revision 1.24 2007-04-24 20:55:22 dankert // Autorisierung ?ber LDAP. // @@ -649,7 +652,6 @@ SQL $ldap_groups = $ldap->searchAttribute( $sucheFilter, $sucheAttribut ); -// Html::debug($groups,'Gruppen des Benutzers'); $sql = new Sql( <<<SQL SELECT id,name FROM {t_group} WHERE name IN({name_list}) @@ -783,7 +785,11 @@ SQL } - // Gruppen ermitteln, in denen der Benutzer Mitglied ist + /** + * Gruppen ermitteln, in denen der Benutzer Mitglied ist. + * + * @return Array mit Id:Name + */ function getGroups() { if ( !is_array($this->groups) ) @@ -1090,7 +1096,7 @@ SQL if ( eregi('\.css$',$file) ) { $file = eregi_replace('\.css$','',$file); - $allstyles[$file] = $file; + $allstyles[$file] = ucwords($file); } } closedir($handle); diff --git a/themes/default/templates/profile/groups.tpl.src.php b/themes/default/templates/profile/groups.tpl.src.php @@ -0,0 +1,6 @@ +page + window icon:user name:user_groups + list list:groups value:group + row + cell + text var:group