Passed
Push — master ( 4302eb...519f93 )
by Stefan
11:45
created
web/admin/edit_hotspot.php 1 patch
Spacing   +10 added lines, -10 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();
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
 if (!isset($_GET['deployment_id'])) {
38 38
     $my_inst->newDeployment(\core\AbstractDeployment::DEPLOYMENTTYPE_MANAGED);
39
-    header("Location: overview_sp.php?inst_id=" . $my_inst->identifier);
39
+    header("Location: overview_sp.php?inst_id=".$my_inst->identifier);
40 40
     exit(0);
41 41
 }
42 42
 
@@ -47,13 +47,13 @@  discard block
 block discarded – undo
47 47
 if (isset($_POST['submitbutton'])) {
48 48
     if ($_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_DELETE) {
49 49
         $deployment->deactivate();
50
-        header("Location: overview_sp.php?inst_id=" . $my_inst->identifier);
50
+        header("Location: overview_sp.php?inst_id=".$my_inst->identifier);
51 51
         exit(0);
52 52
     }
53 53
 
54 54
     if ($_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_ACTIVATE) {
55 55
         $deployment->activate();
56
-        header("Location: overview_sp.php?inst_id=" . $my_inst->identifier);
56
+        header("Location: overview_sp.php?inst_id=".$my_inst->identifier);
57 57
         exit(0);
58 58
     }
59 59
     if ($_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_SAVE) {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         }
70 70
         $optionParser->processSubmittedFields($deployment, $postArray, $_FILES);
71 71
 
72
-        header("Location: overview_sp.php?inst_id=" . $my_inst->identifier);
72
+        header("Location: overview_sp.php?inst_id=".$my_inst->identifier);
73 73
         exit(0);
74 74
     }
75 75
 }
@@ -100,12 +100,12 @@  discard block
 block discarded – undo
100 100
     print_r($deploymentOptions);
101 101
     echo "</pre>";
102 102
     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'>
103
-                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
103
+                <input type='hidden' name='MAX_FILE_SIZE' value='".\config\Master::MAX_UPLOAD_SIZE."'>";
104 104
     $optionDisplay = new \web\lib\admin\OptionDisplay($deploymentOptions, "Profile");
105 105
     ?>
106 106
     <?php
107 107
     echo "<fieldset class='option_container' id='managedsp_override'>
108
-    <legend><strong>" . _("Options for this deployment") . "</strong></legend>";
108
+    <legend><strong>" . _("Options for this deployment")."</strong></legend>";
109 109
     ?>
110 110
     <table>
111 111
         <tr>
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             <!-- input for VLAN identifier for home users-->
124 124
             <td>
125 125
                 <span id='vlan_label'>
126
-                    <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " " . _("(unset with '0')"))); ?>
126
+                    <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " "._("(unset with '0')"))); ?>
127 127
                 </span>
128 128
             </td>
129 129
             <td>
@@ -138,10 +138,10 @@  discard block
 block discarded – undo
138 138
     </table>
139 139
     <?php
140 140
     echo $optionDisplay->prefilledOptionTable("managedsp");
141
-    echo "<button type='button' class='newoption' onclick='getXML(\"managedsp\")'>" . _("Add new option") . "</button>";
141
+    echo "<button type='button' class='newoption' onclick='getXML(\"managedsp\")'>"._("Add new option")."</button>";
142 142
     echo "</fieldset>";
143 143
 
144 144
 
145
-    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_sp.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>";
145
+    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_sp.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>";
146 146
     echo $deco->footer();
147 147
     
148 148
\ No newline at end of file
Please login to merge, or discard this patch.
core/EntityWithDBProperties.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -331,14 +331,14 @@
 block discarded – undo
331 331
     }
332 332
 
333 333
         /**
334
-     * join new attributes to existing ones, but only if not already defined on
335
-     * a different level in the existing set
336
-     * 
337
-     * @param array  $existing the already existing attributes
338
-     * @param array  $new      the new set of attributes
339
-     * @param string $newlevel the level of the new attributes
340
-     * @return array the new set of attributes
341
-     */
334
+         * join new attributes to existing ones, but only if not already defined on
335
+         * a different level in the existing set
336
+         * 
337
+         * @param array  $existing the already existing attributes
338
+         * @param array  $new      the new set of attributes
339
+         * @param string $newlevel the level of the new attributes
340
+         * @return array the new set of attributes
341
+         */
342 342
     protected function levelPrecedenceAttributeJoin($existing, $new, $newlevel) {
343 343
         foreach ($new as $attrib) {
344 344
             $ignore = "";
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             case "core\User":
130 130
                 return $this->userName;
131 131
             default:
132
-                throw new Exception("Operating on a class where we don't know the relevant identifier in the DB - " . get_class($this) . "!");
132
+                throw new Exception("Operating on a class where we don't know the relevant identifier in the DB - ".get_class($this)."!");
133 133
         }
134 134
     }
135 135
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      * @return array list of row id's of file-based attributes which weren't deleted
166 166
      */
167 167
     public function beginFlushAttributes($extracondition = "") {
168
-        $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "") . $this->getRelevantIdentifier() . (!is_int($this->getRelevantIdentifier()) ? "\"" : "");
168
+        $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "").$this->getRelevantIdentifier().(!is_int($this->getRelevantIdentifier()) ? "\"" : "");
169 169
         $this->databaseHandle->exec("DELETE FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier AND option_name NOT LIKE '%_file' $extracondition");
170 170
         $this->updateFreshness();
171 171
         $execFlush = $this->databaseHandle->exec("SELECT row FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier $extracondition");
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      * @return void
185 185
      */
186 186
     public function commitFlushAttributes(array $tobedeleted) {
187
-        $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "") . $this->getRelevantIdentifier() . (!is_int($this->getRelevantIdentifier()) ? "\"" : "");
187
+        $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "").$this->getRelevantIdentifier().(!is_int($this->getRelevantIdentifier()) ? "\"" : "");
188 188
         foreach (array_keys($tobedeleted) as $row) {
189 189
             $this->databaseHandle->exec("DELETE FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier AND row = $row");
190 190
             $this->updateFreshness();
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     public function addAttribute($attrName, $attrLang, $attrValue) {
212 212
         $relevantId = $this->getRelevantIdentifier();
213 213
         $identifierType = (is_int($relevantId) ? "i" : "s");
214
-        $this->databaseHandle->exec("INSERT INTO $this->entityOptionTable ($this->entityIdColumn, option_name, option_lang, option_value) VALUES(?,?,?,?)", $identifierType . "sss", $relevantId, $attrName, $attrLang, $attrValue);
214
+        $this->databaseHandle->exec("INSERT INTO $this->entityOptionTable ($this->entityIdColumn, option_name, option_lang, option_value) VALUES(?,?,?,?)", $identifierType."sss", $relevantId, $attrName, $attrLang, $attrValue);
215 215
         $this->updateFreshness();
216 216
     }
217 217
 
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
         foreach ($new as $attrib) {
344 344
             $ignore = "";
345 345
             foreach ($existing as $approvedAttrib) {
346
-                if (($attrib["name"] == $approvedAttrib["name"] && $approvedAttrib["level"] != $newlevel) && ($approvedAttrib["name"] != "device-specific:redirect") ){
346
+                if (($attrib["name"] == $approvedAttrib["name"] && $approvedAttrib["level"] != $newlevel) && ($approvedAttrib["name"] != "device-specific:redirect")) {
347 347
                     $ignore = "YES";
348 348
                 }
349 349
             }
Please login to merge, or discard this patch.
core/AbstractProfile.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     protected function saveDownloadDetails($idpIdentifier, $profileId, $deviceId, $area, $lang, $eapType) {
131 131
         if (\config\Master::PATHS['logdir']) {
132
-            $file = fopen(\config\Master::PATHS['logdir'] . "/download_details.log", "a");
132
+            $file = fopen(\config\Master::PATHS['logdir']."/download_details.log", "a");
133 133
             if ($file === FALSE) {
134 134
                 throw new Exception("Unable to open file for append: $file");
135 135
             }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             $eaptype = new common\EAP($eapQuery->eap_method_id);
156 156
             $eapTypeArray[] = $eaptype;
157 157
         }
158
-        $this->loggerInstance->debug(4, "This profile supports the following EAP types:\n" . print_r($eapTypeArray, true));
158
+        $this->loggerInstance->debug(4, "This profile supports the following EAP types:\n".print_r($eapTypeArray, true));
159 159
         return $eapTypeArray;
160 160
     }
161 161
 
@@ -230,16 +230,16 @@  discard block
 block discarded – undo
230 230
         if (count($this->getAttributes("internal:checkuser_outer")) > 0) {
231 231
             // we are supposed to use a specific outer username for checks, 
232 232
             // which is different from the outer username we put into installers
233
-            return $this->getAttributes("internal:checkuser_value")[0]['value'] . "@" . $realm;
233
+            return $this->getAttributes("internal:checkuser_value")[0]['value']."@".$realm;
234 234
         }
235 235
         if (count($this->getAttributes("internal:use_anon_outer")) > 0) {
236 236
             // no special check username, but there is an anon outer ID for
237 237
             // installers - so let's use that one
238
-            return $this->getAttributes("internal:anon_local_value")[0]['value'] . "@" . $realm;
238
+            return $this->getAttributes("internal:anon_local_value")[0]['value']."@".$realm;
239 239
         }
240 240
         // okay, no guidance on outer IDs at all - but we need *something* to
241 241
         // test with for the RealmChecks. So:
242
-        return "@" . $realm;
242
+        return "@".$realm;
243 243
     }
244 244
 
245 245
     /**
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
      * @param boolean $shallwe TRUE to enable outer identities (needs valid $realm), FALSE to disable
320 320
      * @return void
321 321
      */
322
-    abstract public function setAnonymousIDSupport($shallwe) ;
322
+    abstract public function setAnonymousIDSupport($shallwe);
323 323
     
324 324
     /**
325 325
      * Log a new download for our stats
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
      */
674 674
     public function prepShowtime() {
675 675
         $properConfig = $this->readyForShowtime();
676
-        $this->databaseHandle->exec("UPDATE profile SET sufficient_config = " . ($properConfig ? "TRUE" : "FALSE") . " WHERE profile_id = " . $this->identifier);
676
+        $this->databaseHandle->exec("UPDATE profile SET sufficient_config = ".($properConfig ? "TRUE" : "FALSE")." WHERE profile_id = ".$this->identifier);
677 677
 
678 678
         $attribs = $this->getCollapsedAttributes();
679 679
         // if not enough info to go live, set FALSE
Please login to merge, or discard this patch.