@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | public $VendorSpecific; |
42 | 42 | |
43 | 43 | public function writeDeviceInfo() { |
44 | - $ssid_ct=count($this->attributes['internal:SSID']); |
|
44 | + $ssid_ct = count($this->attributes['internal:SSID']); |
|
45 | 45 | $out = "<p>"; |
46 | - $out .= sprintf(_("This is a generic configuration file in the IETF <a href='%s'>EAP Metadata -00</a> XML format."),"https://tools.ietf.org/html/draft-winter-opsawg-eap-metadata-00"); |
|
46 | + $out .= sprintf(_("This is a generic configuration file in the IETF <a href='%s'>EAP Metadata -00</a> XML format."), "https://tools.ietf.org/html/draft-winter-opsawg-eap-metadata-00"); |
|
47 | 47 | return $out; |
48 | 48 | } |
49 | 49 | |
@@ -54,38 +54,38 @@ discard block |
||
54 | 54 | $eap_idp = new EAPIdentityProvider(); |
55 | 55 | // $eap_idp->setProperty('ValidUntil',$this->getValidUntil()); |
56 | 56 | // ProviderInfo-> |
57 | - $eap_idp->setProperty('ProviderInfo',$this->getProviderInfo()); |
|
57 | + $eap_idp->setProperty('ProviderInfo', $this->getProviderInfo()); |
|
58 | 58 | // TODO $eap_idp->setProperty('VendorSpecific',$this->getVendorSpecific()); |
59 | 59 | //AuthenticationMethods |
60 | 60 | // TODO |
61 | 61 | //ID attribute |
62 | 62 | //lang attribute |
63 | 63 | $authmethods = []; |
64 | - if($this->all_eaps) { |
|
64 | + if ($this->all_eaps) { |
|
65 | 65 | $EAPs = []; |
66 | 66 | foreach ($attr['all_eaps'] as $eap) { |
67 | - if(in_array($eap, $this->supportedEapMethods)) |
|
67 | + if (in_array($eap, $this->supportedEapMethods)) |
|
68 | 68 | $EAPs[] = $eap; |
69 | 69 | } |
70 | 70 | } else |
71 | - $EAPs = [ $this->selected_eap]; |
|
71 | + $EAPs = [$this->selected_eap]; |
|
72 | 72 | |
73 | 73 | foreach ($EAPs as $eap) { |
74 | 74 | $authmethods[] = $this->getAuthMethod($eap); |
75 | 75 | } |
76 | 76 | $authenticationmethods = new AuthenticationMethods(); |
77 | - $authenticationmethods->setProperty('AuthenticationMethods',$authmethods); |
|
78 | - $eap_idp->setProperty('AuthenticationMethods',$authenticationmethods); |
|
79 | - if(empty($attr['internal:realm'][0])) { |
|
80 | - $eap_idp->setAttribute('ID','undefined'); |
|
81 | - $eap_idp->setAttribute('namespace','urn:undefined'); |
|
77 | + $authenticationmethods->setProperty('AuthenticationMethods', $authmethods); |
|
78 | + $eap_idp->setProperty('AuthenticationMethods', $authenticationmethods); |
|
79 | + if (empty($attr['internal:realm'][0])) { |
|
80 | + $eap_idp->setAttribute('ID', 'undefined'); |
|
81 | + $eap_idp->setAttribute('namespace', 'urn:undefined'); |
|
82 | 82 | } else { |
83 | - $eap_idp->setAttribute('ID',$attr['internal:realm'][0]); |
|
84 | - $eap_idp->setAttribute('namespace',$NAMESPACE); |
|
83 | + $eap_idp->setAttribute('ID', $attr['internal:realm'][0]); |
|
84 | + $eap_idp->setAttribute('namespace', $NAMESPACE); |
|
85 | 85 | } |
86 | - if($this->lang_scope === 'single') |
|
87 | - $eap_idp->setAttribute('lang',$this->lang_index); |
|
88 | - $eap_idp->setAttribute('version','1'); |
|
86 | + if ($this->lang_scope === 'single') |
|
87 | + $eap_idp->setAttribute('lang', $this->lang_index); |
|
88 | + $eap_idp->setAttribute('version', '1'); |
|
89 | 89 | |
90 | 90 | |
91 | 91 | // EAPIdentityProvider end |
@@ -95,16 +95,16 @@ discard block |
||
95 | 95 | $rootname = 'EAPIdentityProviderList'; |
96 | 96 | $root = new SimpleXMLElement("<?xml version=\"1.0\" encoding=\"utf-8\" ?><{$rootname} xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"eap-metadata.xsd\"></{$rootname}>"); |
97 | 97 | |
98 | - marshalObject($root,$eap_idp); |
|
98 | + marshalObject($root, $eap_idp); |
|
99 | 99 | $dom = dom_import_simplexml($root)->ownerDocument; |
100 | - $res = $dom->schemaValidate(CAT::$root .'/devices/xml/eap-metadata.xsd'); |
|
101 | - $f = fopen($this->installerBasename.'.eap-config',"w"); |
|
102 | - fwrite($f,$dom->saveXML()); |
|
100 | + $res = $dom->schemaValidate(CAT::$root . '/devices/xml/eap-metadata.xsd'); |
|
101 | + $f = fopen($this->installerBasename . '.eap-config', "w"); |
|
102 | + fwrite($f, $dom->saveXML()); |
|
103 | 103 | fclose($f); |
104 | - return($this->installerBasename.'.eap-config'); |
|
104 | + return($this->installerBasename . '.eap-config'); |
|
105 | 105 | } |
106 | 106 | |
107 | -private $AttributeNames = [ |
|
107 | +private $AttributeNames = [ |
|
108 | 108 | 'support:email' => 'EmailAddress', |
109 | 109 | 'support:url' => 'WebAddress', |
110 | 110 | 'support:phone' => 'Phone', |
@@ -114,10 +114,10 @@ discard block |
||
114 | 114 | ]; |
115 | 115 | |
116 | 116 | private function getSimpleAttribute($attr_name) { |
117 | - if(isset($this->attributes[$attr_name][0]) && $this->attributes[$attr_name][0]) { |
|
117 | + if (isset($this->attributes[$attr_name][0]) && $this->attributes[$attr_name][0]) { |
|
118 | 118 | $a = $this->attributes[$attr_name]; |
119 | - if(! isset($this->AttributeNames[$attr_name])) { |
|
120 | - debug(4,"Missing class definition for $attr_name\n"); |
|
119 | + if (!isset($this->AttributeNames[$attr_name])) { |
|
120 | + debug(4, "Missing class definition for $attr_name\n"); |
|
121 | 121 | return; |
122 | 122 | } |
123 | 123 | $class_name = $this->AttributeNames[$attr_name]; |
@@ -130,17 +130,17 @@ discard block |
||
130 | 130 | |
131 | 131 | |
132 | 132 | private function getSimpleMLAttribute($attr_name) { |
133 | - if(isset($this->attributes[$attr_name][0]) && $this->attributes[$attr_name][0]) { |
|
133 | + if (isset($this->attributes[$attr_name][0]) && $this->attributes[$attr_name][0]) { |
|
134 | 134 | $a = $this->attributes[$attr_name]; |
135 | - if(! isset($this->AttributeNames[$attr_name])) { |
|
136 | - debug(4,"Missing class definition for $attr_name\n"); |
|
135 | + if (!isset($this->AttributeNames[$attr_name])) { |
|
136 | + debug(4, "Missing class definition for $attr_name\n"); |
|
137 | 137 | return; |
138 | 138 | } |
139 | 139 | $class_name = $this->AttributeNames[$attr_name]; |
140 | 140 | $objs = []; |
141 | - if($this->lang_scope === 'global') { |
|
142 | - foreach( $a['langs'] as $l => $v ) { |
|
143 | - $l = ( $l === 'C' ? 'any' : $l ); |
|
141 | + if ($this->lang_scope === 'global') { |
|
142 | + foreach ($a['langs'] as $l => $v) { |
|
143 | + $l = ($l === 'C' ? 'any' : $l); |
|
144 | 144 | $obj = new $class_name(); |
145 | 145 | $obj->setValue($v); |
146 | 146 | $obj->setAttributes(['lang' => $l]); |
@@ -160,16 +160,16 @@ discard block |
||
160 | 160 | private function getDisplayName() { |
161 | 161 | $attr = $this->attributes; |
162 | 162 | $objs = []; |
163 | - if($this->lang_scope === 'global') { |
|
163 | + if ($this->lang_scope === 'global') { |
|
164 | 164 | $I = $attr['general:instname']['langs']; |
165 | - if($attr['internal:profile_count'][0] > 1) |
|
165 | + if ($attr['internal:profile_count'][0] > 1) |
|
166 | 166 | $P = $attr['profile:name']['langs']; |
167 | - foreach( $I as $l => $v ) { |
|
168 | - $l = ( $l === 'C' ? 'any' : $l ); |
|
167 | + foreach ($I as $l => $v) { |
|
168 | + $l = ($l === 'C' ? 'any' : $l); |
|
169 | 169 | $displayname = new DisplayName(); |
170 | - if(isset($P)) { |
|
170 | + if (isset($P)) { |
|
171 | 171 | $p = isset($P[$l]) ? $P[$l] : $P['C']; |
172 | - $v .= ' - '. $p; |
|
172 | + $v .= ' - ' . $p; |
|
173 | 173 | } |
174 | 174 | $displayname->setValue($v); |
175 | 175 | $displayname->setAttributes(['lang' => $l]); |
@@ -178,8 +178,8 @@ discard block |
||
178 | 178 | } else { |
179 | 179 | $displayname = new DisplayName(); |
180 | 180 | $v = $attr['general:instname'][0]; |
181 | - if($attr['internal:profile_count'][0] > 1) |
|
182 | - $v .= ' - '.$attr['profile:name'][0]; |
|
181 | + if ($attr['internal:profile_count'][0] > 1) |
|
182 | + $v .= ' - ' . $attr['profile:name'][0]; |
|
183 | 183 | $displayname->setValue($v); |
184 | 184 | $objs[] = $displayname; |
185 | 185 | } |
@@ -188,9 +188,9 @@ discard block |
||
188 | 188 | |
189 | 189 | private function getProviderLogo() { |
190 | 190 | $attr = $this->attributes; |
191 | - if(isset($attr['general:logo_file'][0])){ |
|
191 | + if (isset($attr['general:logo_file'][0])) { |
|
192 | 192 | $logo_string = base64_encode($attr['general:logo_file'][0]); |
193 | - $logo_mime = 'image/'.$attr['internal:logo_file'][0]['mime']; |
|
193 | + $logo_mime = 'image/' . $attr['internal:logo_file'][0]['mime']; |
|
194 | 194 | $providerlogo = new ProviderLogo(); |
195 | 195 | $providerlogo->setAttributes(['mime'=>$logo_mime, 'encoding'=>'base64']); |
196 | 196 | $providerlogo->setValue($logo_string); |
@@ -200,34 +200,34 @@ discard block |
||
200 | 200 | |
201 | 201 | private function getProviderInfo() { |
202 | 202 | $providerinfo = new ProviderInfo(); |
203 | - $providerinfo->setProperty('DisplayName',$this->getDisplayName()); |
|
204 | - $providerinfo->setProperty('Description',$this->getSimpleMLAttribute('profile:description')); |
|
205 | - $providerinfo->setProperty('ProviderLocation',$this->getProvideLocation()); |
|
206 | - $providerinfo->setProperty('ProviderLogo',$this->getProviderLogo()); |
|
207 | - $providerinfo->setProperty('TermsOfUse',$this->getSimpleMLAttribute('support:info_file')); |
|
208 | - $providerinfo->setProperty('Helpdesk',$this->getHelpdesk()); |
|
203 | + $providerinfo->setProperty('DisplayName', $this->getDisplayName()); |
|
204 | + $providerinfo->setProperty('Description', $this->getSimpleMLAttribute('profile:description')); |
|
205 | + $providerinfo->setProperty('ProviderLocation', $this->getProvideLocation()); |
|
206 | + $providerinfo->setProperty('ProviderLogo', $this->getProviderLogo()); |
|
207 | + $providerinfo->setProperty('TermsOfUse', $this->getSimpleMLAttribute('support:info_file')); |
|
208 | + $providerinfo->setProperty('Helpdesk', $this->getHelpdesk()); |
|
209 | 209 | return $providerinfo; |
210 | 210 | } |
211 | 211 | |
212 | 212 | private function getProvideLocation() { |
213 | 213 | $attr = $this->attributes; |
214 | - if(isset($attr['general:geo_coordinates'])){ |
|
214 | + if (isset($attr['general:geo_coordinates'])) { |
|
215 | 215 | $at = $attr['general:geo_coordinates']; |
216 | 216 | if (count($at) > 1) { |
217 | 217 | $at1 = []; |
218 | 218 | foreach ($at as $a) { |
219 | 219 | $providerlocation = new ProviderLocation(); |
220 | 220 | $b = unserialize($a); |
221 | - $providerlocation->setProperty('Longitude',$b['lon']); |
|
222 | - $providerlocation->setProperty('Latitude',$b['lat']); |
|
221 | + $providerlocation->setProperty('Longitude', $b['lon']); |
|
222 | + $providerlocation->setProperty('Latitude', $b['lat']); |
|
223 | 223 | $at1[] = $providerlocation; |
224 | 224 | } |
225 | 225 | } |
226 | 226 | else { |
227 | 227 | $providerlocation = new ProviderLocation(); |
228 | 228 | $b = unserialize($at[0]); |
229 | - $providerlocation->setProperty('Longitude',$b['lon']); |
|
230 | - $providerlocation->setProperty('Latitude',$b['lat']); |
|
229 | + $providerlocation->setProperty('Longitude', $b['lon']); |
|
230 | + $providerlocation->setProperty('Latitude', $b['lat']); |
|
231 | 231 | $at1 = $providerlocation; |
232 | 232 | } |
233 | 233 | return$at1; |
@@ -236,9 +236,9 @@ discard block |
||
236 | 236 | |
237 | 237 | private function getHelpdesk() { |
238 | 238 | $helpdesk = new Helpdesk(); |
239 | - $helpdesk->setProperty('EmailAddress',$this->getSimpleMLAttribute('support:email')); |
|
240 | - $helpdesk->setProperty('WebAddress',$this->getSimpleMLAttribute('support:url')); |
|
241 | - $helpdesk->setProperty('Phone',$this->getSimpleMLAttribute('support:phone')); |
|
239 | + $helpdesk->setProperty('EmailAddress', $this->getSimpleMLAttribute('support:email')); |
|
240 | + $helpdesk->setProperty('WebAddress', $this->getSimpleMLAttribute('support:url')); |
|
241 | + $helpdesk->setProperty('Phone', $this->getSimpleMLAttribute('support:phone')); |
|
242 | 242 | return $helpdesk; |
243 | 243 | } |
244 | 244 | |
@@ -248,11 +248,11 @@ discard block |
||
248 | 248 | $ieee80211s = []; |
249 | 249 | foreach ($SSIDs as $ssid => $ciph) { |
250 | 250 | $ieee80211 = new IEEE80211(); |
251 | - $ieee80211->setProperty('SSID',$ssid); |
|
251 | + $ieee80211->setProperty('SSID', $ssid); |
|
252 | 252 | $ieee80211->setProperty('MinRSNProto', $ciph == 'AES' ? 'CCMP' : 'TKIP'); |
253 | 253 | $ieee80211s[] = $ieee80211; |
254 | 254 | } |
255 | - $compatibleuses->setProperty('IEEE80211',$ieee80211s); |
|
255 | + $compatibleuses->setProperty('IEEE80211', $ieee80211s); |
|
256 | 256 | // TODO IEEE8023, ABFAB |
257 | 257 | return($compatibleuses); |
258 | 258 | } |
@@ -261,17 +261,17 @@ discard block |
||
261 | 261 | $inner = EAP::innerAuth($eap); |
262 | 262 | $outer_id = $eap["OUTER"]; |
263 | 263 | |
264 | - if(isset($inner["METHOD"]) && $inner["METHOD"]) { |
|
264 | + if (isset($inner["METHOD"]) && $inner["METHOD"]) { |
|
265 | 265 | $innerauthmethod = new InnerAuthenticationMethod(); |
266 | 266 | $class_name = $inner["EAP"] ? 'EAPMethod' : 'NonEAPAuthMethod'; |
267 | 267 | $eapmethod = new $class_name(); |
268 | 268 | $eaptype = new Type(); |
269 | 269 | $eaptype->setValue($inner['METHOD']); |
270 | - $eapmethod->setProperty('Type',$eaptype); |
|
271 | - $innerauthmethod->setProperty($class_name,$eapmethod); |
|
272 | - return ['inner_method'=>$innerauthmethod,'methodID'=> $outer_id, 'inner_methodID'=>$inner['METHOD']]; |
|
270 | + $eapmethod->setProperty('Type', $eaptype); |
|
271 | + $innerauthmethod->setProperty($class_name, $eapmethod); |
|
272 | + return ['inner_method'=>$innerauthmethod, 'methodID'=> $outer_id, 'inner_methodID'=>$inner['METHOD']]; |
|
273 | 273 | } else |
274 | - return ['inner_method'=>0,'methodID'=>$outer_id, 'inner_methodID'=>0]; |
|
274 | + return ['inner_method'=>0, 'methodID'=>$outer_id, 'inner_methodID'=>0]; |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | private function getAuthMethod($eap) { |
@@ -281,19 +281,19 @@ discard block |
||
281 | 281 | $eapmethod = new EAPMethod(); |
282 | 282 | $eaptype = new Type(); |
283 | 283 | $eaptype->setValue($eapParams['methodID']); |
284 | - $eapmethod->setProperty('Type',$eaptype); |
|
285 | - if(isset($this->VendorSpecific)) { |
|
284 | + $eapmethod->setProperty('Type', $eaptype); |
|
285 | + if (isset($this->VendorSpecific)) { |
|
286 | 286 | $vendorspecifics = []; |
287 | - foreach($this->VendorSpecific as $vs) { |
|
287 | + foreach ($this->VendorSpecific as $vs) { |
|
288 | 288 | $vendorspecific = new VendorSpecific(); |
289 | - $vs['value']->addAttribute('xsi:noNamespaceSchemaLocation',"xxx.xsd"); |
|
289 | + $vs['value']->addAttribute('xsi:noNamespaceSchemaLocation', "xxx.xsd"); |
|
290 | 290 | $vendorspecific->setValue($vs['value']); |
291 | 291 | $vendorspecific->setAttributes(['vendor'=>$vs['vendor']]); |
292 | 292 | $vendorspecifics[] = $vendorspecific; |
293 | 293 | } |
294 | - $eapmethod->setProperty('VendorSpecific',$vendorspecifics); |
|
294 | + $eapmethod->setProperty('VendorSpecific', $vendorspecifics); |
|
295 | 295 | } |
296 | - $authmethod->setProperty('EAPMethod',$eapmethod); |
|
296 | + $authmethod->setProperty('EAPMethod', $eapmethod); |
|
297 | 297 | |
298 | 298 | // ServerSideCredentials |
299 | 299 | $serversidecredential = new ServerSideCredential(); |
@@ -317,22 +317,22 @@ discard block |
||
317 | 317 | $serverids[] = $serverid; |
318 | 318 | } |
319 | 319 | |
320 | - $serversidecredential->setProperty('EAPType',$eaptype->getValue()); |
|
321 | - $serversidecredential->setProperty('CA',$CAs); |
|
322 | - $serversidecredential->setProperty('ServerID',$serverids); |
|
323 | - $authmethod->setProperty('ServerSideCredential',$serversidecredential); |
|
320 | + $serversidecredential->setProperty('EAPType', $eaptype->getValue()); |
|
321 | + $serversidecredential->setProperty('CA', $CAs); |
|
322 | + $serversidecredential->setProperty('ServerID', $serverids); |
|
323 | + $authmethod->setProperty('ServerSideCredential', $serversidecredential); |
|
324 | 324 | |
325 | 325 | // ClientSideCredentials |
326 | 326 | |
327 | 327 | $clientsidecredential = new ClientSideCredential(); |
328 | 328 | |
329 | 329 | // OuterIdentity |
330 | - if($attr['internal:use_anon_outer'] [0]) |
|
331 | - $clientsidecredential->setProperty('OuterIdentity',$attr['internal:anon_local_value'][0].'@'.$attr['internal:realm'][0]); |
|
332 | - $clientsidecredential->setProperty('EAPType',$eapParams['inner_methodID'] ? $eapParams['inner_methodID'] : $eapParams['methodID']); |
|
333 | - $authmethod->setProperty('ClientSideCredential',$clientsidecredential); |
|
334 | - if($eapParams['inner_method']) |
|
335 | - $authmethod->setProperty('InnerAuthenticationMethod',$eapParams['inner_method']); |
|
330 | + if ($attr['internal:use_anon_outer'] [0]) |
|
331 | + $clientsidecredential->setProperty('OuterIdentity', $attr['internal:anon_local_value'][0] . '@' . $attr['internal:realm'][0]); |
|
332 | + $clientsidecredential->setProperty('EAPType', $eapParams['inner_methodID'] ? $eapParams['inner_methodID'] : $eapParams['methodID']); |
|
333 | + $authmethod->setProperty('ClientSideCredential', $clientsidecredential); |
|
334 | + if ($eapParams['inner_method']) |
|
335 | + $authmethod->setProperty('InnerAuthenticationMethod', $eapParams['inner_method']); |
|
336 | 336 | return $authmethod; |
337 | 337 | } |
338 | 338 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | |
6 | 6 | class Device_XML_TTLS_MSCHAP2 extends Device_XML { |
7 | 7 | final public function __construct() { |
8 | - $this->supportedEapMethods = |
|
8 | + $this->supportedEapMethods = |
|
9 | 9 | [ |
10 | 10 | EAP::$TTLS_MSCHAP2, |
11 | 11 | ]; |
@@ -5,7 +5,7 @@ |
||
5 | 5 | |
6 | 6 | class Device_XML_PWD extends Device_XML { |
7 | 7 | final public function __construct() { |
8 | - $this->supportedEapMethods = |
|
8 | + $this->supportedEapMethods = |
|
9 | 9 | [ |
10 | 10 | EAP::$PWD, |
11 | 11 | ]; |
@@ -3,9 +3,9 @@ |
||
3 | 3 | require_once('DeviceConfig.php'); |
4 | 4 | require_once('XML.php'); |
5 | 5 | |
6 | -class Device_Lollipop extends Device_XML{ |
|
6 | +class Device_Lollipop extends Device_XML { |
|
7 | 7 | final public function __construct() { |
8 | - $this->supportedEapMethods = |
|
8 | + $this->supportedEapMethods = |
|
9 | 9 | [ |
10 | 10 | EAP::$PEAP_MSCHAP2, |
11 | 11 | EAP::$TTLS_PAP, |
@@ -172,13 +172,13 @@ |
||
172 | 172 | // define CA certificates |
173 | 173 | foreach ($this->attributes['internal:CAs'][0] as $ca) { |
174 | 174 | // strip -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- |
175 | - debug(2,$ca['pem']); |
|
175 | + debug(2, $ca['pem']); |
|
176 | 176 | $ca_sanitized = substr($ca['pem'], 27, strlen($ca['pem']) - 27 - 25 - 1); |
177 | - debug(2,$ca_sanitized."\n"); |
|
177 | + debug(2, $ca_sanitized . "\n"); |
|
178 | 178 | // remove \n |
179 | 179 | $ca_sanitized = str_replace("\n", "", $ca_sanitized); |
180 | 180 | $json_array["Certificates"][] = ["GUID" => "{" . $ca['uuid'] . "}", "Type" => "Authority", "X509" => $ca_sanitized]; |
181 | - debug(2,$ca_sanitized."\n"); |
|
181 | + debug(2, $ca_sanitized . "\n"); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | $output_json = json_encode($json_array, JSON_PRETTY_PRINT); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | <key>PayloadIdentifier</key> |
128 | 128 | <string>" . mobileconfig_superclass::$IPHONE_PAYLOAD_PREFIX . ".$this->massaged_consortium.$this->massaged_country.$this->massaged_inst.$this->massaged_profile.$this->lang</string> |
129 | 129 | <key>PayloadOrganization</key> |
130 | - <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ( $this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string> |
|
130 | + <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ($this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string> |
|
131 | 131 | <key>PayloadType</key> |
132 | 132 | <string>Configuration</string> |
133 | 133 | <key>PayloadUUID</key> |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | public function writeDeviceInfo() { |
165 | 165 | $ssid_ct = count($this->attributes['internal:SSID']); |
166 | 166 | $cert_ct = count($this->attributes['internal:CAs'][0]); |
167 | - $out = "<p>"._("For best results, please use the built-in browser (Safari) to open the configuration file.")."</p>"; |
|
167 | + $out = "<p>" . _("For best results, please use the built-in browser (Safari) to open the configuration file.") . "</p>"; |
|
168 | 168 | $out .= "<p>"; |
169 | 169 | $out .= _("The profile will install itself after you click (or tap) the button. You will be asked for confirmation/input at several points:"); |
170 | 170 | $out .= "<ul>"; |
@@ -273,13 +273,13 @@ discard block |
||
273 | 273 | $retval .= "wifi." . $this->serial; |
274 | 274 | else |
275 | 275 | $retval .= "hs20"; |
276 | - $retval .="</string> |
|
276 | + $retval .= "</string> |
|
277 | 277 | <key>PayloadOrganization</key> |
278 | 278 | <string>" . $this->massaged_consortium . ".1x-config.org</string> |
279 | 279 | <key>PayloadType</key> |
280 | 280 | <string>com.apple." . ($wired ? "firstactiveethernet" : "wifi") . ".managed</string>"; |
281 | 281 | debug(2, get_class($this)); |
282 | - if ( get_class($this) != "Device_mobileconfig_ios_56" ) { |
|
282 | + if (get_class($this) != "Device_mobileconfig_ios_56") { |
|
283 | 283 | $retval .= "<key>ProxyType</key> |
284 | 284 | <string>Auto</string> |
285 | 285 | "; |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | <string>" . uuid() . "</string> |
349 | 349 | <key>PayloadVersion</key> |
350 | 350 | <real>1</real>"; |
351 | - if ( get_class($this) != "Device_mobileconfig_ios_56") { |
|
351 | + if (get_class($this) != "Device_mobileconfig_ios_56") { |
|
352 | 352 | $retval .= "<key>ProxyType</key> |
353 | 353 | <string>Auto</string>"; |
354 | 354 | } |