Completed
Push — development ( 252715...941400 )
by Thomas
44s
created
htdocs/newdesc.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
 
44 44
                 //get the posted data
45 45
                 $show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0;
46
-                $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : '';  // Ocprop
46
+                $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : ''; // Ocprop
47 47
 
48
-                $hints = isset($_POST['hints']) ? trim($_POST['hints']) : '';  // Ocprop
49
-                $sel_lang = isset($_POST['desc_lang']) ? trim($_POST['desc_lang']) : $default_lang;  // Ocprop
50
-                $desc = isset($_POST['desc']) ? trim($_POST['desc']) : '';  // Ocprop
48
+                $hints = isset($_POST['hints']) ? trim($_POST['hints']) : ''; // Ocprop
49
+                $sel_lang = isset($_POST['desc_lang']) ? trim($_POST['desc_lang']) : $default_lang; // Ocprop
50
+                $desc = isset($_POST['desc']) ? trim($_POST['desc']) : ''; // Ocprop
51 51
 
52 52
                 // read descMode; if not set, initialize from user profile
53 53
                 if (isset($_POST['descMode'])) {  // Ocprop
@@ -212,8 +212,7 @@  discard block
 block discarded – undo
212 212
                 tpl_set_var('name', htmlspecialchars($cache_record['name'], ENT_COMPAT, 'UTF-8'));
213 213
                 tpl_set_var('cacheid', htmlspecialchars($cache_id, ENT_COMPAT, 'UTF-8'));
214 214
 
215
-                tpl_set_var('lang_message', $desc_lang_exists ? $lang_message :
216
-                    (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : ''));
215
+                tpl_set_var('lang_message', $desc_lang_exists ? $lang_message : (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : ''));
217 216
 
218 217
                 tpl_set_var('show_all_langs', $show_all_langs);
219 218
                 tpl_set_var('show_all_langs_submit', ($show_all_langs == 0) ? $show_all_langs_submit : '');
@@ -235,7 +234,7 @@  discard block
 block discarded – undo
235 234
                 $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n";
236 235
                 tpl_set_var('htmlheaders', $headers);
237 236
 
238
-                tpl_set_var('reset', $reset);  // obsolete
237
+                tpl_set_var('reset', $reset); // obsolete
239 238
                 tpl_set_var('submit', $submit);
240 239
             }
241 240
         } else {
Please login to merge, or discard this patch.
htdocs/viewcache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 // get cacheid
47 47
 $cacheid = 0;
48 48
 if (isset($_REQUEST['cacheid'])) {
49
-    $cacheid = (int) $_REQUEST['cacheid'];
49
+    $cacheid = (int)$_REQUEST['cacheid'];
50 50
 } else {
51 51
     if (isset($_REQUEST['uuid'])) {
52 52
         $cacheid = cache::cacheIdFromUUID($_REQUEST['uuid']);
Please login to merge, or discard this patch.
htdocs/picture.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     } else {
87 87
         $position = PHP_INT_MAX;
88 88
     }
89
-    $position = min($position, $allpics ? $allpics[count($allpics)-1]['seq'] + 1 : 1);
89
+    $position = min($position, $allpics ? $allpics[count($allpics) - 1]['seq'] + 1 : 1);
90 90
 
91 91
     // uploaded file ok?
92 92
     if (isset($_REQUEST['ok'])) { // Ocprop
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
     }
234 234
     $tpl->assign('allpics', $allpics);
235 235
     $tpl->assign('position', $position);
236
-    $tpl->assign('appendseq', $allpics ? $allpics[count($allpics)-1]['seq']+1 : 1);
236
+    $tpl->assign('appendseq', $allpics ? $allpics[count($allpics) - 1]['seq'] + 1 : 1);
237 237
 }
238 238
 
239 239
 $rsCache = sql("SELECT `wp_oc`, `name` FROM `caches` WHERE `cache_id`='&1'", $picture->getCacheId());
Please login to merge, or discard this patch.
htdocs/src/Oc/Postfix/JournalLogs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
                     $cursor[$key] = $value;
72 72
                 }
73 73
 
74
-                $logEntry->id = (int) hexdec($cursor['i']);
74
+                $logEntry->id = (int)hexdec($cursor['i']);
75 75
 
76 76
                 $timeStamp = $entry['__REALTIME_TIMESTAMP'];
77 77
                 $logEntry->created = \DateTimeImmutable::createFromFormat(
Please login to merge, or discard this patch.
htdocs/lib2/logic/cache.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -505,8 +505,8 @@
 block discarded – undo
505 505
         }
506 506
 
507 507
         $coords = [];
508
-        if ($this->getType() != 7 && $this->getType() != 8 &&  // quiz cache
509
-            $this->hasAttribute(61) != true &&                 // safari cache
508
+        if ($this->getType() != 7 && $this->getType() != 8 && // quiz cache
509
+            $this->hasAttribute(61) != true && // safari cache
510 510
             $this->getStatus() != 5                            // unpublished cache
511 511
         ) {
512 512
             $rsCoords = sql(
Please login to merge, or discard this patch.
htdocs/okapi/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$GLOBALS['rootpath'] = __DIR__.'/../';
3
+$GLOBALS['rootpath'] = __DIR__ . '/../';
4 4
 
5 5
 require_once __DIR__ . '/../vendor/autoload.php';
6 6
 
7
-require_once __DIR__ .'/../vendor/opencaching/okapi/okapi/index.php';
7
+require_once __DIR__ . '/../vendor/opencaching/okapi/okapi/index.php';
Please login to merge, or discard this patch.
htdocs/lib2/OcHTMLPurifier.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $config->set(
64 64
             'HTML.ForbiddenElements',
65 65
             [
66
-                'basefont',   // workaround for HTMLPurifier bug, which allows this in the <body>
66
+                'basefont', // workaround for HTMLPurifier bug, which allows this in the <body>
67 67
             ]
68 68
         );
69 69
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         // add attributes
99 99
         $def->addAttribute('a', 'rel', 'CDATA');
100 100
         $def->addAttribute('img', 'usemap', 'CDATA');
101
-        $def->addAttribute('map', 'name', 'CDATA');   // workaround for HTMLPurifer bug
101
+        $def->addAttribute('map', 'name', 'CDATA'); // workaround for HTMLPurifer bug
102 102
 
103 103
         // create parent object with config
104 104
         parent::__construct($config);
Please login to merge, or discard this patch.
htdocs/ocstats.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 $jpegQuality = 80;
12 12
 $fontFile = __DIR__ . '/resource2/' . $opt['template']['style'] . '/fonts/dejavu/ttf/DejaVuSans.ttf';
13 13
 
14
-$userId = isset($_REQUEST['userid']) ? (int) $_REQUEST['userid'] : 0;
14
+$userId = isset($_REQUEST['userid']) ? (int)$_REQUEST['userid'] : 0;
15 15
 $lang = isset($_REQUEST['lang']) ? mb_strtoupper($_REQUEST['lang']) : $opt['template']['locale'];
16 16
 
17 17
 if (!isset($opt['locale'][$lang])) {
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 $connection = AppKernel::Container()->get(Connection::class);
23 23
 
24 24
 $fileName = __DIR__ . '/images/statpics/statpic' . $userId . $lang . '.jpg';
25
-$userStatisticPicture = (int) $connection->createQueryBuilder()
25
+$userStatisticPicture = (int)$connection->createQueryBuilder()
26 26
     ->select('COUNT(*)')
27 27
     ->from('user_statpic')
28 28
     ->where('user_id = :userId')
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 
49 49
     if (is_array($userData)) {
50 50
         $username = $userData['username'];
51
-        $found = (int) $userData['found'];
52
-        $hidden = (int) $userData['hidden'];
53
-        $logo = (int) $userData['statpic_logo'];
51
+        $found = (int)$userData['found'];
52
+        $hidden = (int)$userData['hidden'];
53
+        $logo = (int)$userData['statpic_logo'];
54 54
         $logoText = $userData['statpic_text'];
55 55
 
56 56
         $textCounterStatistic = $translate->t('Finds: %1  Hidden: %2', '', '', 0, '', 0, $lang);
Please login to merge, or discard this patch.
htdocs/admins.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      ORDER BY username'
32 32
 );
33 33
 
34
-foreach($admins as &$admin) {
34
+foreach ($admins as &$admin) {
35 35
     $rights = [];
36 36
 
37 37
     if ($admin['admin'] & ADMIN_TRANSLATE) {
Please login to merge, or discard this patch.