|
@@ -33,9 +33,9 @@ discard block |
|
|
block discarded – undo |
|
33
|
33
|
public function writeInstaller() { |
|
34
|
34
|
$installerPath = $this->installerBasename . ".py"; |
|
35
|
35
|
$this->copyFile("main.py", $installerPath); |
|
36
|
|
- $installer = fopen($installerPath,"a"); |
|
37
|
|
- fwrite($installer,$this->writeMessages()); |
|
38
|
|
- fwrite($installer,$this->writeConfigVars()); |
|
|
36
|
+ $installer = fopen($installerPath, "a"); |
|
|
37
|
+ fwrite($installer, $this->writeMessages()); |
|
|
38
|
+ fwrite($installer, $this->writeConfigVars()); |
|
39
|
39
|
fwrite($installer, "run_installer()\n"); |
|
40
|
40
|
return($installerPath); |
|
41
|
41
|
} |
|
@@ -100,7 +100,7 @@ discard block |
|
|
block discarded – undo |
|
100
|
100
|
$out .= 'Messages.p12_title = "' . _("personal certificate file (p12 or pfx)") . "\"\n"; |
|
101
|
101
|
$out .= 'Messages.save_wpa_conf = "' . _("Network Manager configuration failed, but we may generate a wpa_supplicant configuration file if you wish. Be warned that your connection password will be saved in this file as clear text.") . "\"\n"; |
|
102
|
102
|
$out .= 'Messages.save_wpa_confirm = "' . _("Write the file") . "\"\n"; |
|
103
|
|
- $out .= 'Messages.wrongUsernameFormat = "' ._("Error: Your username must be of the form 'xxx@institutionID' e.g. '[email protected]'!") . "\"\n"; |
|
|
103
|
+ $out .= 'Messages.wrongUsernameFormat = "' . _("Error: Your username must be of the form 'xxx@institutionID' e.g. '[email protected]'!") . "\"\n"; |
|
104
|
104
|
$out .= 'Messages.wrong_realm = "' . _("Error: your username must be in the form of 'xxx@{}'. Please enter the username in the correct format.") . "\"\n"; |
|
105
|
105
|
$out .= 'Messages.wrong_realm_suffix = "' . _("Error: your username must be in the form of 'xxx@institutionID' and end with '{}'. Please enter the username in the correct format.") . "\"\n"; |
|
106
|
106
|
|
|
@@ -129,8 +129,8 @@ discard block |
|
|
block discarded – undo |
|
129
|
129
|
$out .= "Config.use_other_tls_id = False\n"; |
|
130
|
130
|
} |
|
131
|
131
|
$tou = $this->mkUserConsent(); |
|
132
|
|
- $out .= 'Config.tou = ' . ( $tou ? '"""' . $tou . '"""' : 'None' ) . "\n"; |
|
133
|
|
- $out .= 'Config.CA = """' . $this->mkCAfile() . '"""' . "\n"; |
|
|
132
|
+ $out .= 'Config.tou = ' . ($tou ? '"""' . $tou . '"""' : 'None') . "\n"; |
|
|
133
|
+ $out .= 'Config.CA = """' . $this->mkCAfile() . '"""' . "\n"; |
|
134
|
134
|
$out .= "Config.anonymous_identity = '" . $this->determineOuterIdString() . "'\n"; |
|
135
|
135
|
$out .= 'Config.init_info = """' . $this->mkIntro() . '"""' . "\n"; |
|
136
|
136
|
$out .= 'Config.init_confirmation = "' . $this->mkProfileConfirmation() . "\"\n"; |
|
@@ -139,10 +139,10 @@ discard block |
|
|
block discarded – undo |
|
139
|
139
|
if (!empty($this->attributes['internal:realm'][0])) { |
|
140
|
140
|
$out .= 'Config.user_realm = "' . $this->attributes['internal:realm'][0] . "\"\n"; |
|
141
|
141
|
} |
|
142
|
|
- if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
|
142
|
+ if (!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
143
|
143
|
$out .= "Config.hint_user_input = True\n"; |
|
144
|
144
|
} |
|
145
|
|
- if(!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
|
145
|
+ if (!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
146
|
146
|
$out .= "Config.verify_user_realm_input = True\n"; |
|
147
|
147
|
} |
|
148
|
148
|
return $out; |
|
@@ -182,7 +182,7 @@ discard block |
|
|
block discarded – undo |
|
182
|
182
|
} |
|
183
|
183
|
$out .= "'DNS:$oneServer'"; |
|
184
|
184
|
} |
|
185
|
|
- return "[" . $out. "]"; |
|
|
185
|
+ return "[" . $out . "]"; |
|
186
|
186
|
} |
|
187
|
187
|
|
|
188
|
188
|
|
|
@@ -206,7 +206,7 @@ discard block |
|
|
block discarded – undo |
|
206
|
206
|
return '[' . implode(', ', $outArray) . ']'; |
|
207
|
207
|
} |
|
208
|
208
|
|
|
209
|
|
- private function mkCAfile(){ |
|
|
209
|
+ private function mkCAfile() { |
|
210
|
210
|
$out = ''; |
|
211
|
211
|
$cAlist = $this->attributes['internal:CAs'][0]; |
|
212
|
212
|
foreach ($cAlist as $oneCa) { |