Passed
Push — release_2_1 ( aab8d6...fcead9 )
by Maja
09:57
created
web/admin/edit_hotspot.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $deco = new \web\lib\admin\PageDecoration();
32 32
 $validator = new \web\lib\common\InputValidation();
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
             ( $_POST['consortium'] == "OpenRoaming" && count($myfed->getAttributes("fed:openroaming")) > 0 )
41 41
             )
42 42
     ) {*/
43
-    if (isset($_POST['consortium']) &&  $_POST['consortium'] == "eduroam")
43
+    if (isset($_POST['consortium']) && $_POST['consortium'] == "eduroam")
44 44
     {
45 45
         $my_inst->newDeployment(\core\AbstractDeployment::DEPLOYMENTTYPE_MANAGED, $_POST['consortium']);
46
-        header("Location: overview_org.php?inst_id=" . $my_inst->identifier);
46
+        header("Location: overview_org.php?inst_id=".$my_inst->identifier);
47 47
         exit(0);
48 48
     } else {
49 49
         throw new Exception("Desired consortium for Managed SP needs to be specified, and allowed!");
@@ -100,18 +100,18 @@  discard block
 block discarded – undo
100 100
                 if (isset($_POST['agreement']) && $_POST['agreement'] == "true") {
101 101
                     $deployment->addAttribute("hiddenmanagedsp:tou_accepted", NULL, 1);
102 102
                 }
103
-                header("Location: overview_org.php?inst_id=" . $my_inst->identifier);
103
+                header("Location: overview_org.php?inst_id=".$my_inst->identifier);
104 104
                 exit(0);
105 105
             case web\lib\common\FormElements::BUTTON_DELETE:
106 106
                 $response = $deployment->setRADIUSconfig();
107 107
                 if (in_array('OK', $response)) {
108 108
                     $deployment->deactivate();
109 109
                 }
110
-                header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
110
+                header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
111 111
                 exit(0);
112 112
             case web\lib\common\FormElements::BUTTON_REMOVESP:
113 113
                 $deployment->remove();
114
-                header("Location: overview_org.php?inst_id=" . $my_inst->identifier);
114
+                header("Location: overview_org.php?inst_id=".$my_inst->identifier);
115 115
                 exit(0);
116 116
             case web\lib\common\FormElements::BUTTON_ACTIVATE:
117 117
                 if (count($deployment->getAttributes("hiddenmanagedsp:tou_accepted")) > 0) {
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                     if (in_array('OK', $response)) {
120 120
                         $deployment->activate();
121 121
                     }
122
-                    header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
122
+                    header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
123 123
                     exit(0);
124 124
                 } else {
125 125
                     throw new Exception("Activate button pushed without acknowledged ToUs!");
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
                 } else {
149 149
                     $response = ['NOOP', 'NOOP'];
150 150
                 }
151
-                header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
151
+                header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
152 152
                 exit(0);
153 153
             default:
154 154
                 throw new Exception("Unknown button action requested!");
@@ -157,10 +157,10 @@  discard block
 block discarded – undo
157 157
     if (isset($_POST['command'])) {
158 158
         switch ($_POST['command']) {
159 159
         case web\lib\common\FormElements::BUTTON_CLOSE:
160
-            header("Location: overview_org.php?inst_id=" . $my_inst->identifier);
160
+            header("Location: overview_org.php?inst_id=".$my_inst->identifier);
161 161
             exit(0);
162 162
         default:
163
-            header("Location: overview_org.php?inst_id=" . $my_inst->identifier);
163
+            header("Location: overview_org.php?inst_id=".$my_inst->identifier);
164 164
             exit(0);
165 165
         }
166 166
     }
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
     echo $uiElements->instLevelInfoBoxes($my_inst);
188 188
     $deploymentOptions = $deployment->getAttributes();
189 189
     echo "<form enctype='multipart/form-data' action='edit_hotspot.php?inst_id=$my_inst->identifier&amp;deployment_id=$deployment->identifier' method='post' accept-charset='UTF-8'>
190
-                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
190
+                <input type='hidden' name='MAX_FILE_SIZE' value='".\config\Master::MAX_UPLOAD_SIZE."'>";
191 191
     $optionDisplay = new \web\lib\admin\OptionDisplay($deploymentOptions, \core\Options::LEVEL_PROFILE);
192 192
     ?>
193 193
     <fieldset class='option_container' id='managedsp_override'>
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
                 <!-- input for VLAN identifier for home users-->
222 222
                 <td>
223 223
                     <span id='vlan_label'>
224
-                        <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " " . _("(unset with '0')"))); ?>
224
+                        <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " "._("(unset with '0')"))); ?>
225 225
                     </span>
226 226
                 </td>
227 227
                 <td>
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
     </fieldset>
242 242
 
243 243
     <?php
244
-    echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>";
244
+    echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>";
245 245
     echo $deco->footer();
246 246
 
247 247
     
248 248
\ No newline at end of file
Please login to merge, or discard this patch.