Passed
Push — master ( fc8074...1d2885 )
by Stefan
06:43
created
web/lib/admin/OptionParser.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 ?>
28 28
 <?php
29 29
 
30
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
30
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
31 31
 
32 32
 /**
33 33
  * This class parses HTML field input from POST and FILES and extracts valid and authorized options to be set.
@@ -345,14 +345,14 @@  discard block
 block discarded – undo
345 345
                     case \core\Options::TYPECODE_TEXT:
346 346
                     case \core\Options::TYPECODE_COORDINATES:
347 347
                     case \core\Options::TYPECODE_INTEGER:
348
-                        $varName = $listOfEntries["$objId-" . $validators[$optioninfo['type']]['field']];
348
+                        $varName = $listOfEntries["$objId-".$validators[$optioninfo['type']]['field']];
349 349
                         if (!empty($varName)) {
350 350
                             $content = call_user_func_array([$this->validator, $validators[$optioninfo['type']]['function']], array_merge([$varName], $validators[$optioninfo['type']]['extraarg']));
351 351
                             break;
352 352
                         }
353 353
                         continue 2;
354 354
                     case \core\Options::TYPECODE_BOOLEAN:
355
-                        $varName = $listOfEntries["$objId-" . \core\Options::TYPECODE_BOOLEAN];
355
+                        $varName = $listOfEntries["$objId-".\core\Options::TYPECODE_BOOLEAN];
356 356
                         if (!empty($varName)) {
357 357
                             $contentValid = $this->validator->boolean($varName);
358 358
                             if ($contentValid) {
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
                         }
366 366
                         continue 2;
367 367
                     case \core\Options::TYPECODE_STRING:
368
-                        $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING];
368
+                        $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING];
369 369
                         if (!empty($previsionalContent)) {
370 370
                             $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad);
371 371
                             if ($content === FALSE) {
@@ -376,15 +376,15 @@  discard block
 block discarded – undo
376 376
                         continue 2;
377 377
                     case \core\Options::TYPECODE_FILE:
378 378
                         // this is either actually an uploaded file, or a reference to a DB entry of a previously uploaded file
379
-                        $reference = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING];
379
+                        $reference = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING];
380 380
                         if (!empty($reference)) { // was already in, by ROWID reference, extract
381 381
                             // ROWID means it's a multi-line string (simple strings are inline in the form; so allow whitespace)
382 382
                             $content = $this->validator->string(urldecode($reference), TRUE);
383 383
                             break;
384 384
                         }
385
-                        $fileName = $listOfEntries["$objId-" . \core\Options::TYPECODE_FILE] ?? "";
385
+                        $fileName = $listOfEntries["$objId-".\core\Options::TYPECODE_FILE] ?? "";
386 386
                         if ($fileName != "") { // let's do the download
387
-                            $rawContent = \core\common\OutsideComm::downloadFile("file:///" . $fileName);
387
+                            $rawContent = \core\common\OutsideComm::downloadFile("file:///".$fileName);
388 388
 
389 389
                             if ($rawContent === FALSE || !$this->checkUploadSanity($objValue, $rawContent)) {
390 390
                                 $bad[] = $objValue;
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
                         }
396 396
                         continue 2;
397 397
                     default:
398
-                        throw new Exception("Internal Error: Unknown option type " . $objValue . "!");
398
+                        throw new Exception("Internal Error: Unknown option type ".$objValue."!");
399 399
                 }
400 400
                 // lang can be NULL here, if it's not a multilang attribute, or a ROWID reference. Never mind that.
401 401
                 $retval[] = ["$objValue" => ["lang" => $lang, "content" => $content]];
Please login to merge, or discard this patch.