Changeset 1083

Show
Ignore:
Timestamp:
03/27/08 12:59:40 (8 months ago)
Author:
rats
Message:

Fixed #1139: order settings only for one reseller

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r1082 r1083  
    11ispCP ω 1.0.0 Changelog 
    22~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     3 
     42008-03-27 Benedikt Heintel 
     5        - DATABASE: 
     6                * Fixed #1139: order settings only for one reseller 
    37 
    482008-03-26 Benedikt Heintel 
  • trunk/engine/setup/ispcp-setup

    r1043 r1083  
    282282\tispCP '$main::cfg{'Version'}' Setup completed successfully! 
    283283 
    284 \tPlease type http://$main::ua{'admin_vhost'} in your browser! 
     284\tPlease type http://$main::ua{'admin_vhost'} in your browser, 
     285\tlog in with your Administrator Account and perform Database Updates if exists. 
    285286 
    286287MSG 
  • trunk/engine/setup/ispcp-update

    r1082 r1083  
    908908} 
    909909 
     910sub update_shut_down { 
     911        push_el(\@main::el, 'setup_shut_down()', 'Starting...'); 
     912 
     913        my ($rs, $rdata) = (undef, undef); 
     914 
     915        my $cmd = "$main::cfg{'CMD_SHELL'} $main::cfg{'ROOT_DIR'}/engine/setup/set-gui-permissions.sh"; 
     916        $rs = sys_command($cmd); 
     917        return $rs if ($rs != 0); 
     918 
     919        $cmd = "$main::cfg{'CMD_SHELL'} $main::cfg{'ROOT_DIR'}/engine/setup/set-engine-permissions.sh"; 
     920        $rs = sys_command($cmd); 
     921        return $rs if ($rs != 0); 
     922 
     923        my $shut_down_message = <<MSG; 
     924 
     925\tCongratulations! 
     926 
     927\tispCP '$main::cfg{'Version'}' Update completed successfully! 
     928 
     929\tPlease type http://$main::ua{'admin_vhost'} in your browser, 
     930\tlog in with your Administrator Account and perform Database Updates if exists. 
     931 
     932MSG 
     933        print STDOUT $shut_down_message; 
     934 
     935        push_el(\@main::el, 'setup_shut_down()', 'Ending...'); 
     936        return 0; 
     937} 
     938 
    910939sub exit_werror { 
    911940    my ($msg, $code) = @_; 
  • trunk/gui/include/database-update-functions.php

    r1023 r1083  
    113113 
    114114        $query = "INSERT INTO config (name, value) VALUES (? , ?)"; 
    115         $rs = exec_query($sql, $query, array('DATABASE_REVISION', '1')); 
     115        exec_query($sql, $query, array('DATABASE_REVISION', '1')); 
    116116} 
    117117 
     
    142142        $sqlUpd[] = "UPDATE `mail_users`, `subdomain`, `domain` 
    143143                SET `mail_addr` = CONCAT(`mail_acc`,'@',`subdomain_name`,'.',`domain_name`) 
    144                 WHERE `mail_users`.`domain_id` = `subdomain`.`domain_id` AND `mail_users`.`sub_id` = `subdomain`.`subdomain_id`  
     144                WHERE `mail_users`.`domain_id` = `subdomain`.`domain_id` AND `mail_users`.`sub_id` = `subdomain`.`subdomain_id` 
    145145                        AND `mail_users`.`domain_id` = `domain`.`domain_id` 
    146146                        AND (`mail_type` = 'subdom_mail' OR `mail_type` = 'subdom_forward')"; 
     
    161161        $sqlUpd[] = "UPDATE `mail_users`, `subdomain`, `domain` 
    162162                SET `mail_addr` = CONCAT('@',`subdomain_name`,'.',`domain_name`) 
    163                 WHERE `mail_users`.`domain_id` = `subdomain`.`domain_id` AND `mail_users`.`sub_id` = `subdomain`.`subdomain_id`  
     163                WHERE `mail_users`.`domain_id` = `subdomain`.`domain_id` AND `mail_users`.`sub_id` = `subdomain`.`subdomain_id` 
    164164                        AND `mail_users`.`domain_id` = `domain`.`domain_id` 
    165165                        AND `mail_type` = 'subdom_catchall'"; 
    166166 
    167         foreach($sqlUpd as $s) // go for it: run them all 
    168        
     167        // go for it: run them all 
     168        foreach($sqlUpd as $s)
    169169                $sql->Execute($s); 
    170170        } 
     
    172172} // end of _databaseUpdate_2 
    173173 
     174/* 
     175 * Fix for Ticket #1139 http://www.isp-control.net/ispcp/ticket/1139 
     176 * written by Benedikt Heintel, 2008-03-27 
     177 */ 
     178function _databaseUpdate_3() { 
     179        global $sql; // we need the gloabl database connection 
     180 
     181        $query = "ALTER IGNORE TABLE `orders_settings` CHANGE `id` `id` int(10) unsigned NOT NULL auto_increment"; 
     182        $sql->Execute($query); 
     183 
     184} // end of _databaseUpdate_3 
    174185?>