Projet

Général

Profil

« Précédent | Suivant » 

Révision cf4e473b

Ajouté par jim-p il y a presque 10 ans

Fix call-time pass-by-reference in UPnP

Voir les différences:

usr/local/pkg/miniupnpd.inc
71 71
		return true;	
72 72
	}
73 73

  
74
	function before_form_miniupnpd($pkg) {
74
	function before_form_miniupnpd(&$pkg) {
75 75
		global $config;
76 76

  
77 77
	}
78 78

  
79
	function validate_form_miniupnpd($post, $input_errors) {
79
	function validate_form_miniupnpd($post, &$input_errors) {
80 80
		if($post['enable'] && (!$post['enable_upnp'] && !$post['enable_natpmp']))
81 81
			$input_errors[] = 'At least one of \'UPnP\' or \'NAT-PMP\' must be allowed';
82 82
		if($post['iface_array'])
usr/local/pkg/miniupnpd.xml
146 146
		</field>	
147 147
	</fields>
148 148
	<custom_php_command_before_form>
149
		before_form_miniupnpd(&amp;$pkg);
149
		before_form_miniupnpd($pkg);
150 150
	</custom_php_command_before_form>
151 151
	<custom_php_validation_command>
152
		validate_form_miniupnpd($_POST, &amp;$input_errors);
152
		validate_form_miniupnpd($_POST, $input_errors);
153 153
	</custom_php_validation_command>
154 154
	<custom_php_resync_config_command>
155 155
		sync_package_miniupnpd();

Formats disponibles : Unified diff