Changeset 1083
- 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
| r1082 |
r1083 |
|
| 1 | 1 | ispCP ω 1.0.0 Changelog |
|---|
| 2 | 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| | 3 | |
|---|
| | 4 | 2008-03-27 Benedikt Heintel |
|---|
| | 5 | - DATABASE: |
|---|
| | 6 | * Fixed #1139: order settings only for one reseller |
|---|
| 3 | 7 | |
|---|
| 4 | 8 | 2008-03-26 Benedikt Heintel |
|---|
| r1043 |
r1083 |
|
| 282 | 282 | \tispCP '$main::cfg{'Version'}' Setup completed successfully! |
|---|
| 283 | 283 | |
|---|
| 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. |
|---|
| 285 | 286 | |
|---|
| 286 | 287 | MSG |
|---|
| r1082 |
r1083 |
|
| 908 | 908 | } |
|---|
| 909 | 909 | |
|---|
| | 910 | sub 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 | |
|---|
| | 932 | MSG |
|---|
| | 933 | print STDOUT $shut_down_message; |
|---|
| | 934 | |
|---|
| | 935 | push_el(\@main::el, 'setup_shut_down()', 'Ending...'); |
|---|
| | 936 | return 0; |
|---|
| | 937 | } |
|---|
| | 938 | |
|---|
| 910 | 939 | sub exit_werror { |
|---|
| 911 | 940 | my ($msg, $code) = @_; |
|---|
| r1023 |
r1083 |
|
| 113 | 113 | |
|---|
| 114 | 114 | $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')); |
|---|
| 116 | 116 | } |
|---|
| 117 | 117 | |
|---|
| … | … | |
| 142 | 142 | $sqlUpd[] = "UPDATE `mail_users`, `subdomain`, `domain` |
|---|
| 143 | 143 | 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` |
|---|
| 145 | 145 | AND `mail_users`.`domain_id` = `domain`.`domain_id` |
|---|
| 146 | 146 | AND (`mail_type` = 'subdom_mail' OR `mail_type` = 'subdom_forward')"; |
|---|
| … | … | |
| 161 | 161 | $sqlUpd[] = "UPDATE `mail_users`, `subdomain`, `domain` |
|---|
| 162 | 162 | 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` |
|---|
| 164 | 164 | AND `mail_users`.`domain_id` = `domain`.`domain_id` |
|---|
| 165 | 165 | AND `mail_type` = 'subdom_catchall'"; |
|---|
| 166 | 166 | |
|---|
| 167 | | foreach($sqlUpd as $s) // go for it: run them all |
|---|
| 168 | | { |
|---|
| | 167 | // go for it: run them all |
|---|
| | 168 | foreach($sqlUpd as $s) { |
|---|
| 169 | 169 | $sql->Execute($s); |
|---|
| 170 | 170 | } |
|---|
| … | … | |
| 172 | 172 | } // end of _databaseUpdate_2 |
|---|
| 173 | 173 | |
|---|
| | 174 | /* |
|---|
| | 175 | * Fix for Ticket #1139 http://www.isp-control.net/ispcp/ticket/1139 |
|---|
| | 176 | * written by Benedikt Heintel, 2008-03-27 |
|---|
| | 177 | */ |
|---|
| | 178 | function _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 |
|---|
| 174 | 185 | ?> |
|---|
|