Passed
Push — master ( 008126...48fb30 )
by Tomasz
04:37
created
devices/xml/XML.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -342,7 +342,7 @@
 block discarded – undo
342 342
     $qualClassName = get_class($object);
343 343
     // remove namespace qualifier
344 344
     $pos = strrpos($qualClassName, '\\');
345
-    $className =  substr($qualClassName, $pos + 1);
345
+    $className = substr($qualClassName, $pos + 1);
346 346
     $name = preg_replace("/_/", "-", $className);
347 347
     if ($object->getValue()) {
348 348
         $val = $object->getValue();
Please login to merge, or discard this patch.
core/DeviceFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $Dev = \devices\Devices::listDevices();
51 51
         if (isset($Dev[$blueprint])) {
52 52
             $this->loggerInstance->debug(4, "loaded: devices/" . $Dev[$blueprint]['directory'] . "/" . $Dev[$blueprint]['module'] . ".php\n");
53
-            $class_name = "\devices\\".$Dev[$blueprint]['directory']."\Device_" . $Dev[$blueprint]['module'];
53
+            $class_name = "\devices\\" . $Dev[$blueprint]['directory'] . "\Device_" . $Dev[$blueprint]['module'];
54 54
             $this->device = new $class_name();
55 55
             if (!$this->device) {
56 56
                 $this->loggerInstance->debug(2, "module loading failed");
Please login to merge, or discard this patch.
utils/ocsp_update.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     core\ProfileSilverbullet::triggerNewOCSPStatement($serialRow->serial_number);
24 24
 }
25 25
 
26
- /* 
26
+    /* 
27 27
   * and then writes all recently updated statements to a temporary directory. The 
28 28
   * calling script ocsp_update.sh should then scp all the files to their 
29 29
   * destination.
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,18 +30,18 @@
 block discarded – undo
30 30
   * destination.
31 31
   */
32 32
 
33
-$tempdir = __DIR__."/temp_ocsp";
33
+$tempdir = __DIR__ . "/temp_ocsp";
34 34
 mkdir($tempdir);
35 35
 
36 36
 $allStatements = $dbLink->exec("SELECT serial_number,OCSP FROM silverbullet_certificate WHERE serial_number IS NOT NULL AND expiry > NOW() AND OCSP_timestamp > DATE_SUB(NOW(), INTERVAL 8 DAY)");
37 37
 
38 38
 while ($statementRow = mysqli_fetch_object($allStatements)) {
39 39
 #    echo "Writing OCSP statement for serial number $statementRow->serial_number\n";
40
-    $filename = strtoupper(dechex($statementRow->serial_number)).".der";
40
+    $filename = strtoupper(dechex($statementRow->serial_number)) . ".der";
41 41
     if (strlen($filename) % 2 == 1) {
42 42
         $filename = "0" . $filename;
43 43
     }
44
-    $fileHandle = fopen($tempdir."/$filename","w");
44
+    $fileHandle = fopen($tempdir . "/$filename", "w");
45 45
     fwrite($fileHandle, $statementRow->OCSP);
46 46
     fclose($fileHandle);
47 47
 }
Please login to merge, or discard this patch.
devices/ms/Files/common.inc 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1005,12 +1005,12 @@
 block discarded – undo
1005 1005
         $certUsernameLabel = WindowsCommon::sprint_nsi(_("Username:"));
1006 1006
         $certUsernameLength = strlen($certUsernameLabel);
1007 1007
         $labelLength = max($certPasswordLenght,$certUsernameLength);
1008
-  ?>
1008
+    ?>
1009 1009
   ${NSD_CreateLabel} 0 0 100% 32u "<?php WindowsCommon::echo_nsi(_("Selected file: \$Cert_file"))?>"
1010 1010
   !else
1011 1011
   <?php $certPasswordLabel = WindowsCommon::sprint_nsi(_("import password:"));
1012 1012
         $certPasswordLenght = strlen($certPasswordLabel);
1013
-  ?>
1013
+    ?>
1014 1014
   !insertmacro debug_cat 4 "Unpacking SB_cert.p12"
1015 1015
   File "SB_cert.p12"
1016 1016
   nsArray::Set Delete_files "SB_cert.p12"
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
 !define MUI_HEADERIMAGE_BITMAP "cat_150.bmp"
121 121
 !define MUI_COMPONENTSPAGE_SMALLDESC
122 122
 
123
-!define WELCOME_HEADER "<?php printf(WindowsCommon::sprint_nsi(_("Welcome to the %s installer")),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?>"
124
-!define FAREWELL_HEADER "<?php WindowsCommon::echo_nsi( _("Installation complete"))?>"
125
-!define FAREWELL_TEXT	"<?php WindowsCommon::echo_nsi( _("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi(  _("Your system is ready."))?>"
126
-!define FAREWELL_FAIL	"<?php WindowsCommon::echo_nsi( _("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi( _("Please contact \${SUPPORT}."))?>"
123
+!define WELCOME_HEADER "<?php printf(WindowsCommon::sprint_nsi(_("Welcome to the %s installer")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?>"
124
+!define FAREWELL_HEADER "<?php WindowsCommon::echo_nsi(_("Installation complete"))?>"
125
+!define FAREWELL_TEXT	"<?php WindowsCommon::echo_nsi(_("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi(_("Your system is ready."))?>"
126
+!define FAREWELL_FAIL	"<?php WindowsCommon::echo_nsi(_("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi(_("Please contact \${SUPPORT}."))?>"
127 127
 ;--------------------------------
128 128
 ;Languages
129 129
 !insertmacro MUI_LANGUAGE "${LANG}"
@@ -131,14 +131,14 @@  discard block
 block discarded – undo
131 131
 ;--------------------------------
132 132
 ; License file
133 133
 !ifdef LICENSE_FILE
134
-LicenseForceSelection checkbox "<?php WindowsCommon::echo_nsi( _("Accept"))?>"
134
+LicenseForceSelection checkbox "<?php WindowsCommon::echo_nsi(_("Accept"))?>"
135 135
 LicenseText "<?php WindowsCommon::echo_nsi(_("If you accept the conditions then select Accept and then click Install to continue."))?>"
136 136
 LicenseData ${LICENSE_FILE}
137 137
 !endif
138 138
 
139 139
 ;-----------------------------------
140 140
 
141
-MiscButtonText "" "" "" "<?php WindowsCommon::echo_nsi( _("Finish"))?>"
141
+MiscButtonText "" "" "" "<?php WindowsCommon::echo_nsi(_("Finish"))?>"
142 142
 ;----------------------------------
143 143
 ;  FUNCTIONS
144 144
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
 !macro install_ca_cert ca_file ca_fingerprint level
173 173
    !insertmacro debug_cat 2 "locating certificate  SHA=${ca_fingerprint} Level=${level}"
174
-   DetailPrint "<?php WindowsCommon::echo_nsi( _("searching for certificate"))?> ${ca_file}"
174
+   DetailPrint "<?php WindowsCommon::echo_nsi(_("searching for certificate"))?> ${ca_file}"
175 175
    File "${ca_file}"
176 176
    nsArray::Set Delete_files "${ca_file}"
177 177
    !insertmacro debug_cat 2 "Testing machine store root"
@@ -233,13 +233,13 @@  discard block
 block discarded – undo
233 233
    ${EndIf}
234 234
    !insertmacro debug_cat 2 "installing certificate $TEMP\${ca_file}"
235 235
    !insertmacro debug_cat 3 "Execute: certutil -addstore -user ${level} $TEMP\${ca_file}"
236
-   DetailPrint "<?php WindowsCommon::echo_nsi( _("installing certificate"))?> ${ca_file}"
236
+   DetailPrint "<?php WindowsCommon::echo_nsi(_("installing certificate"))?> ${ca_file}"
237 237
    nsExec::Exec '"certutil" -addstore -user ${level} $TEMP\${ca_file}'
238 238
    Pop $0
239 239
    !insertmacro debug_cat 3 "certutil returned $0"
240 240
    ${If} $0 != 0
241 241
      IfSilent +2
242
-     MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi( _("could not install certificate"))?>  ${ca_file}"
242
+     MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi(_("could not install certificate"))?>  ${ca_file}"
243 243
      !insertmacro debug_cat 1 "could not install certificate ${ca_file}"
244 244
    ${EndIf}
245 245
 no_install_${ca_file}:
@@ -428,26 +428,26 @@  discard block
 block discarded – undo
428 428
   pop $R0
429 429
   ${If} $tkip_count > 0
430 430
     ${If} $aes_count > 1
431
-      StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi( _("The non TKIP profiles are preferred. Always use them if you have a choice."))?>"
431
+      StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi(_("The non TKIP profiles are preferred. Always use them if you have a choice."))?>"
432 432
     ${Else}
433
-     StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi( _("The non TKIP profile is preferred. Always use it if you have a choice."))?>"
433
+     StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi(_("The non TKIP profile is preferred. Always use it if you have a choice."))?>"
434 434
     ${EndIf}
435 435
   ${Else}
436 436
     StrCpy $R1 ""
437 437
   ${EndIf}
438 438
   ${If} $profile_count > 0
439
-    StrCpy $welcome_message "<?php WindowsCommon::echo_nsi( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\
440
-<?php WindowsCommon::echo_nsi( _("The installer will create the following wireless profiles:"))?>$\r$\n\
439
+    StrCpy $welcome_message "<?php WindowsCommon::echo_nsi(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\
440
+<?php WindowsCommon::echo_nsi(_("The installer will create the following wireless profiles:"))?>$\r$\n\
441 441
 $R0.\
442 442
 $R1$\r$\n$\n\
443
-<?php WindowsCommon::echo_nsi( _("More information and comments:"))?>$\r$\n\
443
+<?php WindowsCommon::echo_nsi(_("More information and comments:"))?>$\r$\n\
444 444
    EMAIL: ${SUPPORT}$\r$\n\
445 445
    WWW: ${URL}"
446 446
 ${Else}
447
-StrCpy $welcome_message "<?php WindowsCommon::echo_nsi( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\
448
-<?php WindowsCommon::echo_nsi( _("The installer will create the wireless profile:"))?> $R0.\
447
+StrCpy $welcome_message "<?php WindowsCommon::echo_nsi(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\
448
+<?php WindowsCommon::echo_nsi(_("The installer will create the wireless profile:"))?> $R0.\
449 449
 $R1$\r$\n$\n\
450
-<?php WindowsCommon::echo_nsi( _("More information and comments:"))?>$\r$\n\
450
+<?php WindowsCommon::echo_nsi(_("More information and comments:"))?>$\r$\n\
451 451
    EMAIL: ${SUPPORT}$\r$\n\
452 452
    WWW: ${URL}"
453 453
 ${EndIf}
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
   SendMessage $HEADLINE ${WM_SETFONT} $HEADLINE_FONT 0
474 474
 ;TRANSLATION
475 475
   nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 46u -130u -32u "$welcome_message\
476
-$\r$\n$\r$\n<?php WindowsCommon::echo_nsi( _("Installer created with software from the GEANT project."))?>"
476
+$\r$\n$\r$\n<?php WindowsCommon::echo_nsi(_("Installer created with software from the GEANT project."))?>"
477 477
   Pop $TEXT
478 478
 
479 479
   SetCtlColors $DIALOG "" 0xffffff
@@ -571,18 +571,18 @@  discard block
 block discarded – undo
571 571
     ${If} $wireless_result == 1
572 572
       !insertmacro debug_cat 1 "wlan_test.exe did not find wireless configuration service"
573 573
       IfSilent +2
574
-      MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi( _("Windows wireless configuration service is not enabled. The installer cannot continue."))?>"
574
+      MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi(_("Windows wireless configuration service is not enabled. The installer cannot continue."))?>"
575 575
       Call Cleanup
576 576
     ${EndIf}
577 577
     ${If} $wireless_result == 2
578 578
       IfSilent +2
579
-      MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi( _("No wireless interfaces found. The installer cannot continue."))?>"
579
+      MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi(_("No wireless interfaces found. The installer cannot continue."))?>"
580 580
       Call Cleanup
581 581
     ${EndIf}
582 582
   ${Else}
583 583
     ${If} $wireless_result > 0
584 584
        IfSilent +3
585
-       MessageBox MB_YESNO "<?php WindowsCommon::echo_nsi( _("No wireless interfaces found. Wireless access will not be configured. Would you like to continue and configure access on the wired interface?"))?>" IDYES wired_yes
585
+       MessageBox MB_YESNO "<?php WindowsCommon::echo_nsi(_("No wireless interfaces found. Wireless access will not be configured. Would you like to continue and configure access on the wired interface?"))?>" IDYES wired_yes
586 586
        Call Cleanup
587 587
        wired_yes:
588 588
        Push 1
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
     ${If} $wired == 1
599 599
       ${If} $force_wired == 0
600 600
         IfSilent wired
601
-        MessageBox MB_YESNO "<?php WindowsCommon::echo_nsi( _("Do you want to enable access on wired interfaces?"))?>" IDYES wired
601
+        MessageBox MB_YESNO "<?php WindowsCommon::echo_nsi(_("Do you want to enable access on wired interfaces?"))?>" IDYES wired
602 602
         Push 0
603 603
         Pop $wired
604 604
       ${EndIf}
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
 ;================================
634 634
 
635 635
 Function ShowInstfiles
636
-  !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi( _("Profiles installation"))?>" " "
636
+  !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi(_("Profiles installation"))?>" " "
637 637
 FunctionEnd
638 638
 ;================================
639 639
 ;  Check if a wireless profile exist and put it on delete list
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
 
653 653
 Function FindProfile
654 654
   Pop $R8
655
-  DetailPrint "<?php WindowsCommon::echo_nsi( _("Checking for profile \$R8"))?>"
655
+  DetailPrint "<?php WindowsCommon::echo_nsi(_("Checking for profile \$R8"))?>"
656 656
   !insertmacro debug_cat 2 "Checking for profile $R8"
657 657
   !insertmacro debug_cat 3 "Exec: $Netsh wlan show profiles $R8"
658 658
   nsExec::Exec  '"$Netsh" wlan show profiles "$R8"'
@@ -660,7 +660,7 @@  discard block
 block discarded – undo
660 660
   !insertmacro debug_cat 4 "netsh returned $0"
661 661
   ${If} $0 == 0
662 662
     !insertmacro debug_cat 1 "found profile $R8"
663
-    DetailPrint "<?php WindowsCommon::echo_nsi( _("found profile \$R8"))?>"
663
+    DetailPrint "<?php WindowsCommon::echo_nsi(_("found profile \$R8"))?>"
664 664
     Push 0
665 665
   ${Else}
666 666
     !insertmacro debug_cat 1 "profile $R8 not found"
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
     ${If} $Symantec_installed  != 0
756 756
      !insertmacro debug_cat 3 "Symantec problem"
757 757
      IfSilent +2
758
-     MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprint_nsi(_("Please READ this message it is IMPORTANT.$\\r$\\nInstallation problems may be due to the fact that Symantec Endpoint Protection is installed on your machine.$\\r$\\nWhile this is a well-known bug of the Symantec product, about which the installer can not do anything, there is a workaround.$\\r$\\nWhen you close this window the installer will exit and an explorer window will be started (it could appear underneath already opened windows). In this window you should see a script named inst_cat. Start it by double-clicking, It will install the profiles. You will need to login to %s with your username and password.")),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) ?>"
758
+     MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprint_nsi(_("Please READ this message it is IMPORTANT.$\\r$\\nInstallation problems may be due to the fact that Symantec Endpoint Protection is installed on your machine.$\\r$\\nWhile this is a well-known bug of the Symantec product, about which the installer can not do anything, there is a workaround.$\\r$\\nWhen you close this window the installer will exit and an explorer window will be started (it could appear underneath already opened windows). In this window you should see a script named inst_cat. Start it by double-clicking, It will install the profiles. You will need to login to %s with your username and password.")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) ?>"
759 759
     Exec '"explorer" /select,"$EXEDIR\inst_cat.cmd"'
760 760
     Quit
761 761
 
@@ -988,7 +988,7 @@  discard block
 block discarded – undo
988 988
 Function PFXCertificateSelect
989 989
   !ifndef SILVERBULLET
990 990
 ;TRANSLATION
991
-!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprint_nsi(_("%s installer for")),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?> " "<?php WindowsCommon::echo_nsi(_("Install personal certificate"))?>"
991
+!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprint_nsi(_("%s installer for")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?> " "<?php WindowsCommon::echo_nsi(_("Install personal certificate"))?>"
992 992
 ;TRANSLATION
993 993
     IfSilent +2
994 994
   MessageBox MB_OK "<?php WindowsCommon::echo_nsi(_("Preparing to install personal certificate."))?>$\r$\n<?php WindowsCommon::echo_nsi(_("Click OK to continue"))?> "
@@ -1004,7 +1004,7 @@  discard block
 block discarded – undo
1004 1004
         $certPasswordLenght = strlen($certPasswordLabel);
1005 1005
         $certUsernameLabel = WindowsCommon::sprint_nsi(_("Username:"));
1006 1006
         $certUsernameLength = strlen($certUsernameLabel);
1007
-        $labelLength = max($certPasswordLenght,$certUsernameLength);
1007
+        $labelLength = max($certPasswordLenght, $certUsernameLength);
1008 1008
   ?>
1009 1009
   ${NSD_CreateLabel} 0 0 100% 32u "<?php WindowsCommon::echo_nsi(_("Selected file: \$Cert_file"))?>"
1010 1010
   !else
@@ -1021,11 +1021,11 @@  discard block
 block discarded – undo
1021 1021
   !insertmacro debug_cat 3 "Vista level (Vista without Service pack): $VistaNoSP";
1022 1022
   ${If} $VistaNoSP == 0
1023 1023
     !ifdef PFX_USERNAME
1024
-       !define LABEL_LENGTH "<?php echo($labelLength*3.5)?>u"
1025
-       !define TEXT_START "<?php echo($labelLength*3.5 +5)?>u"
1024
+       !define LABEL_LENGTH "<?php echo($labelLength * 3.5)?>u"
1025
+       !define TEXT_START "<?php echo($labelLength * 3.5 + 5)?>u"
1026 1026
     !else
1027
-       !define LABEL_LENGTH "<?php echo($certPasswordLenght*3.5)?>u"
1028
-       !define TEXT_START "<?php echo($certPasswordLenght*3.5 +5)?>u"
1027
+       !define LABEL_LENGTH "<?php echo($certPasswordLenght * 3.5)?>u"
1028
+       !define TEXT_START "<?php echo($certPasswordLenght * 3.5 + 5)?>u"
1029 1029
     !endif
1030 1030
     ${NSD_CreateLabel} 0 35u ${LABEL_LENGTH} 12u "<?php echo $certPasswordLabel?>"
1031 1031
     ${NSD_CreatePassword} ${TEXT_START} 34.5u 120u 12u ""
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
 Section "-start"
1213 1213
 SectionIn RO
1214 1214
 
1215
-!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi( _("Installation"))?>" "<?php WindowsCommon::echo_nsi( _("Checking for existing wireless profiles"))?>"
1215
+!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi(_("Installation"))?>" "<?php WindowsCommon::echo_nsi(_("Checking for existing wireless profiles"))?>"
1216 1216
 !ifndef PWD
1217 1217
 !include "certs.nsh"
1218 1218
 !endif
Please login to merge, or discard this patch.
web/4013.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
 <body style='background: #fff url(resources/images/bg_grey_tile.png) repeat-x;'>
30 30
     <div id="heading">
31 31
         <?php
32
-        print '<img src="'. dirname($_SERVER['SCRIPT_NAME']) .'/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>';
33
-        print '<div id="motd">' . ( isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : '&nbsp' ) . '</div>';
32
+        print '<img src="' . dirname($_SERVER['SCRIPT_NAME']) . '/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>';
33
+        print '<div id="motd">' . (isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : '&nbsp') . '</div>';
34 34
         print '<h1 style="padding-bottom:0px; height:1em;">' . sprintf(_("Welcome to %s"), CONFIG['APPEARANCE']['productname']) . '</h1>
35 35
 <h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . CONFIG['APPEARANCE']['productname_long'] . '</h2>';
36 36
         echo '<table id="lang_select"><tr><td>';
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
         ?>
45 45
     </div> <!-- id="heading" -->
46 46
     <div id="main_body" style='padding:20px;'>
47
-        <h1><?php echo _("Maybe this is the CAT you are looking for...");?></h1>
48
-        <p><?php echo _("but we don't want to show it to you. You need to be authenticated and authorised to see this content. Since you are not, you got this error page usually known as");?></p>
47
+        <h1><?php echo _("Maybe this is the CAT you are looking for..."); ?></h1>
48
+        <p><?php echo _("but we don't want to show it to you. You need to be authenticated and authorised to see this content. Since you are not, you got this error page usually known as"); ?></p>
49 49
         <h2>401/403</h2>
50 50
         <p><?php echo sprintf(_("Your mistake? Our error? Who knows! Maybe you should go back to the <a href='%s'>Start Page</a>."), dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang())?></p>
51 51
     </div>
Please login to merge, or discard this patch.
web/resources/css/cat.css.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 }
19 19
 
20 20
 body {
21
-    background: <?php echo $colour1;?>;
21
+    background: <?php echo $colour1; ?>;
22 22
     color: #000000;
23 23
     font-family:Verdana, Arial, Helvetica, sans-serif;
24 24
     font-size:11px;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 }
34 34
 
35 35
 button {
36
-    background: <?php echo $colour2;?>; 
36
+    background: <?php echo $colour2; ?>; 
37 37
     color: #FFFFFF; 
38 38
     min-height: 23px;
39 39
     border-left-style: outset; 
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
     border-bottom-style:solid;
216 216
     border-top-width:5px; 
217 217
     border-bottom-width:5px; 
218
-    border-color: <?php echo $colour1;?>;
218
+    border-color: <?php echo $colour1; ?>;
219 219
     padding-left:30px;
220
-    color: <?php echo $colour2;?>;
220
+    color: <?php echo $colour2; ?>;
221 221
 }
222 222
 
223 223
 div.pagecontent {
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 
411 411
 span.edu_cat {
412 412
     font-weight: bold;
413
-    color: <?php echo $colour2;?>;
413
+    color: <?php echo $colour2; ?>;
414 414
 }
415 415
 
416 416
 span.tooltip {
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
     border-bottom-style:solid;
524 524
     border-top-width:5px; 
525 525
     border-bottom-width:5px; 
526
-    border-color: <?php echo $colour1;?>; 
526
+    border-color: <?php echo $colour1; ?>; 
527 527
     padding-left:30px;
528 528
 }
529 529
 
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
 }
578 578
 
579 579
 span.redirect_link {
580
-    background: <?php echo $colour2;?>; color: #FFFFFF; height: 23px;
580
+    background: <?php echo $colour2; ?>; color: #FFFFFF; height: 23px;
581 581
     border-left-style: inset; border-left-width: 1px; border-left-color: #8bbacb;
582 582
     border-top-style: inset; border-top-width: 1px; border-top-color: #8bbacb;
583 583
     border-right-style: outset; border-right-width: 2px; border-right-color: #043d52;
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 }
625 625
 
626 626
 #close_button {
627
-    background: <?php echo $colour2;?>; 
627
+    background: <?php echo $colour2; ?>; 
628 628
     color: #FFFFFF; 
629 629
     height: 23px;
630 630
     border-left-style: inset; 
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
     width: 30em; 
706 706
     padding-left: 10px; 
707 707
     padding-right: 0px; 
708
-    background: <?php echo $colour2;?>; 
708
+    background: <?php echo $colour2; ?>; 
709 709
     color: white; 
710 710
     box-shadow: 10px 10px 5px #888888;
711 711
 }
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
     width: 30em; 
715 715
     padding-left: 10px; 
716 716
     padding-right: 00px; 
717
-    background: <?php echo $colour2;?>; 
717
+    background: <?php echo $colour2; ?>; 
718 718
     color: #FFFFFF; 
719 719
     box-shadow: 10px 10px 5px #888888;
720 720
 }
@@ -762,7 +762,7 @@  discard block
 block discarded – undo
762 762
     padding-top: 4px; 
763 763
     padding-bottom: 12px; 
764 764
     padding-left: 30px; 
765
-    background: <?php echo $colour1;?>; 
765
+    background: <?php echo $colour1; ?>; 
766 766
     text-align: left; 
767 767
     text-shadow: 10px 10px 5px #888888;
768 768
 }
@@ -772,9 +772,9 @@  discard block
 block discarded – undo
772 772
     border-bottom-style:solid;
773 773
     border-top-width:5px;
774 774
     border-bottom-width:5px;
775
-    border-color: <?php echo $colour1;?>;
775
+    border-color: <?php echo $colour1; ?>;
776 776
     padding-left:30px;
777
-    color: <?php echo $colour2;?>;
777
+    color: <?php echo $colour2; ?>;
778 778
 }
779 779
 
780 780
 #heading h1 { 
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
     text-align: justify;
794 794
     border-bottom-style:solid;
795 795
     border-bottom-width:5px;
796
-    border-color: <?php echo $colour1;?>;
796
+    border-color: <?php echo $colour1; ?>;
797 797
     font-size: 11px;
798 798
     font-weight: normal;
799 799
 }
@@ -841,7 +841,7 @@  discard block
 block discarded – undo
841 841
 
842 842
 #faq {
843 843
     padding: 20px;
844
-    color: <?php echo $colour2;?>;
844
+    color: <?php echo $colour2; ?>;
845 845
     background: #ffffff;
846 846
 }
847 847
 
@@ -894,7 +894,7 @@  discard block
 block discarded – undo
894 894
 
895 895
 #line1 {
896 896
     top:145px;
897
-    color: <?php echo $colour2;?>;
897
+    color: <?php echo $colour2; ?>;
898 898
     font-size:20px;
899 899
 }
900 900
 
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
 
950 950
 #menu_column {
951 951
     border-right:solid;
952
-    border-color: <?php echo $colour1;?>;
952
+    border-color: <?php echo $colour1; ?>;
953 953
     border-width:5px;
954 954
     min-height:400px;
955 955
     padding-left: 10px;
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
 
961 961
 #front_page_leftmenu {
962 962
     border-right:solid; 
963
-    border-color: <?php echo $colour1;?>; 
963
+    border-color: <?php echo $colour1; ?>; 
964 964
     border-width:5px; 
965 965
     min-height:400px; 
966 966
     padding-left: 10px; 
@@ -989,11 +989,11 @@  discard block
 block discarded – undo
989 989
 }
990 990
 
991 991
 a:link {
992
-    color:<?php echo $colour2;?>;
992
+    color:<?php echo $colour2; ?>;
993 993
 }
994 994
 
995 995
 a:visited {
996
-    color:<?php echo $colour2;?>;
996
+    color:<?php echo $colour2; ?>;
997 997
 }
998 998
 
999 999
 a:hover {
@@ -1001,7 +1001,7 @@  discard block
 block discarded – undo
1001 1001
 }
1002 1002
 
1003 1003
 a:active {
1004
-    color:<?php echo $colour2;?>;
1004
+    color:<?php echo $colour2; ?>;
1005 1005
 }
1006 1006
 
1007 1007
 .comment {
Please login to merge, or discard this patch.
core/ProfileSilverbullet.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -52,6 +52,9 @@
 block discarded – undo
52 52
      */
53 53
     const PRODUCTNAME = "Managed IdP";
54 54
 
55
+    /**
56
+     * @param integer $length
57
+     */
55 58
     public static function random_str(
56 59
     $length, $keyspace = '23456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
57 60
     ) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
             $certificatesResult = $this->databaseHandle->exec("SELECT * FROM `silverbullet_certificate` WHERE `silverbullet_invitation_id`=? ORDER BY `revocation_status`, `expiry` DESC", "i", $invitationId);
293 293
             if (!$certificatesResult || $certificatesResult->num_rows < $invitationRow->quantity) {
294 294
                 $invitationProfile = $invitationRow->profile_id;
295
-                $invitationSbId =  $invitationRow->silverbullet_user_id;
295
+                $invitationSbId = $invitationRow->silverbullet_user_id;
296 296
                 $newCertificateResult = $this->databaseHandle->exec("INSERT INTO `silverbullet_certificate` (`profile_id`, `silverbullet_user_id`, `silverbullet_invitation_id`, `serial_number`, `cn` ,`expiry`) VALUES (?, ?, ?, ?, ?, ?)", "iiisss", $invitationProfile, $invitationSbId, $invitationId, $serial, $username, $realExpiryDate);
297 297
                 if ($newCertificateResult === true) {
298 298
                     $certificateId = $this->databaseHandle->lastID();
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
         if (!$invitationsResult || $invitationsResult->num_rows == 0) {
480 480
             $loggerInstance->debug(2, "Token  $tokenvalue not found in database or database query error!\n");
481 481
             return ["status" => self::SB_TOKENSTATUS_INVALID,
482
-                "cert_status" => [],];
482
+                "cert_status" => [], ];
483 483
         }
484 484
         // if not returned, we found the token in the DB
485 485
         $invitationRow = mysqli_fetch_object($invitationsResult);
Please login to merge, or discard this patch.
tests/unit/core/MockProfileSilverbullet.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
  * @author Zilvinas Vaira
14 14
  *
15 15
  */
16
-class MockProfileSilverbullet extends \core\ProfileSilverbullet{
16
+class MockProfileSilverbullet extends \core\ProfileSilverbullet {
17 17
     
18 18
     /**
19 19
      * 
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
      * 
32 32
      * @param \core\DBConnection $databaseHandle
33 33
      */
34
-    public function __construct(\core\DBConnection $databaseHandle){
34
+    public function __construct(\core\DBConnection $databaseHandle) {
35 35
         $this->databaseHandle = $databaseHandle;
36
-        if($this->databaseHandle->exec("INSERT INTO institution (country) VALUES('LT')")){
36
+        if ($this->databaseHandle->exec("INSERT INTO institution (country) VALUES('LT')")) {
37 37
             $this->instId = $this->databaseHandle->lastID();
38 38
         }
39
-        if($this->databaseHandle->exec("INSERT INTO profile (inst_id, realm) VALUES($this->instId, 'test.realm.tst')")){
39
+        if ($this->databaseHandle->exec("INSERT INTO profile (inst_id, realm) VALUES($this->instId, 'test.realm.tst')")) {
40 40
             $this->identifier = $this->databaseHandle->lastID();
41 41
         }
42 42
         $this->attributes = array(array('name' => 'hiddenprofile:tou_accepted'));
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     /**
46 46
      * 
47 47
      */
48
-    public function delete(){
48
+    public function delete() {
49 49
         $this->databaseHandle->exec("DELETE FROM `institution` WHERE `inst_id`='" . $this->instId . "'");
50 50
         $this->databaseHandle->exec("DELETE FROM `profile` WHERE `profile_id`='" . $this->identifier . "'");
51 51
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      * {@inheritDoc}
56 56
      * @see \core\ProfileSilverbullet::generateCertificate()
57 57
      */
58
-    public function generateCertificate($serial, $cn){
58
+    public function generateCertificate($serial, $cn) {
59 59
         $this->generatedCertificates[$serial] = $cn;
60 60
     }
61 61
     
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
      * {@inheritDoc}
65 65
      * @see \core\ProfileSilverbullet::revokeCertificate()
66 66
      */
67
-    public function revokeCertificate($serial){
68
-        if(isset($this->generatedCertificates[$serial])){
67
+    public function revokeCertificate($serial) {
68
+        if (isset($this->generatedCertificates[$serial])) {
69 69
             unset($this->generatedCertificates[$serial]);
70 70
             $nowSql = (new \DateTime())->format("Y-m-d H:i:s");
71 71
             $this->databaseHandle->exec("UPDATE silverbullet_certificate SET revocation_status = 'REVOKED', revocation_time = ? WHERE serial_number = ?", "si", $nowSql, $serial);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * @param string $cn
79 79
      * @return boolean
80 80
      */
81
-    public function isGeneratedCertificate($serial, $cn){
82
-        return isset($this->generatedCertificates[$serial]) && $this->generatedCertificates[$serial]==$cn;
81
+    public function isGeneratedCertificate($serial, $cn) {
82
+        return isset($this->generatedCertificates[$serial]) && $this->generatedCertificates[$serial] == $cn;
83 83
     }
84 84
 }
Please login to merge, or discard this patch.
web/skins/classic/resources/css/cat.css.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 }
19 19
 
20 20
 body {
21
-    background: <?php echo $colour1;?>;
21
+    background: <?php echo $colour1; ?>;
22 22
     color: #000000;
23 23
     font-family:Verdana, Arial, Helvetica, sans-serif;
24 24
     font-size:11px;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 }
34 34
 
35 35
 button {
36
-    background: <?php echo $colour2;?>; 
36
+    background: <?php echo $colour2; ?>; 
37 37
     color: #FFFFFF; 
38 38
     min-height: 23px;
39 39
     border-left-style: outset; 
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
     border-bottom-style:solid;
216 216
     border-top-width:5px; 
217 217
     border-bottom-width:5px; 
218
-    border-color: <?php echo $colour1;?>;
218
+    border-color: <?php echo $colour1; ?>;
219 219
     padding-left:30px;
220
-    color: <?php echo $colour2;?>;
220
+    color: <?php echo $colour2; ?>;
221 221
 }
222 222
 
223 223
 div.pagecontent {
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 
411 411
 span.edu_cat {
412 412
     font-weight: bold;
413
-    color: <?php echo $colour2;?>;
413
+    color: <?php echo $colour2; ?>;
414 414
 }
415 415
 
416 416
 span.tooltip {
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
     border-bottom-style:solid;
524 524
     border-top-width:5px; 
525 525
     border-bottom-width:5px; 
526
-    border-color: <?php echo $colour1;?>; 
526
+    border-color: <?php echo $colour1; ?>; 
527 527
     padding-left:30px;
528 528
 }
529 529
 
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
 }
578 578
 
579 579
 span.redirect_link {
580
-    background: <?php echo $colour2;?>; color: #FFFFFF; height: 23px;
580
+    background: <?php echo $colour2; ?>; color: #FFFFFF; height: 23px;
581 581
     border-left-style: inset; border-left-width: 1px; border-left-color: #8bbacb;
582 582
     border-top-style: inset; border-top-width: 1px; border-top-color: #8bbacb;
583 583
     border-right-style: outset; border-right-width: 2px; border-right-color: #043d52;
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 }
625 625
 
626 626
 #close_button {
627
-    background: <?php echo $colour2;?>; 
627
+    background: <?php echo $colour2; ?>; 
628 628
     color: #FFFFFF; 
629 629
     height: 23px;
630 630
     border-left-style: inset; 
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
     width: 30em; 
706 706
     padding-left: 10px; 
707 707
     padding-right: 0px; 
708
-    background: <?php echo $colour2;?>; 
708
+    background: <?php echo $colour2; ?>; 
709 709
     color: white; 
710 710
     box-shadow: 10px 10px 5px #888888;
711 711
 }
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
     width: 30em; 
715 715
     padding-left: 10px; 
716 716
     padding-right: 00px; 
717
-    background: <?php echo $colour2;?>; 
717
+    background: <?php echo $colour2; ?>; 
718 718
     color: #FFFFFF; 
719 719
     box-shadow: 10px 10px 5px #888888;
720 720
 }
@@ -762,7 +762,7 @@  discard block
 block discarded – undo
762 762
     padding-top: 4px; 
763 763
     padding-bottom: 12px; 
764 764
     padding-left: 30px; 
765
-    background: <?php echo $colour1;?>; 
765
+    background: <?php echo $colour1; ?>; 
766 766
     text-align: left; 
767 767
     text-shadow: 10px 10px 5px #888888;
768 768
 }
@@ -772,9 +772,9 @@  discard block
 block discarded – undo
772 772
     border-bottom-style:solid;
773 773
     border-top-width:5px;
774 774
     border-bottom-width:5px;
775
-    border-color: <?php echo $colour1;?>;
775
+    border-color: <?php echo $colour1; ?>;
776 776
     padding-left:30px;
777
-    color: <?php echo $colour2;?>;
777
+    color: <?php echo $colour2; ?>;
778 778
 }
779 779
 
780 780
 #heading h1 { 
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
     text-align: justify;
794 794
     border-bottom-style:solid;
795 795
     border-bottom-width:5px;
796
-    border-color: <?php echo $colour1;?>;
796
+    border-color: <?php echo $colour1; ?>;
797 797
     font-size: 11px;
798 798
     font-weight: normal;
799 799
 }
@@ -841,7 +841,7 @@  discard block
 block discarded – undo
841 841
 
842 842
 #faq {
843 843
     padding: 20px;
844
-    color: <?php echo $colour2;?>;
844
+    color: <?php echo $colour2; ?>;
845 845
     background: #ffffff;
846 846
 }
847 847
 
@@ -894,7 +894,7 @@  discard block
 block discarded – undo
894 894
 
895 895
 #line1 {
896 896
     top:145px;
897
-    color: <?php echo $colour2;?>;
897
+    color: <?php echo $colour2; ?>;
898 898
     font-size:20px;
899 899
 }
900 900
 
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
 
950 950
 #menu_column {
951 951
     border-right:solid;
952
-    border-color: <?php echo $colour1;?>;
952
+    border-color: <?php echo $colour1; ?>;
953 953
     border-width:5px;
954 954
     min-height:400px;
955 955
     padding-left: 10px;
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
 
961 961
 #front_page_leftmenu {
962 962
     border-right:solid; 
963
-    border-color: <?php echo $colour1;?>; 
963
+    border-color: <?php echo $colour1; ?>; 
964 964
     border-width:5px; 
965 965
     min-height:400px; 
966 966
     padding-left: 10px; 
@@ -989,11 +989,11 @@  discard block
 block discarded – undo
989 989
 }
990 990
 
991 991
 a:link {
992
-    color:<?php echo $colour2;?>;
992
+    color:<?php echo $colour2; ?>;
993 993
 }
994 994
 
995 995
 a:visited {
996
-    color:<?php echo $colour2;?>;
996
+    color:<?php echo $colour2; ?>;
997 997
 }
998 998
 
999 999
 a:hover {
@@ -1001,7 +1001,7 @@  discard block
 block discarded – undo
1001 1001
 }
1002 1002
 
1003 1003
 a:active {
1004
-    color:<?php echo $colour2;?>;
1004
+    color:<?php echo $colour2; ?>;
1005 1005
 }
1006 1006
 
1007 1007
 .comment {
Please login to merge, or discard this patch.