Completed
Push — development ( 3378c0...2308db )
by Mirco
07:24
created
htdocs/editdesc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
     // check for old-style parameters
22 22
     if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid']))  // Ocprop
23 23
     {
24
-        $cache_id = $_REQUEST['cacheid'];  // Ocprop
25
-        $desc_lang = $_REQUEST['desclang'];  // Ocprop
24
+        $cache_id = $_REQUEST['cacheid']; // Ocprop
25
+        $desc_lang = $_REQUEST['desclang']; // Ocprop
26 26
 
27 27
         $rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $desc_lang);
28 28
         if (mysql_num_rows($rs) == 1) {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 if (isset($_POST['post']))  // Ocprop
91 91
                 {
92 92
                     //here we read all used information from the form if submitted
93
-                    $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1;  // Ocprop
93
+                    $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; // Ocprop
94 94
 
95 95
                     // fuer alte Versionen von OCProp
96 96
                     if (isset($_POST['submit']) && !isset($_POST['version2'])) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                         $oldDescMode = $descMode;
124 124
                     }
125 125
 
126
-                    $short_desc = $_POST['short_desc'];  // Ocprop
126
+                    $short_desc = $_POST['short_desc']; // Ocprop
127 127
                     $hint = htmlspecialchars($_POST['hints'], ENT_COMPAT, 'UTF-8');
128 128
                     $desclang = $_POST['desclang'];
129 129
                     $show_all_langs = isset($_POST['show_all_langs_value']) ? $_POST['show_all_langs_value'] : 0;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                     }
139 139
 
140 140
                     // Text from textarea
141
-                    $desc = $_POST['desc'];  // Ocprop
141
+                    $desc = $_POST['desc']; // Ocprop
142 142
 
143 143
                     // fuer alte Versionen von OCProp
144 144
                     if (isset($_POST['submit']) && !isset($_POST['version2'])) {
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                 tpl_set_var('desclang', htmlspecialchars($desc_lang, ENT_COMPAT, 'UTF-8'));
298 298
                 tpl_set_var('desclang_name', htmlspecialchars(db_LanguageFromShort($desc_lang), ENT_COMPAT, 'UTF-8'));
299 299
                 tpl_set_var('cachename', htmlspecialchars($desc_record['name'], ENT_COMPAT, 'UTF-8'));
300
-                tpl_set_var('reset', $reset);  // obsolete
300
+                tpl_set_var('reset', $reset); // obsolete
301 301
                 tpl_set_var('submit', $submit);
302 302
 
303 303
                 // Text / normal HTML / HTML editor
Please login to merge, or discard this patch.
htdocs/newdesc.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
 
45 45
                 //get the posted data
46 46
                 $show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0;
47
-                $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : '';  // Ocprop
47
+                $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : ''; // Ocprop
48 48
 
49
-                $hints = isset($_POST['hints']) ? $_POST['hints'] : '';  // Ocprop
50
-                $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang;  // Ocprop
51
-                $desc = isset($_POST['desc']) ? $_POST['desc'] : '';  // Ocprop
49
+                $hints = isset($_POST['hints']) ? $_POST['hints'] : ''; // Ocprop
50
+                $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang; // Ocprop
51
+                $desc = isset($_POST['desc']) ? $_POST['desc'] : ''; // Ocprop
52 52
 
53 53
                 // read descMode; if not set, initialize from user profile
54 54
                 if (isset($_POST['descMode'])) {  // Ocprop
@@ -195,8 +195,7 @@  discard block
 block discarded – undo
195 195
                 tpl_set_var('name', htmlspecialchars($cache_record['name'], ENT_COMPAT, 'UTF-8'));
196 196
                 tpl_set_var('cacheid', htmlspecialchars($cache_id, ENT_COMPAT, 'UTF-8'));
197 197
 
198
-                tpl_set_var('lang_message', $desc_lang_exists ? $lang_message :
199
-                    (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : ''));
198
+                tpl_set_var('lang_message', $desc_lang_exists ? $lang_message : (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : ''));
200 199
 
201 200
                 tpl_set_var('show_all_langs', $show_all_langs);
202 201
                 tpl_set_var('show_all_langs_submit', ($show_all_langs == 0) ? $show_all_langs_submit : '');
@@ -218,7 +217,7 @@  discard block
 block discarded – undo
218 217
                 $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n";
219 218
                 tpl_set_var('htmlheaders', $headers);
220 219
 
221
-                tpl_set_var('reset', $reset);  // obsolete
220
+                tpl_set_var('reset', $reset); // obsolete
222 221
                 tpl_set_var('submit', $submit);
223 222
             } else {
224 223
                 //TODO: not the owner
Please login to merge, or discard this patch.
htdocs/lib2/logic/cachelog.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -355,7 +355,7 @@
 block discarded – undo
355 355
         //     return array();
356 356
         // Logic Error - log types are still valid when no NEW logs are allowed for the cache.
357 357
         // (Would e.g. block admin logs and log-type restoring for locked caches.)
358
-        return get_cache_log_types($this->getCacheId(), $this->getType());  // depends on userid
358
+        return get_cache_log_types($this->getCacheId(), $this->getType()); // depends on userid
359 359
     }
360 360
 
361 361
     public static function isDuplicate($cacheId, $userId, $logType, $logDate, $logText)
Please login to merge, or discard this patch.
htdocs/lib2/logic/gis.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         // number of points in the polygon
30 30
         $n = count($polygon);
31 31
         $poly1 = $polygon[0];
32
-        for ($i = 1; $i <= $n; $i ++) {
32
+        for ($i = 1; $i <= $n; $i++) {
33 33
             $poly1XY = explode(' ', $poly1);
34 34
             $poly1x = $poly1XY[0];
35 35
             $poly1y = $poly1XY[1];
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                         if ($poly1y != $poly2y) {
45 45
                             $xinters = ($py - $poly1y) * ($poly2x - $poly1x) / ($poly2y - $poly1y) + $poly1x;
46 46
                             if ($poly1x == $poly2x || $px <= $xinters) {
47
-                                $counter ++;
47
+                                $counter++;
48 48
                             }
49 49
                         }
50 50
                     }
Please login to merge, or discard this patch.
htdocs/lib2/errorhandler.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
     $errorlog_dir = $opt['rootpath'] . 'var/errorlog';
113 113
     $errorlog_path = $errorlog_dir . "/errorlog-" . date("Y-m-d");
114 114
 
115
-    $error_mail_limit = 32768;    // send max 32 KB = ca. 5-20 errors per day/logfile
115
+    $error_mail_limit = 32768; // send max 32 KB = ca. 5-20 errors per day/logfile
116 116
 
117 117
     // All errors which may happen here are ignored, to avoid error recursions.
118 118
 
Please login to merge, or discard this patch.
htdocs/lib2/pager.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
             $to_page = min($last_page, max($first_page, $current_page - $lrspan) + $this->max_pages_shown - 1);
60 60
             $from_page = max($first_page, $to_page - $this->max_pages_shown + 1);
61 61
 
62
-            for ($page = $from_page; $page <= $to_page; $page ++) {
62
+            for ($page = $from_page; $page <= $to_page; $page++) {
63 63
                 if ($page == $current_page) {
64 64
                     $pages[$page] = false;
65 65
                 } else {
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      * Use {page} in link_url als placeholder for the selected page number
25 25
      * and/or {offset} for the 0-based data offset of the selected page.
26 26
      *
27
-     * @param $link_url
27
+     * @param string $link_url
28 28
      * @param int $min_pages_shown
29 29
      * @param int $max_pages_shown
30 30
      */
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 
43 43
 
44 44
     /**
45
-     * @param $current_page
46
-     * @param $total_pages
45
+     * @param double $current_page
46
+     * @param double $total_pages
47 47
      * @param bool $page_size
48 48
      */
49 49
     public function make_from_pagenr($current_page, $total_pages, $page_size = false)
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
     /**
118 118
      * @param $page
119
-     * @param $page_size
119
+     * @param boolean $page_size
120 120
      *
121 121
      * @return string
122 122
      */
Please login to merge, or discard this patch.
htdocs/lib2/error.inc.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -7,34 +7,34 @@
 block discarded – undo
7 7
  *  Common error messages
8 8
  ***************************************************************************/
9 9
 
10
- define('ERROR_UNKNOWN', 1000);
11
- define('ERROR_TEMPLATE_NOT_FOUND', 1001);
12
- define('ERROR_COMPILATION_FAILED', 1002);
13
- define('ERROR_NO_ACCESS', 1003);
14
- define('ERROR_INVALID_OPERATION', 1004);
15
- define('ERROR_LOGIN_REQUIRED', 1005);
16
- define('ERROR_MAIL_TEMPLATE_NOT_FOUND', 1006);
17
- define('ERROR_NO_COOKIES', 1007);
18
- define('ERROR_ALREADY_LOGGEDIN', 1008);
19
- define('ERROR_USER_NOT_ACTIVE', 1009);
20
- define('ERROR_USER_NO_EMAIL', 1010);
21
- define('ERROR_CACHE_NOT_PUBLISHED', 1011);
22
- define('ERROR_CACHE_LOCKED', 1012);
10
+    define('ERROR_UNKNOWN', 1000);
11
+    define('ERROR_TEMPLATE_NOT_FOUND', 1001);
12
+    define('ERROR_COMPILATION_FAILED', 1002);
13
+    define('ERROR_NO_ACCESS', 1003);
14
+    define('ERROR_INVALID_OPERATION', 1004);
15
+    define('ERROR_LOGIN_REQUIRED', 1005);
16
+    define('ERROR_MAIL_TEMPLATE_NOT_FOUND', 1006);
17
+    define('ERROR_NO_COOKIES', 1007);
18
+    define('ERROR_ALREADY_LOGGEDIN', 1008);
19
+    define('ERROR_USER_NOT_ACTIVE', 1009);
20
+    define('ERROR_USER_NO_EMAIL', 1010);
21
+    define('ERROR_CACHE_NOT_PUBLISHED', 1011);
22
+    define('ERROR_CACHE_LOCKED', 1012);
23 23
 
24
- define('ERROR_SEARCHPLUGIN_WAYPOINT_FORMAT', 1013);
25
- define('ERROR_SEARCHPLUGIN_WAYPOINT_MANY', 1014);
26
- define('ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND', 1015);
24
+    define('ERROR_SEARCHPLUGIN_WAYPOINT_FORMAT', 1013);
25
+    define('ERROR_SEARCHPLUGIN_WAYPOINT_MANY', 1014);
26
+    define('ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND', 1015);
27 27
  
28
- define('ERROR_DB_COULD_NOT_RECONNECT', 1016);
29
- define('ERROR_DB_NO_ROOT', 1017);
28
+    define('ERROR_DB_COULD_NOT_RECONNECT', 1016);
29
+    define('ERROR_DB_NO_ROOT', 1017);
30 30
 
31
- define('ERROR_USER_NOT_EXISTS', 1018);
32
- define('ERROR_CACHE_NOT_EXISTS', 1019);
33
- define('ERROR_CACHELOG_NOT_EXISTS', 1020);
34
- define('ERROR_PICTURE_NOT_EXISTS', 1021);
31
+    define('ERROR_USER_NOT_EXISTS', 1018);
32
+    define('ERROR_CACHE_NOT_EXISTS', 1019);
33
+    define('ERROR_CACHELOG_NOT_EXISTS', 1020);
34
+    define('ERROR_PICTURE_NOT_EXISTS', 1021);
35 35
 
36
- define('ERROR_UPLOAD_ERR_NO_FILE', 1022);
37
- define('ERROR_UPLOAD_ERR_SIZE', 1023);
38
- define('ERROR_UPLOAD_ERR_TYPE', 1024);
39
- define('ERROR_UPLOAD_UNKNOWN', 1025);
40
- define('ERROR_UPLOAD_ERR_BAD_FORMAT', 1026);
36
+    define('ERROR_UPLOAD_ERR_NO_FILE', 1022);
37
+    define('ERROR_UPLOAD_ERR_SIZE', 1023);
38
+    define('ERROR_UPLOAD_ERR_TYPE', 1024);
39
+    define('ERROR_UPLOAD_UNKNOWN', 1025);
40
+    define('ERROR_UPLOAD_ERR_BAD_FORMAT', 1026);
Please login to merge, or discard this patch.
htdocs/lib2/sqldebugger.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
                     break;
75 75
                 }
76 76
                 $command['result'][] = $r;
77
-                $c ++;
77
+                $c++;
78 78
             }
79 79
             sql_free_result($rs);
80 80
 
Please login to merge, or discard this patch.
htdocs/lib2/ss_zip.class.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -143,9 +143,9 @@  discard block
 block discarded – undo
143 143
 
144 144
         }
145 145
         $fnl = strlen($filename);
146
-        $fh = "\x14\x00";    // ver needed to extract
147
-        $fh .= "\x00\x00";    // gen purpose bit flag
148
-        $fh .= "\x08\x00";    // compression method
146
+        $fh = "\x14\x00"; // ver needed to extract
147
+        $fh .= "\x00\x00"; // gen purpose bit flag
148
+        $fh .= "\x08\x00"; // compression method
149 149
         $fh .= "\x00\x00\x00\x00"; // last mod time and date
150 150
         $fh .= pack(
151 151
             "V3v2",
@@ -170,16 +170,16 @@  discard block
 block discarded – undo
170 170
                 "va*v3V2",
171 171
                 0,
172 172
                 $fh,
173
-                0,        // file comment length
174
-                0,        // disk number start
175
-                0,        // internal file attributes
176
-                $attr,    // external file attributes - 'archive/directory' bit set
173
+                0, // file comment length
174
+                0, // disk number start
175
+                0, // internal file attributes
176
+                $attr, // external file attributes - 'archive/directory' bit set
177 177
                 $this->offset
178 178
             ) . $filename;
179 179
 
180 180
         $this->offset += 42 + $fnl + $gzsize;
181 181
         $this->cdir[] = $cdir;
182
-        $this->cnt ++;
182
+        $this->cnt++;
183 183
         $this->idx = $this->cnt - 1;
184 184
     }
185 185
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
                 $cdsl, // size of central dir
229 229
                 $zdsl, // offset to start of central dir
230 230
                 0
231
-            );              // .zip file comment length
231
+            ); // .zip file comment length
232 232
         return $this->zipfile;
233 233
     }
234 234
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@
 block discarded – undo
34 34
     public $cdir = [];
35 35
 
36 36
     /**    constructor
37
-
38
-*
37
+     *
39 38
 *@param string $zipFile if not empty must contain path to valid zip file, ss_zip will try to open and parse it.
40 39
      *               If this parameter is empty, the new empty zip archive is created. This parameter has no meaning in
41 40
      *               LIGHT verion, please upgrade to PROfessional version.
Please login to merge, or discard this patch.