Changeset be43144 in github


Ignore:
Timestamp:
Jan 12, 2012 2:29:48 AM (17 months ago)
Author:
alecpl <alec@…>
Branches:
release-0.7
Children:
63b9ff1
Parents:
89730fa
Message:
  • Applied fixes from trunk up to r5756
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rd69f8f0 rbe43144  
    22=========================== 
    33 
     4- Fix failure on MySQL database upgrade from 0.7 - text column can't have default value (#1488300) 
     5 
     6RELEASE 0.7.1 
     7------------- 
    48- Fix bug in handling of base href and inline content (#1488290) 
    59- Fix SQL Error when saving a contact with many email addresses (#1488286) 
  • SQL/mysql.initial.sql

    ra33118f rbe43144  
    102102 `del` tinyint(1) NOT NULL DEFAULT '0', 
    103103 `name` varchar(128) NOT NULL DEFAULT '', 
    104  `email` text NOT NULL DEFAULT '', 
     104 `email` text NOT NULL, 
    105105 `firstname` varchar(128) NOT NULL DEFAULT '', 
    106106 `surname` varchar(128) NOT NULL DEFAULT '', 
  • SQL/mysql.update.sql

    ra33118f rbe43144  
    216216-- Updates from version 0.7 
    217217 
     218/*!40014 SET FOREIGN_KEY_CHECKS=0 */; 
     219 
    218220ALTER TABLE `contacts` DROP FOREIGN KEY `user_id_fk_contacts`; 
    219221ALTER TABLE `contacts` DROP INDEX `user_contacts_index`; 
    220 ALTER TABLE `contacts` MODIFY `email` text NOT NULL DEFAULT ''; 
     222ALTER TABLE `contacts` MODIFY `email` text NOT NULL; 
    221223ALTER TABLE `contacts` ADD INDEX `user_contacts_index` (`user_id`,`del`); 
    222224ALTER TABLE `contacts` ADD CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`) 
     
    232234ALTER TABLE `identities` ALTER `user_id` DROP DEFAULT; 
    233235ALTER TABLE `searches` ALTER `user_id` DROP DEFAULT; 
     236 
     237/*!40014 SET FOREIGN_KEY_CHECKS=1 */; 
  • installer/rcube_install.php

    re8b2579 rbe43144  
    519519        '0.5-beta', '0.5', '0.5.1', 
    520520        '0.6-beta', '0.6', 
    521         '0.7-beta', '0.7', 
     521        '0.7-beta', '0.7', '0.7.1' 
    522522    )); 
    523523    return $select; 
  • plugins/acl/acl.js

    recfaed5 rbe43144  
    22 * ACL plugin script 
    33 * 
    4  * @version 0.6.3 
     4 * @version @package_version@ 
    55 * @author Aleksander Machniak <alec@alec.pl> 
    66 */ 
     
    180180            users.push(selection[n]); 
    181181        } 
    182         else { 
    183             row = list.rows[selection[n]].obj; 
    184             cell = $('td.user', row); 
     182        else if (row = list.rows[selection[n]]) { 
     183            cell = $('td.user', row.obj); 
    185184            if (cell.length == 1) 
    186185                users.push(cell.text()); 
     
    194193rcube_webmail.prototype.acl_remove_row = function(id) 
    195194{ 
    196     this.acl_list.remove_row(id); 
     195    var list = this.acl_list; 
     196 
     197    list.remove_row(id); 
     198    list.clear_selection(); 
     199 
    197200    // we don't need it anymore (remove id conflict) 
    198201    $('#rcmrow'+id).remove(); 
    199202    this.env.acl[id] = null; 
     203 
     204    this.enable_command('acl-delete', list.selection.length > 0); 
     205    this.enable_command('acl-edit', list.selection.length == 1); 
    200206} 
    201207 
     
    260266rcube_webmail.prototype.acl_init_form = function(id) 
    261267{ 
    262     var ul, row, val = '', type = 'user', li_elements, body = $('body'), 
     268    var ul, row, td, val = '', type = 'user', li_elements, body = $('body'), 
    263269        adv_ul = $('#advancedrights'), sim_ul = $('#simplerights'), 
    264270        name_input = $('#acluser'); 
     
    287293    li_elements.attr('checked', false); 
    288294 
    289     if (id) { 
    290         row = this.acl_list.rows[id].obj; 
     295    if (id && (row = this.acl_list.rows[id])) { 
     296        row = row.obj; 
    291297        li_elements.map(function() { 
    292             var val = this.value, td = $('td.'+this.id, row); 
     298            val = this.value; 
     299            td = $('td.'+this.id, row); 
    293300            if (td && td.hasClass('enabled')) 
    294301                this.checked = true; 
     
    300307            type = id; 
    301308    } 
     309    // mark read (lrs) rights by default 
     310    else 
     311        li_elements.filter(function() { return this.id.match(/^acl([lrs]|read)$/); }).prop('checked', true); 
    302312 
    303313    name_input.val(val); 
  • plugins/acl/acl.php

    r230ccba rbe43144  
    442442        $oldid = trim(get_input_value('_old', RCUBE_INPUT_GPC)); 
    443443 
    444         $acl = array_intersect(str_split($acl), $this->rights_supported()); 
    445  
    446         if (!empty($this->specials) && in_array($user, $this->specials)) { 
    447             $username = $this->gettext($user); 
    448         } 
    449         else { 
    450             if (!strpos($user, '@') && ($realm = $this->get_realm())) { 
    451                 $user .= '@' . rcube_idn_to_ascii(preg_replace('/^@/', '', $realm)); 
    452             } 
    453             $username = $user; 
    454         } 
    455  
    456         if ($acl && $user && $user != $_SESSION['username'] && strlen($mbox)) { 
    457             $result = $this->rc->imap->set_acl($mbox, $user, $acl); 
     444        $acl   = array_intersect(str_split($acl), $this->rights_supported()); 
     445        $users = $oldid ? array($user) : explode(',', $user); 
     446 
     447        foreach ($users as $user) { 
     448            $user = trim($user); 
     449 
     450            if (!empty($this->specials) && in_array($user, $this->specials)) { 
     451                $username = $this->gettext($user); 
     452            } 
     453            else { 
     454                if (!strpos($user, '@') && ($realm = $this->get_realm())) { 
     455                    $user .= '@' . rcube_idn_to_ascii(preg_replace('/^@/', '', $realm)); 
     456                } 
     457                $username = $user; 
     458            } 
     459 
     460            if (!$acl || !$user || !strlen($mbox)) { 
     461                continue; 
     462            } 
     463 
     464            if ($user != $_SESSION['username'] && $username != $_SESSION['username']) { 
     465                if ($this->rc->imap->set_acl($mbox, $user, $acl)) { 
     466                    $ret = array('id' => html_identifier($user), 
     467                         'username' => $username, 'acl' => implode($acl), 'old' => $oldid); 
     468                    $this->rc->output->command('acl_update', $ret); 
     469                    $result++; 
     470                } 
     471            } 
    458472        } 
    459473 
    460474        if ($result) { 
    461             $ret = array('id' => html_identifier($user), 
    462                  'username' => $username, 'acl' => implode($acl), 'old' => $oldid); 
    463             $this->rc->output->command('acl_update', $ret); 
    464475            $this->rc->output->show_message($oldid ? 'acl.updatesuccess' : 'acl.createsuccess', 'confirmation'); 
    465476        } 
     
    480491 
    481492        foreach ($user as $u) { 
     493            $u = trim($u); 
    482494            if ($this->rc->imap->delete_acl($mbox, $u)) { 
    483495                $this->rc->output->command('acl_remove_row', html_identifier($u)); 
  • program/js/list.js

    rebee2ab rbe43144  
    183183remove_row: function(uid, sel_next) 
    184184{ 
    185   if (this.rows[uid].obj) 
    186     this.rows[uid].obj.style.display = 'none'; 
     185  var obj = this.rows[uid] ? this.rows[uid].obj : null; 
     186 
     187  if (!obj) 
     188    return; 
     189 
     190  obj.style.display = 'none'; 
    187191 
    188192  if (sel_next) 
Note: See TracChangeset for help on using the changeset viewer.