@@ -58,9 +58,9 @@ discard block |
||
| 58 | 58 | * |
| 59 | 59 | */ |
| 60 | 60 | public function writeInstaller() { |
| 61 | - $installerPath = $this->installerBasename . ".py"; |
|
| 61 | + $installerPath = $this->installerBasename.".py"; |
|
| 62 | 62 | $this->copyFile("main.py", $installerPath); |
| 63 | - $installer = fopen($installerPath,"a"); |
|
| 63 | + $installer = fopen($installerPath, "a"); |
|
| 64 | 64 | if ($installer === FALSE) { |
| 65 | 65 | throw new Exception("Unable to open installer file for writing!"); |
| 66 | 66 | } |
@@ -111,8 +111,8 @@ discard block |
||
| 111 | 111 | * @return void |
| 112 | 112 | */ |
| 113 | 113 | private function writeConfigLine($file, $prefix, $name, $text) { |
| 114 | - $out = $prefix . $name . ' = "' . $text; |
|
| 115 | - fwrite($file, wordwrap($out, 70, " \" \\\n \"") . "\n"); |
|
| 114 | + $out = $prefix.$name.' = "'.$text; |
|
| 115 | + fwrite($file, wordwrap($out, 70, " \" \\\n \"")."\n"); |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | /** |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | 'user_cert_missing' => _("personal certificate file not found"), |
| 152 | 152 | ]; |
| 153 | 153 | foreach ($messages as $name => $value) { |
| 154 | - $this->writeConfigLine($file, 'Messages.', $name, $value . '"'); |
|
| 154 | + $this->writeConfigLine($file, 'Messages.', $name, $value.'"'); |
|
| 155 | 155 | } |
| 156 | 156 | \core\common\Entity::outOfThePotatoes(); |
| 157 | 157 | } |
@@ -195,39 +195,39 @@ discard block |
||
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | if ($outerId !== NULL) { |
| 198 | - $configRaw['anonymous_identity'] = '"' . $outerId . '"'; |
|
| 198 | + $configRaw['anonymous_identity'] = '"'.$outerId.'"'; |
|
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | if (!empty($this->attributes['internal:realm'][0])) { |
| 202 | 202 | $config['user_realm'] = $this->attributes['internal:realm'][0]; |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | - if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
| 205 | + if (!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
| 206 | 206 | $configRaw['hint_user_input'] = "True"; |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | - if(!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
| 209 | + if (!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
| 210 | 210 | $configRaw['verify_user_realm_input'] = "True"; |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | foreach ($config as $name => $value) { |
| 214 | - $this->writeConfigLine($file, 'Config.', $name, $value . '"'); |
|
| 214 | + $this->writeConfigLine($file, 'Config.', $name, $value.'"'); |
|
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | foreach ($configRaw as $name => $value) { |
| 218 | - fwrite($file, 'Config.' . $name . ' = ' . $value . "\n"); |
|
| 218 | + fwrite($file, 'Config.'.$name.' = '.$value."\n"); |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | if ($tou === '') { |
| 222 | - fwrite($file, 'Config.tou = ""' . "\n"); |
|
| 222 | + fwrite($file, 'Config.tou = ""'."\n"); |
|
| 223 | 223 | } else { |
| 224 | - fwrite($file, 'Config.tou = """' . $tou . '"""' . "\n"); |
|
| 224 | + fwrite($file, 'Config.tou = """'.$tou.'"""'."\n"); |
|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | - fwrite($file, 'Config.CA = """' . $this->mkCAfile() . '"""' . "\n"); |
|
| 227 | + fwrite($file, 'Config.CA = """'.$this->mkCAfile().'"""'."\n"); |
|
| 228 | 228 | $sbUserFile = $this->mkSbUserFile(); |
| 229 | 229 | if ($sbUserFile !== '') { |
| 230 | - fwrite($file, 'Config.sb_user_file = """' . $sbUserFile . '"""' . "\n"); |
|
| 230 | + fwrite($file, 'Config.sb_user_file = """'.$sbUserFile.'"""'."\n"); |
|
| 231 | 231 | } |
| 232 | 232 | } |
| 233 | 233 | |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | } |
| 280 | 280 | $out .= "'DNS:$oneServer'"; |
| 281 | 281 | } |
| 282 | - return "[" . $out. "]"; |
|
| 282 | + return "[".$out."]"; |
|
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | /** |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | $outArray = array_merge($outArray, $networkDetails['ssid']); |
| 296 | 296 | } |
| 297 | 297 | } |
| 298 | - return "['" . implode("', '", $outArray) . "']"; |
|
| 298 | + return "['".implode("', '", $outArray)."']"; |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | /** |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | $outArray[] = "'$ssid'"; |
| 312 | 312 | } |
| 313 | 313 | } |
| 314 | - return '[' . implode(', ', $outArray) . ']'; |
|
| 314 | + return '['.implode(', ', $outArray).']'; |
|
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | /** |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | * |
| 320 | 320 | * @return string |
| 321 | 321 | */ |
| 322 | - private function mkCAfile(){ |
|
| 322 | + private function mkCAfile() { |
|
| 323 | 323 | $out = ''; |
| 324 | 324 | $cAlist = $this->attributes['internal:CAs'][0]; |
| 325 | 325 | foreach ($cAlist as $oneCa) { |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | */ |
| 336 | 336 | private function mkIntro() { |
| 337 | 337 | \core\common\Entity::intoThePotatoes(); |
| 338 | - $out = _("This installer has been prepared for {0}") . '\n\n' . _("More information and comments:") . '\n\nEMAIL: {1}\nWWW: {2}\n\n' . |
|
| 338 | + $out = _("This installer has been prepared for {0}").'\n\n'._("More information and comments:").'\n\nEMAIL: {1}\nWWW: {2}\n\n'. |
|
| 339 | 339 | _("Installer created with software from the GEANT project."); |
| 340 | 340 | \core\common\Entity::outOfThePotatoes(); |
| 341 | 341 | return $out; |