@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | $this->loggerInstance->debug(5, "translateFile($source_name, $output_name)\n"); |
105 | 105 | ob_start(); |
106 | - $this->loggerInstance->debug(5, $this->module_path . '/Files/' . $this->device_id . '/' . $source_name . "\n"); |
|
106 | + $this->loggerInstance->debug(5, $this->module_path.'/Files/'.$this->device_id.'/'.$source_name."\n"); |
|
107 | 107 | $source = $this->findSourceFile($source_name); |
108 | 108 | |
109 | 109 | if ($source !== false) { // if there is no file found, don't attempt to include an uninitialised variable |
@@ -230,8 +230,8 @@ discard block |
||
230 | 230 | $out .= sprintf(_("%s installer will be in the form of an EXE file. It will configure %s on your device, by creating wireless network profiles.<p>When you click the download button, the installer will be saved by your browser. Copy it to the machine you want to configure and execute."), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::CONSORTIUM['display_name']); |
231 | 231 | $out .= "<p>"; |
232 | 232 | if ($networksCount > $configCount) { |
233 | - $out .= sprintf(ngettext("In addition to <strong>%s</strong> the installer will also configure access to:", "In addition to <strong>%s</strong> the installer will also configure access to the following networks:", $networksCount - $configCount), implode(', ', $configNetworkList)) . " "; |
|
234 | - $out .= '<strong>' . join('</strong>, <strong>', array_diff($networkList, $configNetworkList)) . '</strong>'; |
|
233 | + $out .= sprintf(ngettext("In addition to <strong>%s</strong> the installer will also configure access to:", "In addition to <strong>%s</strong> the installer will also configure access to the following networks:", $networksCount - $configCount), implode(', ', $configNetworkList))." "; |
|
234 | + $out .= '<strong>'.join('</strong>, <strong>', array_diff($networkList, $configNetworkList)).'</strong>'; |
|
235 | 235 | $out .= "<p>"; |
236 | 236 | } |
237 | 237 | // TODO - change this below |
@@ -340,14 +340,14 @@ discard block |
||
340 | 340 | */ |
341 | 341 | protected function signInstaller() |
342 | 342 | { |
343 | - $fileName = $this->installerBasename . '.exe'; |
|
343 | + $fileName = $this->installerBasename.'.exe'; |
|
344 | 344 | if (!$this->sign) { |
345 | 345 | rename("installer.exe", $fileName); |
346 | 346 | return $fileName; |
347 | 347 | } |
348 | 348 | $retval = 0; |
349 | 349 | // are actually signing |
350 | - $outputFromSigning = system($this->sign . " installer.exe '$fileName' > /dev/null", $retval); |
|
350 | + $outputFromSigning = system($this->sign." installer.exe '$fileName' > /dev/null", $retval); |
|
351 | 351 | $this->loggerInstance->debug(4, $retval, "Output from Windows signing:", "==\n"); |
352 | 352 | if ($retval !== 0 || $outputFromSigning === false) { |
353 | 353 | $this->loggerInstance->debug(2, "Signing the WindowsCommon installer $fileName FAILED!\n"); |
@@ -365,12 +365,12 @@ discard block |
||
365 | 365 | */ |
366 | 366 | protected function compileNSIS() |
367 | 367 | { |
368 | - $makensis = \config\ConfAssistant::PATHS['makensis'] . " -INPUTCHARSET UTF8"; |
|
368 | + $makensis = \config\ConfAssistant::PATHS['makensis']." -INPUTCHARSET UTF8"; |
|
369 | 369 | $lcAll = getenv("LC_ALL"); |
370 | 370 | putenv("LC_ALL=en_US.UTF-8"); |
371 | - $command = $makensis . ' -V4 cat.NSI > nsis.log 2>&1'; |
|
371 | + $command = $makensis.' -V4 cat.NSI > nsis.log 2>&1'; |
|
372 | 372 | system($command); |
373 | - putenv("LC_ALL=" . $lcAll); |
|
373 | + putenv("LC_ALL=".$lcAll); |
|
374 | 374 | $this->loggerInstance->debug(4, "compileNSIS:$command\n"); |
375 | 375 | } |
376 | 376 | |
@@ -387,10 +387,10 @@ discard block |
||
387 | 387 | 'email' => 'SUPPORT', |
388 | 388 | 'url' => 'URL', |
389 | 389 | ]; |
390 | - $s = "support_" . $type . "_substitute"; |
|
390 | + $s = "support_".$type."_substitute"; |
|
391 | 391 | $substitute = $this->translateString($this->$s); |
392 | - $returnValue = !empty($attr['support:' . $type][0]) ? $attr['support:' . $type][0] : $substitute; |
|
393 | - return '!define ' . $supportString[$type] . ' "' . $returnValue . '"' . "\n"; |
|
392 | + $returnValue = !empty($attr['support:'.$type][0]) ? $attr['support:'.$type][0] : $substitute; |
|
393 | + return '!define '.$supportString[$type].' "'.$returnValue.'"'."\n"; |
|
394 | 394 | } |
395 | 395 | |
396 | 396 | /** |
@@ -403,18 +403,18 @@ discard block |
||
403 | 403 | { |
404 | 404 | $fcontents = ''; |
405 | 405 | if ($attr['internal:profile_count'][0] > 1) { |
406 | - $fcontents .= "\n" . '!define USER_GROUP "' . $this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0])) . '" |
|
406 | + $fcontents .= "\n".'!define USER_GROUP "'.$this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0])).'" |
|
407 | 407 | '; |
408 | 408 | } |
409 | 409 | $fcontents .= ' |
410 | -Caption "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0])) . '" |
|
411 | -!define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0])) . '" |
|
412 | -!define VERSION "' . \core\CAT::VERSION_MAJOR . '.' . \core\CAT::VERSION_MINOR . '.' . \core\CAT::VERSION_PATCH . '" |
|
410 | +Caption "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0])).'" |
|
411 | +!define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0])).'" |
|
412 | +!define VERSION "' . \core\CAT::VERSION_MAJOR.'.'.\core\CAT::VERSION_MINOR.'.'.\core\CAT::VERSION_PATCH.'" |
|
413 | 413 | !define INSTALLER_NAME "installer.exe" |
414 | -!define LANG "' . $this->lang . '" |
|
415 | -!define LOCALE "' . preg_replace('/\..*$/', '', \config\Master::LANGUAGES[$this->languageInstance->getLang()]['locale']) . '" |
|
414 | +!define LANG "' . $this->lang.'" |
|
415 | +!define LOCALE "' . preg_replace('/\..*$/', '', \config\Master::LANGUAGES[$this->languageInstance->getLang()]['locale']).'" |
|
416 | 416 | ;-------------------------------- |
417 | -!define ORGANISATION "' . $this->translateString($attr['general:instname'][0]) . '" |
|
417 | +!define ORGANISATION "' . $this->translateString($attr['general:instname'][0]).'" |
|
418 | 418 | '; |
419 | 419 | $fcontents .= $this->getSupport($attr, 'email'); |
420 | 420 | $fcontents .= $this->getSupport($attr, 'url'); |
@@ -422,18 +422,18 @@ discard block |
||
422 | 422 | $fcontents .= '!define WIRED |
423 | 423 | '; |
424 | 424 | } |
425 | - $fcontents .= '!define PROVIDERID "urn:UUID:' . $this->deviceUUID . '" |
|
425 | + $fcontents .= '!define PROVIDERID "urn:UUID:'.$this->deviceUUID.'" |
|
426 | 426 | '; |
427 | 427 | if (!empty($attr['internal:realm'][0])) { |
428 | - $fcontents .= '!define REALM "' . $attr['internal:realm'][0] . '" |
|
428 | + $fcontents .= '!define REALM "'.$attr['internal:realm'][0].'" |
|
429 | 429 | '; |
430 | 430 | } |
431 | 431 | if (!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { |
432 | - $fcontents .= '!define HINT_USER_INPUT "' . $attr['internal:hint_userinput_suffix'][0] . '" |
|
432 | + $fcontents .= '!define HINT_USER_INPUT "'.$attr['internal:hint_userinput_suffix'][0].'" |
|
433 | 433 | '; |
434 | 434 | } |
435 | 435 | if (!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { |
436 | - $fcontents .= '!define VERIFY_USER_REALM_INPUT "' . $attr['internal:verify_userinput_suffix'][0] . '" |
|
436 | + $fcontents .= '!define VERIFY_USER_REALM_INPUT "'.$attr['internal:verify_userinput_suffix'][0].'" |
|
437 | 437 | '; |
438 | 438 | } |
439 | 439 | $fcontents .= $this->msInfoFile($attr); |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | $out .= '!define EXTERNAL_INFO "'; |
455 | 455 | // $this->loggerInstance->debug(4,"Info file type ".$attr['support:info_file'][0]['mime']."\n"); |
456 | 456 | if ($attr['internal:info_file'][0]['mime'] == 'rtf') { |
457 | - $out = '!define LICENSE_FILE "' . $attr['internal:info_file'][0]['name']; |
|
457 | + $out = '!define LICENSE_FILE "'.$attr['internal:info_file'][0]['name']; |
|
458 | 458 | } elseif ($attr['internal:info_file'][0]['mime'] == 'txt') { |
459 | 459 | $infoFile = file_get_contents($attr['internal:info_file'][0]['name']); |
460 | 460 | if ($infoFile === false) { |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | $out = '!define LICENSE_FILE " info_f.txt'; |
468 | 468 | } |
469 | 469 | } else { |
470 | - $out = '!define EXTERNAL_INFO "' . $attr['internal:info_file'][0]['name']; |
|
470 | + $out = '!define EXTERNAL_INFO "'.$attr['internal:info_file'][0]['name']; |
|
471 | 471 | } |
472 | 472 | |
473 | 473 | $out .= "\"\n"; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public function htmlHeadCode() { |
48 | 48 | $cat = new \core\CAT(); |
49 | 49 | \core\common\Entity::intoThePotatoes(); |
50 | - $retval = "<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=" . \config\Master::APPEARANCE['google_maps_api_key'] . "'></script> |
|
50 | + $retval = "<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=".\config\Master::APPEARANCE['google_maps_api_key']."'></script> |
|
51 | 51 | <script type='text/javascript'> |
52 | 52 | // some global variables; |
53 | 53 | var center_lat=49.6114885608729; |
@@ -103,19 +103,19 @@ discard block |
||
103 | 103 | * |
104 | 104 | */ |
105 | 105 | function locator_magic() { |
106 | - geocoder.geocode({'address':\"" . preg_replace("/\"/", """, $this->instName) . "\", 'region':\"" . strtolower($this->fedName) . "\"}, |
|
106 | + geocoder.geocode({'address':\"" . preg_replace("/\"/", """, $this->instName)."\", 'region':\"".strtolower($this->fedName)."\"}, |
|
107 | 107 | function(r,status) { |
108 | 108 | if(status != google.maps.GeocoderStatus.OK) { |
109 | - locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]['name'] . "\"); |
|
109 | + locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]['name']."\"); |
|
110 | 110 | } else { |
111 | 111 | var i; |
112 | 112 | for(i = 0; i < r.length; i++) { |
113 | 113 | Addr = getAddressElements(r[i].address_components); |
114 | - if(Addr.country == \"" . strtoupper($this->fedName) . "\") |
|
114 | + if(Addr.country == \"" . strtoupper($this->fedName)."\") |
|
115 | 115 | break; |
116 | 116 | } |
117 | - if(Addr.country != \"" . strtoupper($this->fedName) . "\") |
|
118 | - locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]['name'] . "\"); |
|
117 | + if(Addr.country != \"" . strtoupper($this->fedName)."\") |
|
118 | + locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]['name']."\"); |
|
119 | 119 | else { |
120 | 120 | addMarker(r[i].geometry.location,15,null); |
121 | 121 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | */ |
129 | 129 | function markerClicked(m) { |
130 | 130 | info_window.close(); |
131 | - var t = \"" . _("This is location ") . "\"+m.info; |
|
131 | + var t = \"" . _("This is location ")."\"+m.info; |
|
132 | 132 | info_window.setContent(t); |
133 | 133 | info_window.setPosition(m.getPosition()); |
134 | 134 | info_window.open(map,m); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | function getAddressLocation() { |
208 | 208 | var city = $('#address').val(); |
209 | 209 | if(city == '') { |
210 | - alert(\"" . _("nothing entered in the address field") . "\"); |
|
210 | + alert(\"" . _("nothing entered in the address field")."\"); |
|
211 | 211 | return false; |
212 | 212 | } |
213 | 213 | geocoder.geocode( { 'address': city}, function(results, status) { |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | * trigger geolocation |
228 | 228 | */ |
229 | 229 | function locateMe() { |
230 | - $('#address').val(\"" . _("locating") . "\"); |
|
230 | + $('#address').val(\"" . _("locating")."\"); |
|
231 | 231 | navigator.geolocation.getCurrentPosition(locate_succes,locate_fail,{maximumAge:3600000, timeout:5000}); |
232 | 232 | } |
233 | 233 | |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | if ($this->readOnly) { |
346 | 346 | return "<div id='map' class='googlemap'></div>"; |
347 | 347 | } else { |
348 | - return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . "<div id='map' class='googlemap'></div>" . $this->htmlPostEdit(FALSE); |
|
348 | + return $this->htmlPreEdit($wizard, $additional).$this->findLocationHtml()."<div id='map' class='googlemap'></div>".$this->htmlPostEdit(FALSE); |
|
349 | 349 | } |
350 | 350 | } |
351 | 351 | |
@@ -358,11 +358,11 @@ discard block |
||
358 | 358 | */ |
359 | 359 | public static function optionListDisplayCode($coords, $number) { |
360 | 360 | // quiesce warnings about unused variable |
361 | - if (strlen(sprintf("%s", $coords)) <0) { |
|
361 | + if (strlen(sprintf("%s", $coords)) < 0) { |
|
362 | 362 | throw new \Exception("A miracle! A string with negative length!"); |
363 | 363 | }; |
364 | 364 | \core\common\Entity::intoThePotatoes(); |
365 | - $retval = "<button id='location_b_" . $number . "' class='location_button'>" . _("Click to see location") . " $number</button>"; |
|
365 | + $retval = "<button id='location_b_".$number."' class='location_button'>"._("Click to see location")." $number</button>"; |
|
366 | 366 | \core\common\Entity::outOfThePotatoes(); |
367 | 367 | return $retval; |
368 | 368 | } |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | * @return string |
374 | 374 | */ |
375 | 375 | public function bodyTagCode() { |
376 | - return "onload='load(" . ($this->readOnly ? "0" : "1") . ")'"; |
|
376 | + return "onload='load(".($this->readOnly ? "0" : "1").")'"; |
|
377 | 377 | } |
378 | 378 | |
379 | 379 | /** |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | */ |
384 | 384 | private function findLocationHtml() { |
385 | 385 | \core\common\Entity::intoThePotatoes(); |
386 | - $retval = "<p>" . _("Address:") . " <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>" . _("Find address") . "</button> <button type='button' onclick='locateMe()'>" . _("Locate Me!") . "</button></p>"; |
|
386 | + $retval = "<p>"._("Address:")." <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>"._("Find address")."</button> <button type='button' onclick='locateMe()'>"._("Locate Me!")."</button></p>"; |
|
387 | 387 | \core\common\Entity::outOfThePotatoes(); |
388 | 388 | return $retval; |
389 | 389 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | // use HTML5 geolocation |
85 | 85 | function locateMe() { |
86 | - $('#address').val(\"" . _("locating") . "\"); |
|
86 | + $('#address').val(\"" . _("locating")."\"); |
|
87 | 87 | navigator.geolocation.getCurrentPosition(locate_succes,locate_fail,{maximumAge:3600000, timeout:5000}); |
88 | 88 | } |
89 | 89 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | view.fit(extent, {padding: [10, 0, 10, 0]}); |
206 | 206 | } else { |
207 | 207 | view.setCenter([0,0]); |
208 | - locate_country('" . $cat->knownFederations[strtoupper($this->fedName)]['name'] . "'); // use the federation code to locate the country |
|
208 | + locate_country('" . $cat->knownFederations[strtoupper($this->fedName)]['name']."'); // use the federation code to locate the country |
|
209 | 209 | map.setView(view); |
210 | 210 | } |
211 | 211 | view.setMaxZoom(20); |
@@ -227,14 +227,14 @@ discard block |
||
227 | 227 | function getAddressLocation() { |
228 | 228 | var city = $('#address').val(); |
229 | 229 | if(city == '') { |
230 | - alert(\"" . _("nothing entered in the address field") . "\"); |
|
230 | + alert(\"" . _("nothing entered in the address field")."\"); |
|
231 | 231 | return false; |
232 | 232 | } |
233 | 233 | city = city.replace(/\s*,\s*/g,',+'); |
234 | 234 | city = city.replace(/ +/,'+'); |
235 | 235 | $.get(addressService+'?format=json&addressdetails=0&q='+city, '', function(data) { |
236 | 236 | if (data[0] === undefined) { |
237 | - alert('" . _("Address not found, perhaps try another form, like putting the street number to the front.") . "'); |
|
237 | + alert('" . _("Address not found, perhaps try another form, like putting the street number to the front.")."'); |
|
238 | 238 | return; |
239 | 239 | } |
240 | 240 | showTmpPointer(data[0].lon, data[0].lat); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | if ($this->readOnly) { |
286 | 286 | return "<div id='map' class='locationmap'></div><script>generateMap('map')</script>"; |
287 | 287 | } else { |
288 | - return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . "<span id='location-prompt'>You can drag the pointer to the final location before you save the results.</span><div id='map' class='locationmap'></div><script>generateMap('map')</script>" . $this->htmlPostEdit(FALSE); |
|
288 | + return $this->htmlPreEdit($wizard, $additional).$this->findLocationHtml()."<span id='location-prompt'>You can drag the pointer to the final location before you save the results.</span><div id='map' class='locationmap'></div><script>generateMap('map')</script>".$this->htmlPostEdit(FALSE); |
|
289 | 289 | } |
290 | 290 | } |
291 | 291 | |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | // we don't need this parameter in this subclass |
311 | 311 | unset($coords); |
312 | 312 | \core\common\Entity::intoThePotatoes(); |
313 | - $retval = "<button id='location_b_" . $number . "' class='location_button'>" . _("Click to see location") . " $number</button>"; |
|
313 | + $retval = "<button id='location_b_".$number."' class='location_button'>"._("Click to see location")." $number</button>"; |
|
314 | 314 | \core\common\Entity::outOfThePotatoes(); |
315 | 315 | return $retval; |
316 | 316 | } |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | */ |
323 | 323 | private function findLocationHtml() { |
324 | 324 | \core\common\Entity::intoThePotatoes(); |
325 | - $retval = "<p>" . _("Address:") . " <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>" . _("Find address") . "</button> <button type='button' onclick='locateMe()'>" . _("Locate Me!") . "</button></p>"; |
|
325 | + $retval = "<p>"._("Address:")." <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>"._("Find address")."</button> <button type='button' onclick='locateMe()'>"._("Locate Me!")."</button></p>"; |
|
326 | 326 | \core\common\Entity::outOfThePotatoes(); |
327 | 327 | return $retval; |
328 | 328 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $auth = new \web\lib\admin\Authentication(); |
25 | 25 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -116,12 +116,12 @@ discard block |
||
116 | 116 | </table> |
117 | 117 | </div> |
118 | 118 | <?php |
119 | - echo "<form enctype='multipart/form-data' action='edit_participant_result.php?inst_id=$my_inst->identifier" . ($wizardStyle ? "&wizard=true" : "") . "' method='post' accept-charset='UTF-8'> |
|
120 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
119 | + echo "<form enctype='multipart/form-data' action='edit_participant_result.php?inst_id=$my_inst->identifier".($wizardStyle ? "&wizard=true" : "")."' method='post' accept-charset='UTF-8'> |
|
120 | + <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>"; |
|
121 | 121 | |
122 | 122 | if ($wizardStyle) { |
123 | - echo "<p>" . |
|
124 | - sprintf(_("Hello, newcomer. The %s is new to us. This wizard will ask you several questions about it, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users."), $uiElements->nomenclatureParticipant) . "</p>"; |
|
123 | + echo "<p>". |
|
124 | + sprintf(_("Hello, newcomer. The %s is new to us. This wizard will ask you several questions about it, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users."), $uiElements->nomenclatureParticipant)."</p>"; |
|
125 | 125 | } |
126 | 126 | $optionDisplay = new web\lib\admin\OptionDisplay($idpoptions, \core\Options::LEVEL_IDP); |
127 | 127 | ?> |
@@ -163,9 +163,9 @@ discard block |
||
163 | 163 | $discardLabel = _("Discard changes"); |
164 | 164 | } |
165 | 165 | if ($wizardStyle) { |
166 | - echo "<p>" . sprintf(_("When you are sure that everything is correct, please click on %sContinue ...%s"), "<button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CONTINUE . "'>", "</button>") . "</p></form>"; |
|
166 | + echo "<p>".sprintf(_("When you are sure that everything is correct, please click on %sContinue ...%s"), "<button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CONTINUE."'>", "</button>")."</p></form>"; |
|
167 | 167 | } else { |
168 | - echo "<div><button type='submit' id='submitbutton' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button> <button type='button' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>".$discardLabel."</button></div></form>"; |
|
168 | + echo "<div><button type='submit' id='submitbutton' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button> <button type='button' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>".$discardLabel."</button></div></form>"; |
|
169 | 169 | } |
170 | 170 | echo $deco->footer(); |
171 | 171 | |
172 | 172 | \ No newline at end of file |
@@ -27,7 +27,7 @@ |
||
27 | 27 | ?> |
28 | 28 | |
29 | 29 | <?php |
30 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
30 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
31 | 31 | |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
33 | 33 | $validator = new \web\lib\common\InputValidation(); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | // we need to know if we are serving a RTL language so we can flip some heading |
22 | 22 | // items |
23 | 23 | header("Content-Type:text/css"); |
24 | -require_once dirname(dirname(dirname(__DIR__))) . "/config/_config.php"; |
|
24 | +require_once dirname(dirname(dirname(__DIR__)))."/config/_config.php"; |
|
25 | 25 | $langInstance = new core\common\Language(); |
26 | 26 | $start = $langInstance->rtl ? "right" : "left"; |
27 | 27 | $end = $langInstance->rtl ? "left" : "right"; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $deco = new \web\lib\admin\PageDecoration(); |
32 | 32 | $validator = new \web\lib\common\InputValidation(); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $detectRealm = $validator->string($_POST['realm_to_detect']); |
128 | 128 | $localname = $validator->string($_POST['username_to_detect']); |
129 | 129 | $checker = new \core\diag\RADIUSTests($detectRealm, $localname); |
130 | - $detectionResult = $checker->autodetectCAWithProbe($localname . "@" . $detectRealm); |
|
130 | + $detectionResult = $checker->autodetectCAWithProbe($localname."@".$detectRealm); |
|
131 | 131 | $loggerInstance->debug(2, "CA Auto-Detection yields:"); |
132 | 132 | $loggerInstance->debug(2, $detectionResult); |
133 | 133 | if ($detectionResult['ROOT_CA'] !== NULL) { // we are lucky! |
@@ -171,8 +171,8 @@ discard block |
||
171 | 171 | <?php |
172 | 172 | echo $uiElements->instLevelInfoBoxes($my_inst); |
173 | 173 | |
174 | - echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier" . ($my_profile !== NULL ? "&profile_id=" . $my_profile->identifier : "") . "' method='post' accept-charset='UTF-8'> |
|
175 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
174 | + echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier".($my_profile !== NULL ? "&profile_id=".$my_profile->identifier : "")."' method='post' accept-charset='UTF-8'> |
|
175 | + <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>"; |
|
176 | 176 | $optionDisplay = new \web\lib\admin\OptionDisplay($profile_options, \core\Options::LEVEL_PROFILE); |
177 | 177 | ?> |
178 | 178 | <fieldset class="option_container"> |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | </legend> |
182 | 182 | <?php |
183 | 183 | if ($wizardStyle) { |
184 | - echo "<p>" . _("We will now define a profile for your user group(s). You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.") . "</p>"; |
|
184 | + echo "<p>"._("We will now define a profile for your user group(s). You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.")."</p>"; |
|
185 | 185 | } |
186 | 186 | ?> |
187 | 187 | <h3><?php echo _("Profile Name and RADIUS realm"); ?> |
@@ -258,37 +258,37 @@ discard block |
||
258 | 258 | <tr> |
259 | 259 | <!-- checkbox and input field for anonymity support, available only when realm is known--> |
260 | 260 | <td> |
261 | - <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
261 | + <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
262 | 262 | <?php echo _("Enable Anonymous Outer Identity:"); ?> |
263 | 263 | </span> |
264 | 264 | </td> |
265 | 265 | <td> |
266 | - <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick=' |
|
266 | + <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick=' |
|
267 | 267 | if (this.form.elements["anon_support"].checked !== true) { |
268 | 268 | this.form.elements["anon_local"].setAttribute("disabled", "disabled"); |
269 | 269 | } else { |
270 | 270 | this.form.elements["anon_local"].removeAttribute("disabled"); |
271 | 271 | } |
272 | 272 | ;'/> |
273 | - <input type='text' <?php echo ($useAnon == FALSE ? "disabled" : "" ); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
273 | + <input type='text' <?php echo ($useAnon == FALSE ? "disabled" : ""); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
274 | 274 | </td> |
275 | 275 | </tr> |
276 | 276 | <tr> |
277 | 277 | <!-- checkbox and input field for check realm outer id, available only when realm is known--> |
278 | 278 | <td> |
279 | - <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
279 | + <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
280 | 280 | <?php echo _("Use special Outer Identity for realm checks:"); ?> |
281 | 281 | </span> |
282 | 282 | </td> |
283 | 283 | <td> |
284 | - <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick=' |
|
284 | + <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick=' |
|
285 | 285 | if (this.form.elements["checkuser_support"].checked !== true) { |
286 | 286 | this.form.elements["checkuser_local"].setAttribute("disabled", "disabled"); |
287 | 287 | } else { |
288 | 288 | this.form.elements["checkuser_local"].removeAttribute("disabled"); |
289 | 289 | } |
290 | 290 | ;'/> |
291 | - <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
291 | + <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
292 | 292 | </td> |
293 | 293 | </tr> |
294 | 294 | <tr> |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | </td> |
304 | 304 | <td> |
305 | 305 | <input type='checkbox' <?php |
306 | - echo ($verify != FALSE ? "checked" : "" ); |
|
306 | + echo ($verify != FALSE ? "checked" : ""); |
|
307 | 307 | ?> name='verify_support' onclick=' |
308 | 308 | if (this.form.elements["verify_support"].checked !== true || this.form.elements["realm"].value.length == 0) { |
309 | 309 | this.form.elements["hint_support"].setAttribute("disabled", "disabled"); |
@@ -315,12 +315,12 @@ discard block |
||
315 | 315 | </tr> |
316 | 316 | <tr> |
317 | 317 | <td> |
318 | - <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
318 | + <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
319 | 319 | <?php echo _("Enforce exact realm in username"); ?> |
320 | 320 | </span> |
321 | 321 | </td> |
322 | 322 | <td> |
323 | - <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> /> |
|
323 | + <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> /> |
|
324 | 324 | </td> |
325 | 325 | </tr> |
326 | 326 | </table> |
@@ -334,14 +334,14 @@ discard block |
||
334 | 334 | <p> |
335 | 335 | |
336 | 336 | <?php |
337 | - echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span> |
|
338 | - <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick=' |
|
337 | + echo "<span id='redirect_label' style='".($realm == "" ? "color:#999999" : "")."'><label for='redirect'>"._("Redirect end users to own web page:")."</label></span> |
|
338 | + <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ")."onclick=' |
|
339 | 339 | if (this.form.elements[\"redirect\"].checked != true) { |
340 | 340 | this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\"); |
341 | 341 | } else { |
342 | 342 | this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\"); |
343 | 343 | };'/> |
344 | - <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>"; |
|
344 | + <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled")."/>"; |
|
345 | 345 | ?> |
346 | 346 | </p> |
347 | 347 | |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | <?php |
382 | 382 | $D = []; |
383 | 383 | foreach ($prefill_methods as $prio => $value) { |
384 | - print '<li>' . $value->getPrintableRep() . "</li>\n"; |
|
384 | + print '<li>'.$value->getPrintableRep()."</li>\n"; |
|
385 | 385 | $D[$value->getPrintableRep()] = $prio; |
386 | 386 | } |
387 | 387 | ?> |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | } |
408 | 408 | $display = $a->getPrintableRep(); |
409 | 409 | if (!isset($D[$a->getPrintableRep()])) { |
410 | - print '<li class="eap1">' . $a->getPrintableRep() . "</li>\n"; |
|
410 | + print '<li class="eap1">'.$a->getPrintableRep()."</li>\n"; |
|
411 | 411 | } |
412 | 412 | } |
413 | 413 | ?> |
@@ -420,8 +420,8 @@ discard block |
||
420 | 420 | foreach ($methods as $a) { |
421 | 421 | $display = $a->getPrintableRep(); |
422 | 422 | $v = isset($D[$display]) ? $D[$display] : ''; |
423 | - print '<input type="hidden" class="eapm" name="' . $display . '" id="EAP-' . $display . '" value="' . $display . '">'; |
|
424 | - print '<input type="hidden" class="eapmv" name="' . $display . '-priority" id="EAP-' . $display . '-priority" value="' . $v . '">'; |
|
423 | + print '<input type="hidden" class="eapm" name="'.$display.'" id="EAP-'.$display.'" value="'.$display.'">'; |
|
424 | + print '<input type="hidden" class="eapmv" name="'.$display.'-priority" id="EAP-'.$display.'-priority" value="'.$v.'">'; |
|
425 | 425 | } |
426 | 426 | ?> |
427 | 427 | <br style="clear:both;" /> |
@@ -441,11 +441,11 @@ discard block |
||
441 | 441 | foreach ($optionsAlreadySet as $optionNames) { |
442 | 442 | if (preg_match("/^support:/", $optionNames)) { |
443 | 443 | $has_support_options[$optionNames] = "SET"; |
444 | - $support_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>"; |
|
444 | + $support_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>"; |
|
445 | 445 | } |
446 | 446 | if (preg_match("/^media:/", $optionNames)) { |
447 | 447 | $has_media_options[$optionNames] = "SET"; |
448 | - $media_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>"; |
|
448 | + $media_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>"; |
|
449 | 449 | } |
450 | 450 | } |
451 | 451 | $fields = [ |
@@ -454,12 +454,12 @@ discard block |
||
454 | 454 | "media" => _("Media Properties for this profile")]; |
455 | 455 | |
456 | 456 | foreach ($fields as $name => $description) { |
457 | - echo "<fieldset class='option_container' id='" . $name . "_override'> |
|
457 | + echo "<fieldset class='option_container' id='".$name."_override'> |
|
458 | 458 | <legend><strong>$description</strong></legend> |
459 | 459 | <p>"; |
460 | 460 | echo $wizard->displayHelp($name); |
461 | - if (count(${"has_" . $name . "_options"}) > 0) { |
|
462 | - printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_" . $name . "_options"})), "<ul>" . ${$name . "_text"} . "</ul>"); |
|
461 | + if (count(${"has_".$name."_options"}) > 0) { |
|
462 | + printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_".$name."_options"})), "<ul>".${$name."_text"}."</ul>"); |
|
463 | 463 | } |
464 | 464 | echo "</p>"; |
465 | 465 | echo $optionDisplay->prefilledOptionTable($name, $my_inst->federation); |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | echo "</fieldset>"; |
470 | 470 | } |
471 | 471 | if ($wizardStyle) { |
472 | - echo "<p>" . _("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.") . "</p>"; |
|
472 | + echo "<p>"._("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.")."</p>"; |
|
473 | 473 | } |
474 | 474 | if ($editMode == 'readonly') { |
475 | 475 | $discardLabel = _("Return"); |
@@ -477,6 +477,6 @@ discard block |
||
477 | 477 | if ($editMode == 'fullaccess') { |
478 | 478 | $discardLabel = _("Discard changes"); |
479 | 479 | } |
480 | -echo "<p><button type='submit' id='submitbutton' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' id=='abortbutton' style='visibility: visible' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>".$discardLabel."</button></p></form>"; |
|
480 | +echo "<p><button type='submit' id='submitbutton' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' id=='abortbutton' style='visibility: visible' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>".$discardLabel."</button></p></form>"; |
|
481 | 481 | echo $deco->footer(); |
482 | 482 |
@@ -115,12 +115,12 @@ discard block |
||
115 | 115 | $this->name = $this->languageInstance->getLocalisedValue($this->getAttributes('general:instname')); |
116 | 116 | $eligibility = $this->eligibility($instQuery->type); |
117 | 117 | if (in_array(IdP::ELIGIBILITY_IDP, $eligibility) && in_array(IdP::ELIGIBILITY_SP, $eligibility)) { |
118 | - $eligType = IdP::TYPE_IDPSP . ""; |
|
118 | + $eligType = IdP::TYPE_IDPSP.""; |
|
119 | 119 | $this->type = $eligType; |
120 | 120 | } elseif (in_array(IdP::ELIGIBILITY_IDP, $eligibility)) { |
121 | - $eligType = IdP::TYPE_IDP . ""; |
|
121 | + $eligType = IdP::TYPE_IDP.""; |
|
122 | 122 | } else { |
123 | - $eligType = IdP::TYPE_SP . ""; |
|
123 | + $eligType = IdP::TYPE_SP.""; |
|
124 | 124 | } |
125 | 125 | $this->type = $eligType; |
126 | 126 | $this->loggerInstance->debug(4, "--- END Constructing new IdP object $instId ... ---\n"); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | */ |
135 | 135 | public function listProfiles(bool $activeOnly = FALSE) |
136 | 136 | { |
137 | - $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier" . ($activeOnly ? " AND showtime = 1" : "")." ORDER BY preference"; |
|
137 | + $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier".($activeOnly ? " AND showtime = 1" : "")." ORDER BY preference"; |
|
138 | 138 | $allProfiles = $this->databaseHandle->exec($query); |
139 | 139 | $returnarray = []; |
140 | 140 | // SELECT -> resource, not boolean |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $returnarray[] = $oneProfile; |
145 | 145 | } |
146 | 146 | |
147 | - $this->loggerInstance->debug(4, "listProfiles: " . /** @scrutinizer ignore-type */ print_r($returnarray, true)); |
|
147 | + $this->loggerInstance->debug(4, "listProfiles: "./** @scrutinizer ignore-type */ print_r($returnarray, true)); |
|
148 | 148 | return $returnarray; |
149 | 149 | } |
150 | 150 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | public function listDeployments(bool $activeOnly = FALSE) |
158 | 158 | { |
159 | - $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier" . ($activeOnly ? " AND status = " . AbstractDeployment::ACTIVE : ""); |
|
159 | + $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier".($activeOnly ? " AND status = ".AbstractDeployment::ACTIVE : ""); |
|
160 | 160 | $allDeployments = $this->databaseHandle->exec($query); |
161 | 161 | $returnarray = []; |
162 | 162 | // SELECT -> resource, not boolean |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $returnarray[] = new DeploymentManaged($this, $deploymentQuery->deployment_id); |
165 | 165 | } |
166 | 166 | |
167 | - $this->loggerInstance->debug(4, "listDeployments: " . /** @scrutinizer ignore-type */ print_r($returnarray, true)); |
|
167 | + $this->loggerInstance->debug(4, "listDeployments: "./** @scrutinizer ignore-type */ print_r($returnarray, true)); |
|
168 | 168 | return $returnarray; |
169 | 169 | } |
170 | 170 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $redirectProfileIds = []; |
191 | 191 | $allProfileLevels = $this->databaseHandle->exec("SELECT profile_id, sufficient_config + showtime AS maxlevel FROM profile WHERE inst_id = $this->identifier ORDER BY maxlevel DESC"); |
192 | 192 | // SELECT yields a resource, not a boolean |
193 | - if ($allProfileLevels->num_rows == 0 ) { |
|
193 | + if ($allProfileLevels->num_rows == 0) { |
|
194 | 194 | return self::PROFILES_INCOMPLETE; |
195 | 195 | } |
196 | 196 | $allProfilesArray = $allProfileLevels->fetch_all(MYSQLI_ASSOC); |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | $allProfiles = $this->databaseHandle->exec("SELECT MIN(openroaming) AS maxlevel FROM profile WHERE inst_id = $this->identifier"); |
219 | 219 | // SELECT yields a resource, not a boolean |
220 | 220 | while ($res = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allProfiles)) { |
221 | - return (is_numeric($res->maxlevel) ? (int)$res->maxlevel : AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO ); // insts without profiles should get a "NO" |
|
221 | + return (is_numeric($res->maxlevel) ? (int) $res->maxlevel : AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO); // insts without profiles should get a "NO" |
|
222 | 222 | } |
223 | 223 | return AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO; |
224 | 224 | } |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | case AbstractProfile::PROFILETYPE_SILVERBULLET: |
350 | 350 | $theProfile = new ProfileSilverbullet($identifier, $this); |
351 | 351 | $theProfile->addSupportedEapMethod(new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET), 1); |
352 | - $theProfile->setRealm($this->identifier . "-" . $theProfile->identifier . "." . strtolower($this->federation) . strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix'])); |
|
352 | + $theProfile->setRealm($this->identifier."-".$theProfile->identifier.".".strtolower($this->federation).strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix'])); |
|
353 | 353 | return $theProfile; |
354 | 354 | default: |
355 | 355 | throw new Exception("This type of profile is unknown and can not be added."); |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | public function getExternalDBId() |
493 | 493 | { |
494 | 494 | if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED |
495 | - $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = " . self::EXTERNAL_DB_SYNCSTATE_SYNCED); |
|
495 | + $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = ".self::EXTERNAL_DB_SYNCSTATE_SYNCED); |
|
496 | 496 | // SELECT -> it's a resource, not a boolean |
497 | 497 | if (mysqli_num_rows(/** @scrutinizer ignore-type */ $idQuery) == 0) { |
498 | 498 | return FALSE; |
@@ -558,16 +558,16 @@ discard block |
||
558 | 558 | } |
559 | 559 | foreach ($baseline as $lang => $value) { |
560 | 560 | if (!key_exists($lang, $newvalues)) { |
561 | - $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] DELETED"; |
|
561 | + $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] DELETED"; |
|
562 | 562 | } else { |
563 | 563 | if ($value != $newvalues[$lang]) { |
564 | - $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] CHANGED from '" . $baseline[$lang] . "' to '" . $newvalues[$lang] . "'"; |
|
564 | + $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] CHANGED from '".$baseline[$lang]."' to '".$newvalues[$lang]."'"; |
|
565 | 565 | } |
566 | 566 | } |
567 | 567 | } |
568 | 568 | foreach ($newvalues as $lang => $value) { |
569 | 569 | if (!key_exists($lang, $baseline)) { |
570 | - $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] ADDED as '" . $value . "'"; |
|
570 | + $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] ADDED as '".$value."'"; |
|
571 | 571 | } |
572 | 572 | } |
573 | 573 | return $retval; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | ?> |
28 | 28 | |
29 | 29 | <?php |
30 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
30 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
31 | 31 | |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
33 | 33 | $validator = new \web\lib\common\InputValidation(); |