Completed
Branch master (7d3f82)
by Thomas
09:15
created
htdocs/newcachesrest.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@
 block discarded – undo
14 14
 $tpl->caching = true;
15 15
 $tpl->cache_lifetime = 3600;
16 16
 
17
-$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] :
18
-    (isset($_REQUEST['country']) ? $_REQUEST['country'] : $opt['page']['main_country']);
17
+$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : (isset($_REQUEST['country']) ? $_REQUEST['country'] : $opt['page']['main_country']);
19 18
 
20 19
 if (!$tpl->is_cached()) {
21 20
     $newCaches = array();
Please login to merge, or discard this patch.
htdocs/picture.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,11 +75,11 @@
 block discarded – undo
75 75
     if (isset($_REQUEST['ok'])) { // Ocprop
76 76
         $bError = false;
77 77
 
78
-        $picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler'] == '1');  // Ocprop
79
-        $picture->setDisplay((isset($_REQUEST['notdisplay']) && $_REQUEST['notdisplay'] == '1') == false);  // Ocprop
78
+        $picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler'] == '1'); // Ocprop
79
+        $picture->setDisplay((isset($_REQUEST['notdisplay']) && $_REQUEST['notdisplay'] == '1') == false); // Ocprop
80 80
         $picture->setMapPreview(isset($_REQUEST['mappreview']) && $_REQUEST['mappreview'] == '1');
81 81
 
82
-        $title = isset($_REQUEST['title']) ? $_REQUEST['title'] : '';  // Ocprop
82
+        $title = isset($_REQUEST['title']) ? $_REQUEST['title'] : ''; // Ocprop
83 83
         if ($title == '' || ($picture->getObjectType() == OBJECT_CACHELOG && trim($title) == '')) {
84 84
             $tpl->assign('errortitle', true);
85 85
             $bError = true;
Please login to merge, or discard this patch.
htdocs/doc/sql/stored-proc/maintain.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 #!/usr/bin/php -q
2 2
 <?php
3
- /***************************************************************************
3
+    /***************************************************************************
4 4
  *  For license information see doc/license.txt
5 5
  *
6 6
  *  Unicode Reminder メモ
Please login to merge, or discard this patch.
htdocs/coordinates.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,8 +88,9 @@
 block discarded – undo
88 88
     $tpl->assign('coordW3W2', $coord->getW3W($w3w_langs[1]));
89 89
     $lang2_name = sql_value("SELECT `name` FROM `languages` WHERE `short`='&1'", '', $w3w_langs[1]);
90 90
     $tpl->assign('W3Wlang2', $translate->t($lang2_name, '', '', 0));
91
-} else
91
+} else {
92 92
     $tpl->assign('coordW3W2', false);
93
+}
93 94
 
94 95
 // wp gesetzt?
95 96
 $wp = isset($_REQUEST['wp']) ? $_REQUEST['wp'] : '';
Please login to merge, or discard this patch.
htdocs/query.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
     if ($submit == true) {
73 73
         $options = sql_value("SELECT `options` FROM `queries` WHERE `id`='&1'", false, $queryid);
74 74
         if (!$options) {
75
-            $tpl->error(ERROR_UNKNOWN);   // query does not exist
75
+            $tpl->error(ERROR_UNKNOWN); // query does not exist
76 76
         } elseif ($sortby || $sortorder || $creationdate) {
77 77
             $oa = unserialize($options);
78 78
             if ($sortby) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -106,9 +106,9 @@
 block discarded – undo
106 106
             }
107 107
         } else {
108 108
             // save as
109
-            if (sql_value("SELECT COUNT(*) FROM `queries` WHERE `id`='&1' AND `user_id`='&2'", 0, $saveas_queryid, $login->userid) == 0)
110
-                $tpl->assign('errorMustSelectQuery', true);
111
-            else {
109
+            if (sql_value("SELECT COUNT(*) FROM `queries` WHERE `id`='&1' AND `user_id`='&2'", 0, $saveas_queryid, $login->userid) == 0) {
110
+                            $tpl->assign('errorMustSelectQuery', true);
111
+            } else {
112 112
                 sql("UPDATE `queries` SET `options`='&1' WHERE `id`='&2'", $options, $saveas_queryid);
113 113
                 $tpl->redirect('query.php?action=view');
114 114
             }
Please login to merge, or discard this patch.
local/mailing/mailing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
 foreach ($sendto as $receiver) {
43 43
     $receiver = trim($receiver);
44
-    echo ++ $n . "/$total: $receiver";
44
+    echo ++$n . "/$total: $receiver";
45 45
     mail(
46 46
         $receiver,
47 47
         $subject,
Please login to merge, or discard this patch.
local/devel/style-cleanup.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -108,19 +108,19 @@  discard block
 block discarded – undo
108 108
                         && !preg_match("/^ *(\\*|\/\/|#) *\n$/", $line)) {
109 109
 
110 110
                         $old_line = $line;
111
-                        $line = rtrim($line);   # trims " \t\n\r\0\x0B"
111
+                        $line = rtrim($line); # trims " \t\n\r\0\x0B"
112 112
                         $line = $this->expandTabs($line);
113 113
                         $line .= "\n";
114 114
 
115 115
                         if ($line != $old_line) {
116 116
                             $file_modified = true;
117
-                            ++ $this->lines_modified;
117
+                            ++$this->lines_modified;
118 118
                         }
119 119
                     }
120 120
                     if (preg_match('/\<\?\s/', $line)) {   # relies on \n at EOL
121 121
                         self::warn('short open tag in line ' . $n . ' of ' . $display_filepath);
122 122
                     }
123
-                    ++ $n;
123
+                    ++$n;
124 124
                 }
125 125
 
126 126
                 # remove PHP close tags and empty lines from end of file
@@ -131,17 +131,17 @@  discard block
 block discarded – undo
131 131
                     if ($trimmed_line == '?>' || $trimmed_line == '') {
132 132
                         unset($lines[$l]);
133 133
                         $file_modified = true;
134
-                        ++ $this->lines_modified;
134
+                        ++$this->lines_modified;
135 135
                     } else {
136 136
                         break;
137 137
                     }
138
-                    -- $l;
138
+                    --$l;
139 139
                 }
140 140
 
141 141
                 if ($file_modified) {
142 142
                     echo 'cleaned ' . substr($filepath, 2) . "\n";
143 143
                     file_put_contents($filepath, implode('', $lines));
144
-                    ++ $this->files_modified;
144
+                    ++$this->files_modified;
145 145
                 }
146 146
             }
147 147
 
Please login to merge, or discard this patch.
local/devel/strip_private_data.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
 echo "clearing user data\n";
64 64
 sql('TRUNCATE `cache_adoption`');
65 65
 sql('TRUNCATE `cache_ignore`');
66
-sql('DELETE FROM `cache_lists` WHERE `is_public`<2');  // trigger deletes dependent data
66
+sql('DELETE FROM `cache_lists` WHERE `is_public`<2'); // trigger deletes dependent data
67 67
 sql('TRUNCATE `cache_list_bookmarks`');
68 68
 sql('TRUNCATE `cache_list_watches`');
69 69
 sql('TRUNCATE `cache_watches`');
70
-sql('DELETE FROM `coordinates` WHERE `type`=2');   // personal cache notes and coords
70
+sql('DELETE FROM `coordinates` WHERE `type`=2'); // personal cache notes and coords
71 71
 sql('TRUNCATE `queries`');
72 72
 sql('TRUNCATE `user_options`');
73 73
 sql(
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 echo "\n";
113 113
 mysql_free_result($rs);
114 114
 
115
-echo "clearing OKAPI data\n";;
115
+echo "clearing OKAPI data\n"; ;
116 116
 if (sql_table_exists('okapi_vars')) {
117 117
     echo "clearing OKAPI data\n";
118 118
     sql('TRUNCATE `okapi_authorizations`');
Please login to merge, or discard this patch.
local/maintenance/init_user_languages.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
                 $lang
32 32
             );
33 33
         }
34
-        ++ $set;
34
+        ++$set;
35 35
     }
36
-    if (++ $processed % 1000 == 0) {
36
+    if (++$processed % 1000 == 0) {
37 37
         echo "$set of $processed " . ($write ? '' : 'would be ') . "set\n";
38 38
     }
39 39
 }
Please login to merge, or discard this patch.