Fixed bug #8578: Umlauts get displayed wrong in Web>Access module after updating...
authorBenni Mack <benni.mack@typo3.org>
Sun, 21 Sep 2008 05:29:23 +0000 (05:29 +0000)
committerBenni Mack <benni.mack@typo3.org>
Sun, 21 Sep 2008 05:29:23 +0000 (05:29 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4158 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/mod/web/perm/class.sc_mod_web_perm_ajax.php
typo3/mod/web/perm/perm.js

index 43804bc..8495827 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-09-21  Benjamin Mack  <benni@typo3.org>
+
+       * Fixed bug #8578: Umlauts get displayed wrong in Web>Access module after updating rights (Thanks to Tobias Liebig and Susanne Moog)
+
 2008-09-20  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Fixed bug #9384: FE session hijacking
index 3d24011..c83d994 100644 (file)
@@ -93,20 +93,24 @@ class SC_mod_web_perm_ajax {
                $this->conf['editLockState'] = intval(t3lib_div::_POST('editLockState'));
 
                        // User: Replace some parts of the posted values
-               $this->conf['owner_data']             = urldecode(t3lib_div::_POST('owner_data'));
-               $this->conf['owner_data']         = str_replace('new_page_owner=', '', $this->conf['owner_data']);
-               $this->conf['owner_data']         = str_replace('%3B', ';', $this->conf['owner_data']);
-               $temp_owner_data                  = explode(';', $this->conf['owner_data']);
-               $this->conf['new_owner_uid']      = intval($temp_owner_data[0]);
-               $this->conf['new_owner_username'] = htmlspecialchars($temp_owner_data[1]);
+               $this->conf['new_owner_uid'] = intval(t3lib_div::_POST('newOwnerUid'));
+               $temp_owner_data = t3lib_BEfunc::getUserNames(
+                       'username, uid',
+                       ' AND uid = ' . $this->conf['new_owner_uid']
+               );
+               $this->conf['new_owner_username'] = htmlspecialchars(
+                       $temp_owner_data[$this->conf['new_owner_uid']]['username']
+               );
 
                        // Group: Replace some parts of the posted values
-               $this->conf['group_data']         = urldecode(t3lib_div::_POST('group_data'));
-               $this->conf['group_data']         = str_replace('new_page_group=', '', $this->conf['group_data']);
-               $this->conf['group_data']         = str_replace('%3B', ';', $this->conf['group_data']);
-               $temp_group_data                  = explode(';', $this->conf['group_data']);
-               $this->conf['new_group_uid']      = intval($temp_group_data[0]);
-               $this->conf['new_group_username'] = htmlspecialchars($temp_group_data[1]);
+               $this->conf['new_group_uid'] = intval(t3lib_div::_POST('newGroupUid'));
+               $temp_group_data             = t3lib_BEfunc::getGroupNames(
+                       'title,uid',
+                       ' AND uid = ' . $this->conf['new_group_uid']
+               );
+               $this->conf['new_group_username'] = htmlspecialchars(
+                       $temp_group_data[$this->conf['new_group_uid']]['title']
+               );
 
        }
 
@@ -250,7 +254,7 @@ class SC_mod_web_perm_ajax {
                        // Loop through the users
                foreach ($beUsers as $uid => $row) {
                        $selected = ($uid == $ownerUid  ? ' selected="selected"' : '');
-                       $options .= '<option value="'.$uid.';'.htmlspecialchars($row['username']).'"'.$selected.'>'.htmlspecialchars($row['username']).'</option>';
+                       $options .= '<option value="'.$uid.'"'.$selected.'>'.htmlspecialchars($row['username']).'</option>';
                }
 
                $elementId = 'o_'.$page;
@@ -294,7 +298,7 @@ class SC_mod_web_perm_ajax {
                        } else {
                                $selected = '';
                        }
-                       $options .= '<option value="'.$uid.';'.htmlspecialchars($row['title']).'"'.$selected.'>'.htmlspecialchars($row['title']).'</option>';
+                       $options .= '<option value="'.$uid.'"'.$selected.'>'.htmlspecialchars($row['title']).'</option>';
                }
 
                        // If the group was not set AND there is a group for the page
index c9145bf..a79d0cf 100644 (file)
@@ -6,7 +6,7 @@
 *  Copyright notice
 *
 *  (c) 2007-2008       Andreas Beutel <typo3@mehrwert.de>
-*  (c) 2007    Benjamin Mack <www.xnos.org>
+*  (c) 2007-2008       Benjamin Mack <benni . typo3 . o)rg>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -82,7 +82,7 @@ var WebPermissions = {
                // Set the new owner of a page by executing an ajax call
        changeOwner: function(page, ownerUid, elementID) {
                new Ajax.Updater($(elementID), this.thisScript, {
-                       parameters: { ajaxID: this.ajaxID, action: 'change_owner', page: page, ownerUid: ownerUid, owner_data: $('new_page_owner').serialize(true) }
+                       parameters: { ajaxID: this.ajaxID, action: 'change_owner', page: page, ownerUid: ownerUid, newOwnerUid: $('new_page_owner').value }
                });
        },
 
@@ -102,7 +102,7 @@ var WebPermissions = {
                // Set the new group by executing an ajax call
        changeGroup: function(page, groupUid, elementID) {
                new Ajax.Updater($(elementID), this.thisScript, {
-                       parameters: { ajaxID: this.ajaxID, action: 'change_group', page: page, groupUid: groupUid, group_data: $('new_page_group').serialize(true) }
+                       parameters: { ajaxID: this.ajaxID, action: 'change_group', page: page, groupUid: groupUid, newGroupUid: $('new_page_group').value }
                });
        },