Changeset 1286
- Timestamp:
- 07/21/08 11:18:05
(4 months ago)
- Author:
- scitech
- Message:
Fixed #1434: rootkit.log.php. Fixed: Subdomains and aliases emails were not removed when reseller/admin remove parent domain
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1285 |
r1286 |
|
| 1 | 1 | ispCP ω 1.0.0 Changelog |
|---|
| 2 | 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| | 3 | |
|---|
| | 4 | 2008-07-21 Daniel Andreca |
|---|
| | 5 | - GUI: |
|---|
| | 6 | * Fixed #1434: rootkit.log.php |
|---|
| | 7 | - ENGINE: |
|---|
| | 8 | * Subdomains and aliases emails were not removed when reseller/admin remove parent domain |
|---|
| 3 | 9 | |
|---|
| 4 | 10 | 2008-07-20 Daniel Andreca |
|---|
| r1148 |
r1286 |
|
| 184 | 184 | } |
|---|
| 185 | 185 | |
|---|
| | 186 | $sql = "select mail_id, mail_acc, status from mail_users where status != 'ok' and status != 'ordered' order by mail_id"; |
|---|
| | 187 | |
|---|
| | 188 | ($rs, $rdata) = doSQL($sql); |
|---|
| | 189 | |
|---|
| | 190 | my $mail_count = @$rdata; |
|---|
| | 191 | |
|---|
| | 192 | if ($mail_count > 0) { |
|---|
| | 193 | |
|---|
| | 194 | foreach (@$rdata) { |
|---|
| | 195 | |
|---|
| | 196 | my $row = $_; |
|---|
| | 197 | |
|---|
| | 198 | my ($mail_id, $mail_acc, $mail_status) = (@$row[0], @$row[1], @$row[2]); |
|---|
| | 199 | |
|---|
| | 200 | if ($mail_status eq "toadd" || $mail_status eq "change" || $mail_status eq "delete") { |
|---|
| | 201 | |
|---|
| | 202 | if (defined($main::engine_debug)) { |
|---|
| | 203 | |
|---|
| | 204 | push_el(\@main::el, 'mngr_engine()', "processing $mail_id, $mail_acc, $mail_status."); |
|---|
| | 205 | |
|---|
| | 206 | } |
|---|
| | 207 | |
|---|
| | 208 | } |
|---|
| | 209 | |
|---|
| | 210 | $rs = sys_command("$main::ispcp_mbox_mngr $mail_id 1>>$main::ispcp_mbox_mngr_stdout 2>>$main::ispcp_mbox_mngr_stderr"); |
|---|
| | 211 | |
|---|
| | 212 | if ($rs != 0) { |
|---|
| | 213 | |
|---|
| | 214 | if (-e $main::ispcp_mbox_mngr_el) { |
|---|
| | 215 | |
|---|
| | 216 | my $rs1 = undef; |
|---|
| | 217 | |
|---|
| | 218 | pop_el(\@main::el); # removing 'sys_command()' error message; |
|---|
| | 219 | |
|---|
| | 220 | ($rs1, $rdata) = get_el_error($main::ispcp_mbox_mngr_el); |
|---|
| | 221 | |
|---|
| | 222 | return $rs1 if ($rs1 != 0); |
|---|
| | 223 | |
|---|
| | 224 | push_el(\@main::el, $main::ispcp_mbox_mngr, $rdata); |
|---|
| | 225 | |
|---|
| | 226 | } |
|---|
| | 227 | |
|---|
| | 228 | if (!defined($main::engine_debug)) { |
|---|
| | 229 | |
|---|
| | 230 | del_file($main::ispcp_mbox_mngr_stdout); del_file($main::ispcp_mbox_mngr_stderr); |
|---|
| | 231 | |
|---|
| | 232 | } |
|---|
| | 233 | |
|---|
| | 234 | return $rs; |
|---|
| | 235 | |
|---|
| | 236 | } |
|---|
| | 237 | |
|---|
| | 238 | if (!defined($main::engine_debug)) { |
|---|
| | 239 | |
|---|
| | 240 | del_file($main::ispcp_mbox_mngr_stdout); del_file($main::ispcp_mbox_mngr_stderr); |
|---|
| | 241 | |
|---|
| | 242 | } |
|---|
| | 243 | |
|---|
| | 244 | } |
|---|
| | 245 | |
|---|
| | 246 | } |
|---|
| | 247 | |
|---|
| 186 | 248 | $sql = "select subdomain_id, subdomain_name, subdomain_status from subdomain where subdomain_status != 'ok' order by subdomain_id"; |
|---|
| 187 | 249 | |
|---|
| … | … | |
| 302 | 364 | } |
|---|
| 303 | 365 | |
|---|
| 304 | | |
|---|
| 305 | | } |
|---|
| 306 | | |
|---|
| 307 | | } |
|---|
| 308 | | |
|---|
| 309 | | } |
|---|
| 310 | | |
|---|
| 311 | | $sql = "select mail_id, mail_acc, status from mail_users where status != 'ok' and status != 'ordered' order by mail_id"; |
|---|
| 312 | | |
|---|
| 313 | | ($rs, $rdata) = doSQL($sql); |
|---|
| 314 | | |
|---|
| 315 | | my $mail_count = @$rdata; |
|---|
| 316 | | |
|---|
| 317 | | if ($mail_count > 0) { |
|---|
| 318 | | |
|---|
| 319 | | foreach (@$rdata) { |
|---|
| 320 | | |
|---|
| 321 | | my $row = $_; |
|---|
| 322 | | |
|---|
| 323 | | my ($mail_id, $mail_acc, $mail_status) = (@$row[0], @$row[1], @$row[2]); |
|---|
| 324 | | |
|---|
| 325 | | if ($mail_status eq "toadd" || $mail_status eq "change" || $mail_status eq "delete") { |
|---|
| 326 | | |
|---|
| 327 | | if (defined($main::engine_debug)) { |
|---|
| 328 | | |
|---|
| 329 | | push_el(\@main::el, 'mngr_engine()', "processing $mail_id, $mail_acc, $mail_status."); |
|---|
| 330 | | |
|---|
| 331 | | } |
|---|
| 332 | | |
|---|
| 333 | | } |
|---|
| 334 | | |
|---|
| 335 | | $rs = sys_command("$main::ispcp_mbox_mngr $mail_id 1>$main::ispcp_mbox_mngr_stdout 2>$main::ispcp_mbox_mngr_stderr"); |
|---|
| 336 | | |
|---|
| 337 | | if ($rs != 0) { |
|---|
| 338 | | |
|---|
| 339 | | if (-e $main::ispcp_mbox_mngr_el) { |
|---|
| 340 | | |
|---|
| 341 | | my $rs1 = undef; |
|---|
| 342 | | |
|---|
| 343 | | pop_el(\@main::el); # removing 'sys_command()' error message; |
|---|
| 344 | | |
|---|
| 345 | | ($rs1, $rdata) = get_el_error($main::ispcp_mbox_mngr_el); |
|---|
| 346 | | |
|---|
| 347 | | return $rs1 if ($rs1 != 0); |
|---|
| 348 | | |
|---|
| 349 | | push_el(\@main::el, $main::ispcp_mbox_mngr, $rdata); |
|---|
| 350 | | |
|---|
| 351 | | } |
|---|
| 352 | | |
|---|
| 353 | | if (!defined($main::engine_debug)) { |
|---|
| 354 | | |
|---|
| 355 | | del_file($main::ispcp_mbox_mngr_stdout); del_file($main::ispcp_mbox_mngr_stderr); |
|---|
| 356 | | |
|---|
| 357 | | } |
|---|
| 358 | | |
|---|
| 359 | | return $rs; |
|---|
| 360 | | |
|---|
| 361 | | } |
|---|
| 362 | | |
|---|
| 363 | | if (!defined($main::engine_debug)) { |
|---|
| 364 | | |
|---|
| 365 | | del_file($main::ispcp_mbox_mngr_stdout); del_file($main::ispcp_mbox_mngr_stderr); |
|---|
| 366 | 366 | |
|---|
| 367 | 367 | } |
|---|
| r1241 |
r1286 |
|
| 54 | 54 | $contents = ''; |
|---|
| 55 | 55 | |
|---|
| 56 | | if (file_exists($filename) && is_readable($filename)) { |
|---|
| | 56 | if (file_exists($filename) && is_readable($filename) && filesize($filename)>0) { |
|---|
| 57 | 57 | $handle = fopen($filename, 'r'); |
|---|
| 58 | 58 | |
|---|
|