Passed
Push — master ( 484f87...7b874f )
by Tomasz
04:46 queued 01:00
created
tests/unit/web/lib/admin/domain/SilverBulletUserTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 use web\lib\admin\domain\Attribute;
6 6
 use web\lib\admin\domain\SilverbulletInvitation;
7 7
 
8
-class SilverbulletUserTest extends PHPUnit_Framework_TestCase{
8
+class SilverbulletUserTest extends PHPUnit_Framework_TestCase {
9 9
     
10 10
     private $username = 'testusername';
11 11
     
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $this->newUser->setExpiry('now');
27 27
     }
28 28
     
29
-    public function testNewUser(){
29
+    public function testNewUser() {
30 30
         $this->newUser->save();
31 31
         $this->assertNotEmpty($this->newUser->getIdentifier());
32 32
         
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $list = SilverbulletUser::getList($this->profileId);
51 51
         $found = false;
52 52
         foreach ($list as $user) {
53
-            if($user->getIdentifier() == $this->newUser->getIdentifier()){
53
+            if ($user->getIdentifier() == $this->newUser->getIdentifier()) {
54 54
                 $found = true;
55 55
                 break;
56 56
             }
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
         $this->assertTrue($result);
62 62
     }
63 63
     
64
-    public function testInactiveUser(){
64
+    public function testInactiveUser() {
65 65
         $this->newUser->save();
66 66
         $this->assertFalse($this->newUser->hasCertificates());
67 67
     }
68 68
     
69
-    public function testActiveUser(){
69
+    public function testActiveUser() {
70 70
         $this->newUser->save();
71 71
         $invitation = new SilverbulletInvitation($this->newUser);
72 72
         $invitation->setQuantity(2);
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
         $this->assertEquals(2, count($certificates));
84 84
     }
85 85
     
86
-    public function testSetDeactivated(){
86
+    public function testSetDeactivated() {
87 87
         $serial = '29837498273948';
88 88
         $cn = 'testCommonName';
89
-        $expiry = date('Y-m-d',strtotime("tomorrow"));
89
+        $expiry = date('Y-m-d', strtotime("tomorrow"));
90 90
         
91 91
         //Testing new user deactivation
92 92
         $this->newUser->save();
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         $this->assertEquals(SilverbulletUser::ACTIVE, $existingUser->get(SilverbulletUser::DEACTIVATION_STATUS));
131 131
     }
132 132
     
133
-    protected function tearDown(){
133
+    protected function tearDown() {
134 134
         $this->newUser->delete();
135 135
         $this->profile->delete();
136 136
     }
Please login to merge, or discard this patch.
tests/unit/web/lib/admin/domain/SilverbulletControllerTest.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -15,24 +15,24 @@  discard block
 block discarded – undo
15 15
 use web\lib\admin\http\SilverbulletContext;
16 16
 use web\lib\admin\domain\SilverbulletInvitation;
17 17
 
18
-if ( !isset( $_SESSION ) ) $_SESSION = array();
18
+if (!isset($_SESSION)) $_SESSION = array();
19 19
 
20
-class MockInstitutionPageBuilder extends InstitutionPageBuilder{
20
+class MockInstitutionPageBuilder extends InstitutionPageBuilder {
21 21
     
22 22
     private $profile;
23 23
     
24
-    public function __construct($profile){
24
+    public function __construct($profile) {
25 25
         parent::__construct(new DefaultHtmlPage("Test Page"));
26 26
         $this->profile = $profile; 
27 27
     }
28 28
     
29
-    public function getProfile(){
29
+    public function getProfile() {
30 30
         return $this->profile;
31 31
     }
32 32
     
33 33
 }
34 34
 
35
-class SilverbulletControllerTest extends PHPUnit_Framework_TestCase{
35
+class SilverbulletControllerTest extends PHPUnit_Framework_TestCase {
36 36
     
37 37
     private $username = 'testusername';
38 38
     
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     
45 45
     private $factory;
46 46
     
47
-    protected function setUp(){
47
+    protected function setUp() {
48 48
         $this->databaseHandle = \core\DBConnection::handle('INST');
49 49
         
50 50
         $this->profile = new MockProfileSilverbullet($this->databaseHandle);
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $usersAfter = count(SilverbulletUser::getList($this->profile->identifier));
65 65
         $this->assertFalse($usersAfter > $usersBefore);
66 66
         
67
-        $_POST[AddUserCommand::PARAM_EXPIRY] = date('Y-m-d',strtotime("tomorrow"));
67
+        $_POST[AddUserCommand::PARAM_EXPIRY] = date('Y-m-d', strtotime("tomorrow"));
68 68
         $this->factory->parseRequest();
69 69
 
70 70
         $usersAfter = count(SilverbulletUser::getList($this->profile->identifier));
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
         
73 73
     }
74 74
 
75
-    private function countActiveUsers($users){
75
+    private function countActiveUsers($users) {
76 76
         $count = 0;
77 77
         foreach ($users as $user) {
78
-            if(!$user->isDeactivated()){
78
+            if (!$user->isDeactivated()) {
79 79
                 $count++;
80 80
             }
81 81
         }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     public function testRevokeGeneratedCertificate() {
148 148
         $serial = '29837498273948';
149 149
         $cn = 'testCommonName';
150
-        $expiry = date('Y-m-d',strtotime("tomorrow"));
150
+        $expiry = date('Y-m-d', strtotime("tomorrow"));
151 151
         
152 152
         $this->user->save();
153 153
 
@@ -172,9 +172,9 @@  discard block
 block discarded – undo
172 172
         
173 173
     }
174 174
     
175
-    protected function tearDown(){
175
+    protected function tearDown() {
176 176
         $this->user->delete();
177
-        $this->databaseHandle->exec("DELETE FROM `".SilverbulletUser::TABLE."` WHERE `".SilverbulletUser::USERNAME."`='".$this->username."'");
177
+        $this->databaseHandle->exec("DELETE FROM `" . SilverbulletUser::TABLE . "` WHERE `" . SilverbulletUser::USERNAME . "`='" . $this->username . "'");
178 178
         $this->profile->delete();
179 179
     }
180 180
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@
 block discarded – undo
15 15
 use web\lib\admin\http\SilverbulletContext;
16 16
 use web\lib\admin\domain\SilverbulletInvitation;
17 17
 
18
-if ( !isset( $_SESSION ) ) $_SESSION = array();
18
+if ( !isset( $_SESSION ) ) {
19
+    $_SESSION = array();
20
+}
19 21
 
20 22
 class MockInstitutionPageBuilder extends InstitutionPageBuilder{
21 23
     
Please login to merge, or discard this patch.
web/lib/admin/http/AddInvitationCommand.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * @author Zilvinas Vaira
9 9
  *
10 10
  */
11
-class AddInvitationCommand extends AbstractInvokerCommand{
11
+class AddInvitationCommand extends AbstractInvokerCommand {
12 12
 
13 13
     const COMMAND = 'newinvitation';
14 14
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @param string $commandToken
24 24
      * @param SilverbulletContext $context
25 25
      */
26
-    public function __construct($commandToken, $context){
26
+    public function __construct($commandToken, $context) {
27 27
         parent::__construct($commandToken, $context);
28 28
         $this->context = $context;
29 29
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * {@inheritDoc}
34 34
      * @see \web\lib\admin\http\AbstractCommand::execute()
35 35
      */
36
-    public function execute(){
36
+    public function execute() {
37 37
         $userIndex = $this->parseInt($_POST[self::COMMAND]);
38 38
         $userIds = $this->parseArray($_POST[SaveUsersCommand::PARAM_ID]);
39 39
         $invitationsQuantities = $this->parseArray($_POST[SaveUsersCommand::PARAM_QUANTITY]);
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
         $user = SilverbulletUser::prepare($userId);
44 44
         $user->load();
45 45
         
46
-        if($user->isExpired()){
46
+        if ($user->isExpired()) {
47 47
             $this->storeErrorMessage(sprintf(_("User '%s' has expired. In order to generate credentials please extend the expiry date!"), $user->getUsername()));
48
-        }else{
48
+        } else {
49 49
             $this->context->createInvitation($user, $this, (int) $invitationsQuantity);
50
-            if(!is_numeric($invitationsQuantity)){
50
+            if (!is_numeric($invitationsQuantity)) {
51 51
                 $this->storeErrorMessage(sprintf(_("Invitations quantity '%' provided for user '%s' was not numeric. Assumed quantity as '1' !"), $invitationsQuantity, $user->getUsername()));
52 52
             }
53
-            if($user->isDeactivated()){
53
+            if ($user->isDeactivated()) {
54 54
                 $user->setDeactivated(false, $this->context->getProfile());
55 55
                 $user->save();
56 56
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         
46 46
         if($user->isExpired()){
47 47
             $this->storeErrorMessage(sprintf(_("User '%s' has expired. In order to generate credentials please extend the expiry date!"), $user->getUsername()));
48
-        }else{
48
+        } else{
49 49
             $this->context->createInvitation($user, $this, (int) $invitationsQuantity);
50 50
             if(!is_numeric($invitationsQuantity)){
51 51
                 $this->storeErrorMessage(sprintf(_("Invitations quantity '%' provided for user '%s' was not numeric. Assumed quantity as '1' !"), $invitationsQuantity, $user->getUsername()));
Please login to merge, or discard this patch.
web/accountstatus/accountstatus.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 $cleanToken = FALSE;
23 23
 $operatingSystem = FALSE;
24 24
 $tokenStatus = ["status" => \core\ProfileSilverbullet::SB_TOKENSTATUS_INVALID,
25
-    "cert_status" => [],];
25
+    "cert_status" => [], ];
26 26
 $profile = NULL;
27 27
 $idp = NULL;
28 28
 $fed = NULL;
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         // it can be VALID (exists and not redeemed, EXPIRED, REDEEMED or INVALID (non existent)
39 39
         $tokenStatus = \core\ProfileSilverbullet::tokenStatus($cleanToken);
40 40
     }
41
-} elseif (isset($_SERVER['SSL_CLIENT_SAN_Email']) || isset($_SERVER['SSL_CLIENT_SAN_Email_0']) ) {
41
+} elseif (isset($_SERVER['SSL_CLIENT_SAN_Email']) || isset($_SERVER['SSL_CLIENT_SAN_Email_0'])) {
42 42
     // maybe the user authenticated with his client cert? Then pick any of his
43 43
     // tokens to go on
44 44
     $certname = $_SERVER['SSL_CLIENT_SAN_Email'] ?? $_SERVER['SSL_CLIENT_SAN_Email_0'];
Please login to merge, or discard this patch.
core/CAT.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,9 +76,9 @@
 block discarded – undo
76 76
     public $CAT_COPYRIGHT;
77 77
 
78 78
         /**
79
-     * the custom displayable variant of the term 'federation'
80
-     * @var string
81
-     */
79
+         * the custom displayable variant of the term 'federation'
80
+         * @var string
81
+         */
82 82
     public $nomenclature_fed;
83 83
 
84 84
     /**
Please login to merge, or discard this patch.
web/skins/classic/basic.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     public function listIdPs() {
143 143
         $instList = $this->orderIdentityProviders($this->country->identifier);
144 144
         $out = '';
145
-        $out .= sprintf(_("Select your %s"), $this->nomenclature_inst );
145
+        $out .= sprintf(_("Select your %s"), $this->nomenclature_inst);
146 146
         $out .= '<select name="idp" onchange="submit_form(this)">';
147 147
         if (!empty($instList)) {
148 148
             if (!isset($this->idp)) {
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                 }
237 237
             }
238 238
             $out .= '>' . $disp . '</option>';
239
-            $deviceRedirects .= 'redirects[' . $iterator . '] = ' . ( $oneDevice['redirect'] ? 1 : 0 ) . ';';
239
+            $deviceRedirects .= 'redirects[' . $iterator . '] = ' . ($oneDevice['redirect'] ? 1 : 0) . ';';
240 240
             $iterator++;
241 241
         }
242 242
         $out .= '</select>';
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
         </script>
431 431
     </head>
432 432
     <body style="">
433
-        <?php print '<div id="motd">' . ( isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : '&nbsp' ) . '</div>'; ?>
433
+        <?php print '<div id="motd">' . (isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : '&nbsp') . '</div>'; ?>
434 434
         <form name="my_form" method="POST" action="<?php echo $_SERVER['SCRIPT_NAME'] ?>" accept-charset='UTF-8'>
435 435
             <img src="<?php echo $skinObject->findResourceUrl("IMAGES", "consortium_logo.png"); ?>" style="width: 20%; padding-right:20px; padding-top:0px; float:right" alt="logo" />
436 436
             <?php
Please login to merge, or discard this patch.
web/skins/classic/user/js/cat_js.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 <?php 
12 12
 $cat = new core\CAT();
13 13
 function escaped_echo($s) {
14
-   echo preg_replace('/"/','&quot;',$s);
14
+    echo preg_replace('/"/','&quot;',$s);
15 15
 }
16 16
 
17 17
 $langObject = new \core\common\Language();
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 if (! is_numeric($profileId)) {
25 25
     exit;
26 26
 }
27
- ?>
27
+    ?>
28 28
 var n;
29 29
 var profile;
30 30
 var generateTimer;
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 }
360 360
 
361 361
 <?php if($idpId) { 
362
-      print "front_page = 0;\n";
362
+        print "front_page = 0;\n";
363 363
 } ?>
364 364
 
365 365
 function showTOU(){
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 if ($profileId) {
494 494
     print "listProfiles($idpId,$profileId);";
495 495
 }
496
- ?>
496
+    ?>
497 497
 
498 498
 $(".signin").click(function(event){
499 499
      pressedButton = $(this);
@@ -554,12 +554,12 @@  discard block
 block discarded – undo
554 554
         });
555 555
 DiscoJuice.Constants.Countries = {
556 556
 <?php 
557
-  $C = $Gui->printCountryList(1);
558
-     $ret = '';
559
-   foreach ($C as $key => $val) {
557
+    $C = $Gui->printCountryList(1);
558
+        $ret = '';
559
+    foreach ($C as $key => $val) {
560 560
     $ret .= "'$key': \"$val\",";
561
-   }
562
-   echo substr($ret, 0, -1);
561
+    }
562
+    echo substr($ret, 0, -1);
563 563
 ?>
564 564
         };
565 565
 
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@  discard block
 block discarded – undo
11 11
 <?php 
12 12
 $cat = new core\CAT();
13 13
 function escaped_echo($s) {
14
-   echo preg_replace('/"/','&quot;',$s);
14
+   echo preg_replace('/"/', '&quot;', $s);
15 15
 }
16 16
 
17 17
 $langObject = new \core\common\Language();
18 18
 $langObject->setTextDomain('web_user');
19 19
 $idpId = empty($_REQUEST['idp']) ? 0 : $_REQUEST['idp'];
20
-if (! is_numeric($idpId)) {
20
+if (!is_numeric($idpId)) {
21 21
     exit;
22 22
 }
23 23
 $profileId = empty($_REQUEST['profile']) ? 0 : $_REQUEST['profile'];
24
-if (! is_numeric($profileId)) {
24
+if (!is_numeric($profileId)) {
25 25
     exit;
26 26
 }
27 27
  ?>
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     result = j.status;
77 77
     if(! result) {
78 78
       alert("<?php escaped_echo(_("no matching data found"))?>");
79
-      document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/').'/'?>';
79
+      document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/'?>';
80 80
     }
81 81
     j = j.data;
82 82
     n = j.length;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     inst_name = j[0].idp_name;
85 85
     logo = j[0].logo;
86 86
     $("#inst_name").val(inst_name);
87
-    $("#inst_name_span").html("<?php escaped_echo(sprintf(_("Selected %s:"),$cat->nomenclature_inst))?> <strong>"+inst_name+"</strong>");
87
+    $("#inst_name_span").html("<?php escaped_echo(sprintf(_("Selected %s:"), $cat->nomenclature_inst))?> <strong>"+inst_name+"</strong>");
88 88
     $(".inst_name").text(inst_name);
89 89
     $("#user_page").show();
90 90
     $("#institution_name").show();
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
        j1 = $.parseJSON(data);
198 198
        result = j1.status;
199 199
        if(! result) {
200
-            alert("<?php escaped_echo( _("no matching data found"))?>");
201
-            document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/').'/'?>';
200
+            alert("<?php escaped_echo(_("no matching data found"))?>");
201
+            document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/'?>';
202 202
        }
203 203
        j = j1.data;
204 204
        if(j.description !== undefined && j.description) {
@@ -209,15 +209,15 @@  discard block
 block discarded – undo
209 209
          $("#profile_desc").text('');
210 210
        }
211 211
        if(j.local_url !== undefined && j.local_url) 
212
-         txt = txt+'<tr><td><?php escaped_echo(_("WWW:"));?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>';
212
+         txt = txt+'<tr><td><?php escaped_echo(_("WWW:")); ?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>';
213 213
        if(j.local_email !== undefined && j.local_email) 
214
-         txt = txt+'<tr><td><?php escaped_echo(_("email:"));?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>';
214
+         txt = txt+'<tr><td><?php escaped_echo(_("email:")); ?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>';
215 215
        if(j.local_phone !== undefined && j.local_phone) 
216
-         txt = txt+'<tr><td><?php escaped_echo(_("tel:"));?></td><td>'+j.local_phone+'</td></tr>';
216
+         txt = txt+'<tr><td><?php escaped_echo(_("tel:")); ?></td><td>'+j.local_phone+'</td></tr>';
217 217
        if(txt) 
218
-         txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"),$cat->nomenclature_inst)); ?></th></tr>"+txt+'</table>';
218
+         txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"), $cat->nomenclature_inst)); ?></th></tr>"+txt+'</table>';
219 219
         else 
220
-         txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems you should ask for help at your %s"),$cat->nomenclature_inst)); ?>.</th></tr></table>";
220
+         txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems you should ask for help at your %s"), $cat->nomenclature_inst)); ?>.</th></tr></table>";
221 221
       $("#user_info").html(txt);
222 222
       $("#user_info").show();
223 223
       if(j.silverbullet) {
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
           $("#g_"+v.id).addClass('alertButton');
236 236
           $("#cross_icon_"+v.id).show();
237 237
           $("#"+v.id).addClass('disabledDevice');
238
-          $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>");
238
+          $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>");
239 239
           $("#info_b_"+v.id+",#g_info_b_"+v.id).hide();
240 240
         } else  {
241 241
           if(v.status == -1)
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
           $("#"+v.id+",#g_"+v.id).addClass('additionalInfo');
248 248
           $("#"+v.id+",#g_"+v.id).click(function(event){
249 249
             i_div = $("#info_"+$(this).attr('id'));
250
-            t = "<?php escaped_echo(_("Your site administrator has specified that this device should be configured with resources located on a local page. When you click <b>Continue</b> this page will be opened in a new window/tab."))?>"+"<br><span class='redirect_link'><a href='"+v.redirect+"' target='_blank'><?php escaped_echo(_("Continue"));?></a></span>";
250
+            t = "<?php escaped_echo(_("Your site administrator has specified that this device should be configured with resources located on a local page. When you click <b>Continue</b> this page will be opened in a new window/tab."))?>"+"<br><span class='redirect_link'><a href='"+v.redirect+"' target='_blank'><?php escaped_echo(_("Continue")); ?></a></span>";
251 251
             i_div.html(t);
252 252
             $(".redirect_link").click(function(event) {
253 253
                i_div.hide();
@@ -255,13 +255,13 @@  discard block
 block discarded – undo
255 255
                
256 256
           });
257 257
         } else if(v.device_customtext != '0' || v.eap_customtext != '0' || v.message != '0' || v.status > 0) {
258
-          var continue_text = "<?php escaped_echo(_("Continue"));?>";
258
+          var continue_text = "<?php escaped_echo(_("Continue")); ?>";
259 259
           $("#"+v.id+",#g_"+v.id).addClass('additionalInfo');
260 260
           $("#"+v.id+",#g_"+v.id).click(function(event){
261 261
             i_div = $("#info_"+$(this).attr('id'));
262 262
             if(v.status > 0) {
263
-              t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>";
264
-              continue_text = "<?php escaped_echo(_("Close"));?>";
263
+              t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>";
264
+              continue_text = "<?php escaped_echo(_("Close")); ?>";
265 265
             } else {
266 266
             t = i_div.html();
267 267
             if(v.message != '0') {
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
   }
319 319
 
320 320
   function infoCAT(k,title) {
321
-      $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/cat_info.php");?>', {page: k, lang: lang}, function(data) {
321
+      $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/cat_info.php"); ?>', {page: k, lang: lang}, function(data) {
322 322
     if(data.substring(0,8) == 'no_title') {
323 323
        data = data.substring(8,data.length);
324 324
     } else {
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
    $("#loading_ico").css('left',x+'px');
338 338
    $("#loading_ico").attr('src','resources/images/icons/loading9.gif');
339 339
    $("#loading_ico").show();
340
-   window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE","admin/overview_user.php");?>?lang="+lang);
340
+   window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE", "admin/overview_user.php"); ?>?lang="+lang);
341 341
 }
342 342
 
343 343
 /* Get horizontal center of the Browser Window */
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
     return(Math.round(windowWidth/2));
359 359
 }
360 360
 
361
-<?php if($idpId) { 
361
+<?php if ($idpId) { 
362 362
       print "front_page = 0;\n";
363 363
 } ?>
364 364
 
@@ -396,10 +396,10 @@  discard block
 block discarded – undo
396 396
     $("#download_info a").attr('href',download_link);
397 397
     $('#download_info').show();
398 398
     if( generateTimer > 0 ) {
399
-       setTimeout("document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/')?>'+'/'+download_link",generateTimer);
399
+       setTimeout("document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/')?>'+'/'+download_link",generateTimer);
400 400
     }
401 401
     else {
402
-       document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/')?>'+'/'+download_link;
402
+       document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/')?>'+'/'+download_link;
403 403
     }
404 404
   }
405 405
 }
@@ -517,13 +517,13 @@  discard block
 block discarded – undo
517 517
    "overlay":true,"cookie":true,"type":false,
518 518
    "country":true,"location":true,
519 519
    "title":"<?php escaped_echo($cat->nomenclature_inst) ?>",
520
-   "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"),$cat->nomenclature_inst)) ?>",
521
-   "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"),$cat->nomenclature_inst)) ?>",
522
-   "textHelpMore": "<?php escaped_echo(sprintf(_("This system relies on information supplied by local %s administrators. If your %s is not on the list, then nag them to add information to the %s database."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $cat->nomenclature_inst, CONFIG['APPEARANCE']['productname'])); ?>",
520
+   "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"), $cat->nomenclature_inst)) ?>",
521
+   "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"), $cat->nomenclature_inst)) ?>",
522
+   "textHelpMore": "<?php escaped_echo(sprintf(_("This system relies on information supplied by local %s administrators. If your %s is not on the list, then nag them to add information to the %s database."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $cat->nomenclature_inst, CONFIG['APPEARANCE']['productname'])); ?>",
523 523
    "textLocateMe": "<?php escaped_echo(_("Locate me more accurately using HTML5 Geo-Location")) ?>",
524
-   "textShowProviders": "<?php escaped_echo(sprintf(_("Show %ss in"),$cat->nomenclature_inst)) ?>",
524
+   "textShowProviders": "<?php escaped_echo(sprintf(_("Show %ss in"), $cat->nomenclature_inst)) ?>",
525 525
    "textAllCountries": "<?php escaped_echo(_("all countries")) ?>",
526
-   "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"),$cat->nomenclature_inst)) ?>",
526
+   "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"), $cat->nomenclature_inst)) ?>",
527 527
    "textShowAllCountries": "<?php escaped_echo(_("show all countries")) ?>",
528 528
    "textLimited1" : "<?php escaped_echo(_("Results limited to"))?>",
529 529
    "textLimited2" : "<?php escaped_echo(_("entries - show more"))?>",
Please login to merge, or discard this patch.
web/admin/action_enrollment.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
             echo "<p>" . sprintf(_("Sorry... this token has already been used to create an %s. If you got it from a mailing list, probably someone else used it before you."), $elements->nomenclature_inst) . "</p>";
56 56
             break;
57 57
         case \core\UserManagement::TOKENSTATUS_FAIL_EXPIRED:
58
-            echo "<p>" . sprintf(_("Sorry... this token has expired. Invitation tokens are valid for 24 hours. Please ask your %s administrator for a new one."),$elements->nomenclature_fed) . "</p>";
58
+            echo "<p>" . sprintf(_("Sorry... this token has expired. Invitation tokens are valid for 24 hours. Please ask your %s administrator for a new one."), $elements->nomenclature_fed) . "</p>";
59 59
             break;
60 60
         default:
61 61
             echo "<p>" . _("Sorry... you have come to the enrollment page without a valid token. Are you a nasty person? If not, you should go to <a href='overview_user.php'>your profile page</a> instead.") . "</p>";
Please login to merge, or discard this patch.
Switch Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,14 +37,14 @@
 block discarded – undo
37 37
 }
38 38
 
39 39
 switch ($_GET['token']) {
40
-    case "SELF-REGISTER":
41
-        $token = "SELF-REGISTER";
42
-        $checkval = \core\UserManagement::TOKENSTATUS_OK_NEW;
43
-        $federation = CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration'];
44
-        break;
45
-    default:
46
-        $token = $validator->token($_GET['token']);
47
-        $checkval = $usermgmt->checkTokenValidity($token);
40
+        case "SELF-REGISTER":
41
+            $token = "SELF-REGISTER";
42
+            $checkval = \core\UserManagement::TOKENSTATUS_OK_NEW;
43
+            $federation = CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration'];
44
+            break;
45
+        default:
46
+            $token = $validator->token($_GET['token']);
47
+            $checkval = $usermgmt->checkTokenValidity($token);
48 48
 }
49 49
 
50 50
 if ($checkval < 0) {
Please login to merge, or discard this patch.
web/admin/overview_user.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         }
58 58
 
59 59
         if ($user->isFederationAdmin()) {
60
-            echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . sprintf(_('Click here to manage your %ss'),$uiElements->nomenclature_fed) . "</button></form>";
60
+            echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . sprintf(_('Click here to manage your %ss'), $uiElements->nomenclature_fed) . "</button></form>";
61 61
         }
62 62
         if ($user->isSuperadmin()) {
63 63
             echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . _('Click here to access the superadmin page') . "</button></form>";
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             <div style='white-space: nowrap;'>
161 161
         <form action='action_enrollment.php' method='get'><button type='submit' accept-charset='UTF-8'>
162 162
                 <input type='hidden' id='token' name='token' value='SELF-REGISTER'/>" .
163
-        sprintf(_("Register new %s!"),$uiElements->nomenclature_inst) . "
163
+        sprintf(_("Register new %s!"), $uiElements->nomenclature_inst) . "
164 164
             </button>
165 165
         </form>
166 166
         </div>";
Please login to merge, or discard this patch.