Project

General

Profile

« Previous | Next » 

Revision d3ce6a8b

Added by Jim Pingle almost 14 years ago

Revert "Another try at prventing panic on reconfig of ppp type wans. Ticket #1696"

This reverts commit afe88d69235f84530ed6386b22cfc9c488bf94c5.

View differences:

usr/local/www/wizards/setup_wizard.xml
420 420
		}
421 421
		$type = $_POST['selectedtype'];
422 422

  
423
		$wanif = "";
424
		if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) {
425
                        foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
426
                                if ($realif == $ppp['if']) {
427
                                        $ifaces = explode(",", $ppp['ports']);
428
                                        $wanif = $ifaces[0];
429
                                }
430
                        }
431
                }
432
		if (!empty($wanif)) {
433
			$config['interfaces']['wan']['if'] = $wanif;
434
			unset($config['ppps']['ppp'][$pppid]);
423
		if (!is_array($config['ppps']['ppp']))
424
			$config['ppps']['ppp'] = array();
425
		if (count($config['ppps']['ppp'])) {
426
			foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
427
				if ($ppp['ptpid'] == "0") {
428
					if ((substr($config['interfaces']['wan']['if'],0,5) == "pppoe") || (substr($config['interfaces']['wan']['if'],0,4) == "pptp")) {
429
						$oldif = explode(",", $ppp['ports']);
430
						$config['interfaces']['wan']['if'] = $oldif[0];
431
					}
432
					if ($type == "pppoe" || $type == "pptp")
433
						unset($config['ppps']['ppp'][$pppid]);
434
				}
435
			}
435 436
		}
436 437

  
437 438
		if ($type == "pppoe" || $type == "pptp") {

Also available in: Unified diff