Changeset 1015
- Timestamp:
- 02/23/08 10:46:37
(7 months ago)
- Author:
- rats
- Message:
* Fixed #991: Inconsistency error in edit reseller
* Added #1067: fix some configuration and makefile in freebsd distro
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1014 |
r1015 |
|
| 1 | 1 | ispCP ω 1.0.0 Changelog |
|---|
| 2 | 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| | 3 | |
|---|
| | 4 | 2008-02-23 Benedikt Heintel |
|---|
| | 5 | - GUI: |
|---|
| | 6 | * Fixed #991: Inconsistency error in edit reseller |
|---|
| | 7 | - DISTS: |
|---|
| | 8 | * Added #1067: fix some configuration and makefile in freebsd distro |
|---|
| 3 | 9 | |
|---|
| 4 | 10 | 2008-02-22 Benedikt Heintel |
|---|
| r1011 |
r1015 |
|
| 1 | 1 | .ifndef INST_PREF |
|---|
| 2 | | INST_PREF=/tmp/ispcp-1.0.0 |
|---|
| | 2 | INST_PREF=/tmp/ispcp-1.0.0 |
|---|
| 3 | 3 | .endif |
|---|
| 4 | 4 | |
|---|
| r1009 |
r1015 |
|
| 8 | 8 | cp ispcp_network $(ROOT_CONF)/rc.d/ispcp_network.sh |
|---|
| 9 | 9 | |
|---|
| 10 | | chown root:wheel $(ROOT_CONF)/ispcp_network.sh $(ROOT_CONF)/rc.d/ispcp_daemon.sh |
|---|
| 11 | | chmod 0755 $(ROOT_CONF)/ispcp_network.sh $(ROOT_CONF)/rc.d/ispcp_daemon.sh |
|---|
| | 10 | chown root:wheel $(ROOT_CONF)/rc.d/ispcp_network.sh $(ROOT_CONF)/rc.d/ispcp_daemon.sh |
|---|
| | 11 | chmod 0755 $(ROOT_CONF)/rc.d/ispcp_network.sh $(ROOT_CONF)/rc.d/ispcp_daemon.sh |
|---|
| 12 | 12 | |
|---|
| 13 | 13 | uninstall: |
|---|
| r1001 |
r1015 |
|
| 17 | 17 | DEFAULT_ADMIN_ADDRESS = |
|---|
| 18 | 18 | |
|---|
| 19 | | SERVER_HOSTNAME = debian |
|---|
| | 19 | SERVER_HOSTNAME = freebsd |
|---|
| 20 | 20 | |
|---|
| 21 | 21 | BASE_SERVER_IP = 127.0.0.1 |
|---|
| … | … | |
| 207 | 207 | APACHE_SUEXEC_MIN_UID = 2000 |
|---|
| 208 | 208 | |
|---|
| 209 | | APACHE_USER = www-data |
|---|
| 210 | | |
|---|
| 211 | | APACHE_GROUP = www-data |
|---|
| | 209 | APACHE_USER = www |
|---|
| | 210 | |
|---|
| | 211 | APACHE_GROUP = www |
|---|
| 212 | 212 | |
|---|
| 213 | 213 | # |
|---|
| r1014 |
r1015 |
|
| 274 | 274 | |
|---|
| 275 | 275 | if ($err == '_off_') { |
|---|
| 276 | | if ($umail_max != $rmail_current && $umail_current > 0) |
|---|
| | 276 | // Hot fix: |
|---|
| | 277 | // Commented out; we cannot calculate how many domains are added: 3 Domains are created by default |
|---|
| | 278 | // but user can delete them and there would be a new inconsitency if so. |
|---|
| | 279 | // TODO: Fix it! |
|---|
| | 280 | /* if ($umail_max != $rmail_current && $umail_current > 0) |
|---|
| 277 | 281 | $err = tr('Inconsistency between current_mail_cnt and actual mail count: %1$d != %2$d', $umail_max, $rmail_current); |
|---|
| 278 | | else |
|---|
| | 282 | else */ |
|---|
| 279 | 283 | calculate_new_reseller_vals($reseller_max_mail_cnt, $rmail_current, $rmail_max, $umail_current, $umail_max, $umail_uf, $err, tr('Mail')); |
|---|
| 280 | 284 | } |
|---|
| … | … | |
| 301 | 305 | if ($err == '_off_') { |
|---|
| 302 | 306 | calculate_new_reseller_vals($reseller_max_disk, $rdisk_current, $rdisk_max, $udisk_current / 1024 / 1024, $udisk_max, $udisk_uf, $err, tr('Disk storage')); |
|---|
| 303 | | // ($data, $r, &$rmax, $u, $umax, $uf, &$err, $obj) |
|---|
| | 307 | // ($data, $r, &$rmax, $u, $umax, $uf, &$err, $obj) |
|---|
| 304 | 308 | } |
|---|
| 305 | 309 | |
|---|
| … | … | |
| 317 | 321 | |
|---|
| 318 | 322 | /** |
|---|
| 319 | | * Function that seems to check if it is safe to set the new reseller limits (per 'service', e.g. mail, domains, etc) |
|---|
| 320 | | * |
|---|
| 321 | | * @param int $new_limit New limit |
|---|
| 322 | | * @param int $r Service usage information of reseller (assigned, possibly being used or not) |
|---|
| 323 | | * @param int $rmax Current reseller's limit |
|---|
| 324 | | * @param int $u Service usage information of reseller's users (assigned, possibly being used or not) |
|---|
| 325 | | * @param int $umax Current reseller users' limit |
|---|
| 326 | | * @param int $unlimited Unlimited: _on_, limited: _off_ |
|---|
| 327 | | * @param string $ &$err Error message returned in case something is not good |
|---|
| 328 | | * @param string $service The 'service' name, like domains, subdomains, mail accounts, sql users, etc |
|---|
| 329 | | */ |
|---|
| | 323 | * Function that seems to check if it is safe to set the new reseller limits |
|---|
| | 324 | * (per 'service', e.g. mail, domains, etc) |
|---|
| | 325 | * |
|---|
| | 326 | * @param int $new_limit New limit |
|---|
| | 327 | * @param int $r Service usage information of reseller (assigned, possibly being used or not) |
|---|
| | 328 | * @param int $rmax Current reseller's limit |
|---|
| | 329 | * @param int $u Service usage information of reseller's users (assigned, possibly being used or not) |
|---|
| | 330 | * @param int $umax Current reseller users' limit |
|---|
| | 331 | * @param int $unlimited Unlimited: _on_, limited: _off_ |
|---|
| | 332 | * @param string $ &$err Error message returned in case something is not good |
|---|
| | 333 | * @param string $service The 'service' name, like domains, subdomains, mail accounts, sql users, etc |
|---|
| | 334 | */ |
|---|
| 330 | 335 | function calculate_new_reseller_vals ($new_limit, $r, &$rmax, $u, $umax, $unlimited, &$err, $service) { |
|---|
| 331 | 336 | if ($unlimited == '_off_') { |
|---|
| … | … | |
| 735 | 740 | 'TR_EMAIL' => tr('E-mail'), |
|---|
| 736 | 741 | 'TR_UNLIMITED' => tr('unlimited'), |
|---|
| 737 | | 'TR_MAX_DOMAIN_COUNT' => tr('Domains limit<br><i>(0 unlimited)</i>'), |
|---|
| | 742 | 'TR_MAX_DOMAIN_COUNT' => tr('Domains limit<br><i>((-1 disabled, 0 unlimited)</i>'), |
|---|
| 738 | 743 | 'TR_MAX_SUBDOMAIN_COUNT' => tr('Subdomains limit<br><i>(-1 disabled, 0 unlimited)</i>'), |
|---|
| 739 | 744 | 'TR_MAX_ALIASES_COUNT' => tr('Aliases limit<br><i>(-1 disabled, 0 unlimited)</i>'), |
|---|
| r1014 |
r1015 |
|
| 388 | 388 | 'TR_TOTAL_MAIL_ACCOUNTS' => tr('Mails total'), |
|---|
| 389 | 389 | 'TR_DELETE' => tr('Delete'), |
|---|
| 390 | | 'TR_MESSAGE_DELETE' => tr('Are you sure you want to delete', true), |
|---|
| | 390 | 'TR_MESSAGE_DELETE' => tr('Are you sure you want to delete %s', true, $dmn_name), |
|---|
| 391 | 391 | ) |
|---|
| 392 | 392 | ); |
|---|
| r1014 |
r1015 |
|
| 282 | 282 | ISPCP_SQL_QUERY; |
|---|
| 283 | 283 | |
|---|
| 284 | | $res = exec_query($sql, $query, array($dmn_user_name, $inpass, $reseller_id, $first_name, $last_name, |
|---|
| 285 | | $firm, $zip, $city, $country, $user_email, $phone, $fax, $street_one, $street_two, $customer_id, $gender)); |
|---|
| | 284 | $res = exec_query($sql, $query, array( |
|---|
| | 285 | $dmn_user_name, $inpass, $reseller_id, |
|---|
| | 286 | $first_name, $last_name, $firm, |
|---|
| | 287 | $zip, $city, $country, |
|---|
| | 288 | $user_email, $phone, $fax, |
|---|
| | 289 | $street_one, $street_two, $customer_id, |
|---|
| | 290 | $gender)); |
|---|
| 286 | 291 | |
|---|
| 287 | 292 | print $sql->ErrorMsg(); |
|---|
| … | … | |
| 312 | 317 | ISPCP_SQL_QUERY; |
|---|
| 313 | 318 | |
|---|
| 314 | | $res = exec_query($sql, $query, array($dmn_name, |
|---|
| 315 | | $record_id, |
|---|
| 316 | | $reseller_id, |
|---|
| 317 | | $mail, |
|---|
| 318 | | $ftp, |
|---|
| 319 | | $traff, |
|---|
| 320 | | $sql_db, |
|---|
| 321 | | $sql_user, |
|---|
| 322 | | $sub, |
|---|
| 323 | | $als, |
|---|
| 324 | | $domain_ip, |
|---|
| 325 | | $disk, |
|---|
| 326 | | $php, |
|---|
| 327 | | $cgi)); |
|---|
| | 319 | $res = exec_query($sql, $query, array( |
|---|
| | 320 | $dmn_name, $record_id, |
|---|
| | 321 | $reseller_id, $mail, |
|---|
| | 322 | $ftp, $traff, |
|---|
| | 323 | $sql_db, $sql_user, |
|---|
| | 324 | $sub, $als, |
|---|
| | 325 | $domain_ip, $disk, |
|---|
| | 326 | $php, $cgi)); |
|---|
| 328 | 327 | $dmn_id = $sql->Insert_ID(); |
|---|
| 329 | 328 | |
|---|
| r949 |
r1015 |
|
| 80 | 80 | <tr> |
|---|
| 81 | 81 | <td width="25"> </td> |
|---|
| 82 | | <td class="content2" width="200">{TR_MAX_DOMAIN_COUNT}<br> |
|---|
| 83 | | <b><i>(0 {TR_UNLIMITED})</i></b></td> |
|---|
| | 82 | <td class="content2" width="200">{TR_MAX_DOMAIN_COUNT}</td> |
|---|
| 84 | 83 | <td class="content"><input type="text" name=nreseller_max_domain_cnt value="{MAX_DOMAIN_COUNT}" style="width:140px" class="textinput"> |
|---|
| 85 | 84 | </td> |
|---|
| r1009 |
r1015 |
|
| 30 | 30 | |
|---|
| 31 | 31 | #ifneq (,$(findstring noopt,$(DAEMON_OPTIONS))) |
|---|
| 32 | | # CFLAGS += -O0 |
|---|
| | 32 | #CFLAGS += -O0 |
|---|
| 33 | 33 | #else |
|---|
| 34 | | CFLAGS += -O3 |
|---|
| | 34 | CFLAGS += -O3 |
|---|
| 35 | 35 | endif |
|---|
| 36 | 36 | #endif |
|---|
|