Completed
Branch master (03ec64)
by Brook
14:43
created
web/admin/inc/common.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
         $filetype = $info->buffer($filename, FILEINFO_MIME_TYPE);
251 251
 
252 252
         // we only take plain text files in UTF-8!
253
-        if ( $filetype == "text/plain" && iconv("UTF-8", "UTF-8", $filename) !== FALSE)
253
+        if ($filetype == "text/plain" && iconv("UTF-8", "UTF-8", $filename) !== FALSE)
254 254
             return TRUE;
255 255
     }
256 256
 
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 
317 317
     $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']);
318 318
     $details['name'] = preg_replace('/\//', "", $details['name']);
319
-    $certstatus = ( $details['root'] == 1 ? "R" : "I");
319
+    $certstatus = ($details['root'] == 1 ? "R" : "I");
320 320
     if ($details['ca'] == 0 && $details['root'] != 1)
321 321
         return "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon;  border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . _("This is a <strong>SERVER</strong> certificate!") . "<br/>" . $details['name'] . "</div>";
322 322
     else
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
                     }
392 392
                     break;
393 393
                 case "boolean":
394
-                    $retval .= "<tr><td>" . display_name($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>";
394
+                    $retval .= "<tr><td>" . display_name($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off")) . "</strong></td></tr>";
395 395
                     break;
396 396
                 default:
397 397
                     $retval .= "<tr><td>" . display_name($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>";
Please login to merge, or discard this patch.
web/admin/inc/manageAdmins.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@
 block discarded – undo
136 136
 
137 137
         echo "</td>
138 138
               <td>
139
-                <form action='inc/manageAdmins.inc.php?inst_id=" . $my_inst->identifier . "' method='post' " . ( $oneowner['ID'] != $_SESSION['user'] ? "onsubmit='popupRedirectWindow(this); return false;'" : "" ) . " accept-charset='UTF-8'>
139
+                <form action='inc/manageAdmins.inc.php?inst_id=" . $my_inst->identifier . "' method='post' " . ($oneowner['ID'] != $_SESSION['user'] ? "onsubmit='popupRedirectWindow(this); return false;'" : "") . " accept-charset='UTF-8'>
140 140
                 <input type='hidden' name='admin_id' value='" . $oneowner['ID'] . "'></input>
141 141
                 <button type='submit' name='submitbutton' class='delete' value='" . BUTTON_DELETE . "'>" . _("Delete Administrator") . "</button>
142 142
                 </form>
Please login to merge, or discard this patch.
web/admin/inc/manageDBLink.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
 // if we have a pushed close button, submit attributes and send user back to the overview page
27 27
 // if external DB sync is disabled globally, the user never gets to this page. If he came here *anyway* -> send him back immediately.
28
-if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == BUTTON_CLOSE ) || Config::$DB['enforce-external-sync'] == FALSE)
28
+if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == BUTTON_CLOSE) || Config::$DB['enforce-external-sync'] == FALSE)
29 29
     header("Location: ../overview_federation.php");
30 30
 
31 31
 // if not, must operate on a proper IdP
Please login to merge, or discard this patch.
web/admin/inc/sendinvite.inc.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -130,17 +130,17 @@  discard block
 block discarded – undo
130 130
 // then, send out the mail
131 131
 $message = _("Hello,") . "
132 132
     
133
-" . wordwrap($introtext, 72)  . "
133
+" . wordwrap($introtext, 72) . "
134 134
     
135 135
 ";
136 136
 
137 137
 if ($new_idp_authorized_fedadmin) { // see if we are supposed to add a custom message
138 138
     $customtext = $federation->getAttributes('fed:custominvite');
139 139
     if (count($customtext) > 0)
140
-        $message .= wordwrap(_("Additional message from your federation administrator:"),72) . "
140
+        $message .= wordwrap(_("Additional message from your federation administrator:"), 72) . "
141 141
 ---------------------------------
142 142
 "
143
-                  . wordwrap($customtext[0]['value'],72) . "
143
+                  . wordwrap($customtext[0]['value'], 72) . "
144 144
 ---------------------------------
145 145
 
146 146
 ";
@@ -158,8 +158,7 @@  discard block
 block discarded – undo
158 158
         _("and enter the invitation token") . "
159 159
     $newtoken
160 160
 " . ( /* $new_idp_authorized_fedadmin */ FALSE ?
161
-                wordwrap(_("manually. If you reply to this mail, you will reach the federation administrators of your federation."), 72) :
162
-                wordwrap(_("manually. Please do not reply to this mail; this is a send-only address.")) ) . "
161
+                wordwrap(_("manually. If you reply to this mail, you will reach the federation administrators of your federation."), 72) : wordwrap(_("manually. Please do not reply to this mail; this is a send-only address.")) ) . "
163 162
 
164 163
 " . wordwrap(_("Do NOT forward the mail before the token has expired - or the recipients may be able to consume the token on your behalf!"), 72) . "
165 164
 
Please login to merge, or discard this patch.
web/admin/inc/option_xhr.inc.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
     case "eap-specific":
51 51
         break;
52 52
     default:
53
-        debug(1,"Unknown type of option!");
53
+        debug(1, "Unknown type of option!");
54 54
         exit(1);
55 55
     }
56 56
     // echo "<pre>".print_r($list)."</pre>";
Please login to merge, or discard this patch.
web/admin/inc/option_html.inc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     // print_r($prepopulate);
19 19
     $optioninfo = Options::instance();
20 20
     // print_r($prepopulate);
21
-    if (is_array($prepopulate) && ( count($prepopulate) > 1 || $class == "device-specific" || $class == "eap-specific") ) { // editing... fill with values
21
+    if (is_array($prepopulate) && (count($prepopulate) > 1 || $class == "device-specific" || $class == "eap-specific")) { // editing... fill with values
22 22
         $a = 0;
23 23
         foreach ($prepopulate as $option)
24 24
             if (preg_match("/$class:/", $option['name']) && !preg_match("/(profile:QR-user|user:fedadmin)/", $option['name'])) {
@@ -102,16 +102,16 @@  discard block
 block discarded – undo
102 102
         $a = 0;
103 103
         foreach ($list as $key => $value) {
104 104
             $listtype = $optioninfo->optionType($value);
105
-            $retval .="<option id='option-S$rowid-v-$value' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ";
105
+            $retval .= "<option id='option-S$rowid-v-$value' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ";
106 106
             if ($a == $defaultselect) {
107 107
                 $retval .= "selected='selected'";
108 108
                 $activelisttype = $listtype;
109 109
             }
110
-            $retval .=">" . display_name($value). "</option>";
110
+            $retval .= ">" . display_name($value) . "</option>";
111 111
             $a++;
112 112
         }
113
-        $retval .="</select></td>";
114
-        $retval .="<td>
113
+        $retval .= "</select></td>";
114
+        $retval .= "<td>
115 115
           <select style='display:" . ($activelisttype["flag"] == "ML" ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'>
116 116
             <option value='' name='select_language' selected>" . _("select language") . "</option>
117 117
             <option value='C' name='all_languages'>" . _("default/other languages") . "</option>";
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
                 $global_location_count++;
172 172
                 $location_index = $global_location_count;
173 173
                 $link = "<button id='location_b_$global_location_count' class='location_button'>" . _("Click to see location") . " $global_location_count</button>";
174
-                $retval .="<input readonly style='display:none' type='text' name='value[S$rowid-1]' id='S" . $rowid . "-input-text' value='$prefill'>$link";
174
+                $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-1]' id='S" . $rowid . "-input-text' value='$prefill'>$link";
175 175
                 break;
176 176
             case "file":
177 177
                 $retval .= "<input readonly type='text' name='value[S$rowid-1]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($content) . "'>";
@@ -191,10 +191,10 @@  discard block
 block discarded – undo
191 191
                 };
192 192
                 break;
193 193
             case "string":
194
-                $retval .= "<strong>$content</strong><input type='hidden' name='value[S$rowid-0]' id='S" . $rowid . "-input-string' value=\"".htmlspecialchars($content)."\" style='display:block'>";
194
+                $retval .= "<strong>$content</strong><input type='hidden' name='value[S$rowid-0]' id='S" . $rowid . "-input-string' value=\"" . htmlspecialchars($content) . "\" style='display:block'>";
195 195
                 break;
196 196
             case "text":
197
-                $retval .= "<strong>$content</strong><input type='hidden' name='value[S$rowid-1]' id='S" . $rowid . "-input-text' value=\"".htmlspecialchars($content)."\" style='display:block'>";
197
+                $retval .= "<strong>$content</strong><input type='hidden' name='value[S$rowid-1]' id='S" . $rowid . "-input-text' value=\"" . htmlspecialchars($content) . "\" style='display:block'>";
198 198
                 break;
199 199
             case "boolean":
200 200
                 if ($content == "on")
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
         };
214 214
         $retval .= "</td>";
215 215
     }
216
-    $retval .="
216
+    $retval .= "
217 217
 
218 218
        <td>
219 219
           <button type='button' class='delete' onclick='deleteOption(" . $location_index . ",\"option-S" . $rowid . "\")'>-</button>
Please login to merge, or discard this patch.
web/admin/inc/manageNewInst.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                 $entities = $thefed->listExternalEntities(TRUE);
76 76
 
77 77
                 foreach ($entities as $v) {
78
-                echo "<option id='".$v['contactlist']."' value='" . $v['ID'] . "'>[" . $fed_value['value'] . "] " . $v['name'] . "</option>";
78
+                echo "<option id='" . $v['contactlist'] . "' value='" . $v['ID'] . "'>[" . $fed_value['value'] . "] " . $v['name'] . "</option>";
79 79
             }
80 80
             }
81 81
 
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
         </tr>
111 111
     </table>
112 112
     <hr/>
113
-    <button type='submit' name='submitbutton' value='<?php echo BUTTON_SAVE;?>'><?php echo _("Send invitation"); ?></button>
113
+    <button type='submit' name='submitbutton' value='<?php echo BUTTON_SAVE; ?>'><?php echo _("Send invitation"); ?></button>
114 114
 </form>
115 115
 <br/>
116 116
 <form action='inc/manageNewInst.inc.php' method='post' accept-charset='UTF-8'>
117
-    <button type='submit' name='submitbutton' value='<?php echo BUTTON_CLOSE;?>'><?php echo _("Close"); ?></button>
117
+    <button type='submit' name='submitbutton' value='<?php echo BUTTON_CLOSE; ?>'><?php echo _("Close"); ?></button>
118 118
 </form>
Please login to merge, or discard this patch.
web/tou.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@  discard block
 block discarded – undo
18 18
 include(dirname(dirname(__FILE__)) . "/config/_config.php");
19 19
 require_once("UserAPI.php");
20 20
 
21
-debug(4,"\n----------------------------------TOU.PHP------------------------\n");
21
+debug(4, "\n----------------------------------TOU.PHP------------------------\n");
22 22
 ?>
23 23
 <!DOCTYPE html>
24 24
 <html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo CAT::get_lang()?>">
25 25
     <head lang="<?php echo CAT::get_lang()?>"> 
26
-        <title><?php echo Config::$APPEARANCE['productname_long'];?></title>
27
-<link media="only screen and (max-device-width: 480px)" href="<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/') ?>/resources/css/cat-basic.css.php" type= "text/css" rel="stylesheet" />
26
+        <title><?php echo Config::$APPEARANCE['productname_long']; ?></title>
27
+<link media="only screen and (max-device-width: 480px)" href="<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') ?>/resources/css/cat-basic.css.php" type= "text/css" rel="stylesheet" />
28 28
 <link media="only screen and (min-device-width: 481px)" href="<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') ?>/resources/css/cat-basic-large.css" type= "text/css" rel="stylesheet" />
29 29
         <meta charset="utf-8" /> 
30 30
 <script type="text/javascript">
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     <body style="">
40 40
         <img src="<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') ?>/resources/images/consortium_logo.png" style="padding-right:20px; padding-top:20px; float:right" alt="logo" />
41 41
          <?php
42
-            print '<div id="motd">'.( isset(Config::$APPEARANCE['MOTD']) ? Config::$APPEARANCE['MOTD'] : '&nbsp' ).'</div>'; 
42
+            print '<div id="motd">' . (isset(Config::$APPEARANCE['MOTD']) ? Config::$APPEARANCE['MOTD'] : '&nbsp') . '</div>'; 
43 43
 
44 44
         print '<h1><a href="' . dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . CAT::get_lang() . '">' . Config::$APPEARANCE['productname'] . '</a></h1>';
45 45
 print '<div id="tou">';
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
 
49 49
 // this variable gets set during "make distribution" only
50 50
 $RELEASE = "THERELEASE";
51
-echo "".Config::$APPEARANCE['productname']." - ";
51
+echo "" . Config::$APPEARANCE['productname'] . " - ";
52 52
 if ($RELEASE != "THERELEASE") 
53 53
     echo sprintf(_("Release %s"), $RELEASE);
54 54
 else
55 55
     echo _("Unreleased SVN Revision");
56
-echo " &copy; 2011-13 DANTE Ltd. on behalf of the GN3 and GN3plus consortia</div>";?>
56
+echo " &copy; 2011-13 DANTE Ltd. on behalf of the GN3 and GN3plus consortia</div>"; ?>
57 57
 </body>
58 58
 </html>
Please login to merge, or discard this patch.
web/user/js/cat_js.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     result = j.status;
58 58
     if(! result) {
59 59
       alert("<?php echo _("no matching data found")?>");
60
-      document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/').'/'?>';
60
+      document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/'?>';
61 61
     }
62 62
     j = j.data;
63 63
     n = j.length;
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
          $("#profile_desc").text('');
186 186
        }
187 187
        if(j.local_url !== undefined && j.local_url) 
188
-         txt = txt+'<tr><td><?php echo _("WWW:");?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>';
188
+         txt = txt+'<tr><td><?php echo _("WWW:"); ?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>';
189 189
        if(j.local_email !== undefined && j.local_email) 
190
-         txt = txt+'<tr><td><?php echo _("email:");?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>';
190
+         txt = txt+'<tr><td><?php echo _("email:"); ?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>';
191 191
        if(j.local_phone !== undefined && j.local_phone) 
192
-         txt = txt+'<tr><td><?php echo _("tel:");?></td><td>'+j.local_phone+'</td></tr>';
192
+         txt = txt+'<tr><td><?php echo _("tel:"); ?></td><td>'+j.local_phone+'</td></tr>';
193 193
        if(txt) 
194 194
          txt = "<table><tr><th colspan='2'><?php echo _("If you encounter problems, then you can obtain direct assistance from you home organisation at:"); ?></th></tr>"+txt+'</table>';
195 195
         else 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
           $("#"+v.id+",#g_"+v.id).addClass('additionalInfo');
219 219
           $("#"+v.id+",#g_"+v.id).click(function(event){
220 220
             i_div = $("#info_"+$(this).attr('id'));
221
-            t = "<?php 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 echo _("Continue");?></a></span>";
221
+            t = "<?php 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 echo _("Continue"); ?></a></span>";
222 222
             i_div.html(t);
223 223
             $(".redirect_link").click(function(event) {
224 224
                i_div.hide();
@@ -226,13 +226,13 @@  discard block
 block discarded – undo
226 226
                
227 227
           });
228 228
         } else if(v.device_customtext != '0' || v.eap_customtext != '0' || v.message != '0' || v.status > 0) {
229
-          var continue_text = "<?php echo _("Continue");?>";
229
+          var continue_text = "<?php echo _("Continue"); ?>";
230 230
           $("#"+v.id+",#g_"+v.id).addClass('additionalInfo');
231 231
           $("#"+v.id+",#g_"+v.id).click(function(event){
232 232
             i_div = $("#info_"+$(this).attr('id'));
233 233
             if(v.status > 0) {
234 234
               t = "<?php echo _("This device cannot be configured with settings provided by your institution")?>";
235
-              continue_text = "<?php echo _("Close");?>";
235
+              continue_text = "<?php echo _("Close"); ?>";
236 236
             } else {
237 237
             t = i_div.html();
238 238
             if(v.message != '0') {
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
     return(Math.round(windowWidth/2));
331 331
 }
332 332
 
333
-<?php if(isset($_REQUEST['idp']) && $_REQUEST['idp']) { 
333
+<?php if (isset($_REQUEST['idp']) && $_REQUEST['idp']) { 
334 334
       print "front_page = 0;\n";
335 335
 } ?>
336 336
 
@@ -369,10 +369,10 @@  discard block
 block discarded – undo
369 369
     $("#download_info a").attr('href',download_link);
370 370
     $('#download_info').show();
371 371
     if( generateTimer > 0 ) {
372
-       setTimeout("document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/')?>'+'/'+download_link",generateTimer);
372
+       setTimeout("document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/')?>'+'/'+download_link",generateTimer);
373 373
     }
374 374
     else {
375
-       document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/')?>'+'/'+download_link;
375
+       document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/')?>'+'/'+download_link;
376 376
     }
377 377
   }
378 378
 }
@@ -463,13 +463,13 @@  discard block
 block discarded – undo
463 463
   $(window).resize(set_front_page);
464 464
   resetDevices();
465 465
  <?php 
466
-if(isset($_REQUEST['idp']) && $_REQUEST['idp']) { 
467
-    if(! is_numeric($_REQUEST['idp']))
466
+if (isset($_REQUEST['idp']) && $_REQUEST['idp']) { 
467
+    if (!is_numeric($_REQUEST['idp']))
468 468
         exit;
469 469
     $p_id = (isset($_REQUEST['profile']) && $_REQUEST['profile']) ? $_REQUEST['profile'] : 0; 
470
-    if(! is_numeric($p_id))
470
+    if (!is_numeric($p_id))
471 471
         exit;
472
-   print 'listProfiles('.$_REQUEST['idp'].','.$p_id.');';
472
+   print 'listProfiles(' . $_REQUEST['idp'] . ',' . $p_id . ');';
473 473
 }
474 474
  ?>
475 475
 
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
    "title":"<?php echo _("Home institution") ?>",
498 498
    "subtitle":"<?php echo _("Select your <strong>institution<\/strong>") ?>",
499 499
    "textHelp": "<?php echo _("Help, my institution is not on the list") ?>",
500
-   "textHelpMore": "<?php echo sprintf(_("This system relies on information supplied by local %s administrators. If your institution is not on the list, then nag them to add information to the %s database."),Config::$CONSORTIUM['name'],Config::$APPEARANCE['productname']); ?>",
500
+   "textHelpMore": "<?php echo sprintf(_("This system relies on information supplied by local %s administrators. If your institution is not on the list, then nag them to add information to the %s database."), Config::$CONSORTIUM['name'], Config::$APPEARANCE['productname']); ?>",
501 501
    "textLocateMe": "<?php echo _("Locate me more accurately using HTML5 Geo-Location") ?>",
502 502
    "textShowProviders": "<?php echo _("Show institutions in") ?>",
503 503
    "textAllCountries": "<?php echo _("all countries") ?>",
Please login to merge, or discard this patch.