Project

General

Profile

« Previous | Next » 

Revision bf81eb22

Added by Ermal LUÇI almost 14 years ago

Be correct on teh variable scope

View differences:

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

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

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

Also available in: Unified diff