Project

General

Profile

« Previous | Next » 

Revision 38fb1109

Added by Vinicius Coque about 15 years ago

Fixing gettext() implementation for required fields

View differences:

usr/local/www/system.php
106 106

  
107 107
	/* input validation */
108 108
	$reqdfields = split(" ", "hostname domain");
109
	$reqdfieldsn = split(",", "Hostname,Domain");
109
	$reqdfieldsn = array(gettext("Hostname"),gettext("Domain"));
110 110

  
111 111
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
112 112

  
usr/local/www/system_camanager.php
118 118
	/* input validation */
119 119
	if ($pconfig['method'] == "existing") {
120 120
		$reqdfields = explode(" ", "name cert");
121
		$reqdfieldsn = explode(",", "Descriptive name,Certificate data");
121
		$reqdfieldsn = array(
122
				gettext("Descriptive name"),
123
				gettext("Certificate data"));
122 124
	}
123 125
	if ($pconfig['method'] == "internal") {
124 126
		$reqdfields = explode(" ",
125 127
				"name keylen lifetime dn_country dn_state dn_city ".
126 128
				"dn_organization dn_email dn_commonname");
127
		$reqdfieldsn = explode(",",
128
				gettext("Descriptive name,Key length,Lifetime,").
129
				gettext("Distinguished name Country Code,").
130
				gettext("Distinguished name State or Province,").
131
				gettext("Distinguished name City,").
132
				gettext("Distinguished name Organization,").
133
				gettext("Distinguished name Email Address,").
129
		$reqdfieldsn = array(
130
				gettext("Descriptive name"),
131
				gettext("Key length"),
132
				gettext("Lifetime"),
133
				gettext("Distinguished name Country Code"),
134
				gettext("Distinguished name State or Province"),
135
				gettext("Distinguished name City"),
136
				gettext("Distinguished name Organization"),
137
				gettext("Distinguished name Email Address"),
134 138
				gettext("Distinguished name Common Name"));
135 139
	}
136 140

  
usr/local/www/system_certmanager.php
150 150
		if ($pconfig['method'] == "existing") {
151 151
			$reqdfields = explode(" ",
152 152
					"name cert key");
153
			$reqdfieldsn = explode(",",
154
					gettext("Descriptive name,Certificate data,Key data"));
153
			$reqdfieldsn = array(
154
					gettext("Descriptive name"),
155
					gettext("Certificate data"),
156
					gettext("Key data"));
155 157
		}
156 158

  
157 159
		if ($pconfig['method'] == "internal") {
158 160
			$reqdfields = explode(" ",
159 161
					"name caref keylen lifetime dn_country dn_state dn_city ".
160 162
					"dn_organization dn_email dn_commonname");
161
			$reqdfieldsn = explode(",",
162
					gettext("Descriptive name,Certificate authority,Key length,Lifetime,").
163
					gettext("Distinguished name Country Code,").
164
					gettext("Distinguished name State or Province,").
165
					gettext("Distinguished name City,").
166
					gettext("Distinguished name Organization,").
167
					gettext("Distinguished name Email Address,").
163
			$reqdfieldsn = array(
164
					gettext("Descriptive name"),
165
					gettext("Certificate authority"),
166
					gettext("Key length"),
167
					gettext("Lifetime"),
168
					gettext("Distinguished name Country Code"),
169
					gettext("Distinguished name State or Province"),
170
					gettext("Distinguished name City"),
171
					gettext("Distinguished name Organization"),
172
					gettext("Distinguished name Email Address"),
168 173
					gettext("Distinguished name Common Name"));
169 174
		}
170 175

  
......
172 177
			$reqdfields = explode(" ",
173 178
					"name csr_keylen csr_dn_country csr_dn_state csr_dn_city ".
174 179
					"csr_dn_organization csr_dn_email csr_dn_commonname");
175
			$reqdfieldsn = explode(",",
176
					gettext("Descriptive name,Key length,").
177
					gettext("Distinguished name Country Code,").
178
					gettext("Distinguished name State or Province,").
179
					gettext("Distinguished name City,").
180
					gettext("Distinguished name Organization,").
181
					gettext("Distinguished name Email Address,").
180
			$reqdfieldsn = array(
181
					gettext("Descriptive name"),
182
					gettext("Key length"),
183
					gettext("Distinguished name Country Code"),
184
					gettext("Distinguished name State or Province"),
185
					gettext("Distinguished name City"),
186
					gettext("Distinguished name Organization"),
187
					gettext("Distinguished name Email Address"),
182 188
					gettext("Distinguished name Common Name"));
183 189
		}
184 190

  
......
245 251

  
246 252
		/* input validation */
247 253
		$reqdfields = explode(" ", "name cert");
248
		$reqdfieldsn = explode(",", gettext("Descriptive name,Final Certificate data"));
254
		$reqdfieldsn = explode(",", gettext("Descriptive name") . "," . gettext("Final Certificate data"));
249 255

  
250 256
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
251 257

  
usr/local/www/system_routes_edit.php
88 88

  
89 89
	/* input validation */
90 90
	$reqdfields = explode(" ", "network network_subnet gateway");
91
	$reqdfieldsn = explode(",", gettext("Destination network,Destination network bit count,Gateway"));		
91
	$reqdfieldsn = explode(",",
92
			gettext("Destination network") . "," .
93
			gettext("Destination network bit count") . "," .
94
			gettext("Gateway"));		
92 95
	
93 96
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
94 97
	

Also available in: Unified diff