Passed
Pull Request — master (#329)
by Mirko
07:45
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/removelog.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@
 block discarded – undo
186 186
                         }
187 187
                         $path .= mb_strtoupper(mb_substr($filename, 0, 1)) . '/' .
188 188
                             mb_strtoupper(mb_substr($filename, 1, 1)) . '/';
189
-                        @unlink($path . $filename);  // Thumb
189
+                        @unlink($path . $filename); // Thumb
190 190
 
191 191
                         /* lib2 code would be ...
192 192
                         $rs = sql("SELECT `id` FROM `pictures` WHERE `object_type`=1 AND `object_id`='&1'", $log_id);
Please login to merge, or discard this patch.
htdocs/newcaches.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@
 block discarded – undo
12 12
 $tpl->change_country_inpage = true;
13 13
 
14 14
 $startat = isset($_REQUEST['startat']) ? floor($_REQUEST['startat'] + 0) : 0;
15
-$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] :
16
-    (isset($_REQUEST['country']) ? $_REQUEST['country'] : '');
15
+$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : (isset($_REQUEST['country']) ? $_REQUEST['country'] : '');
17 16
 $cachetype = isset($_REQUEST['cachetype']) ? $_REQUEST['cachetype'] + 0 : 0;
18 17
 $bEvents = ($cachetype == 6);
19 18
 
Please login to merge, or discard this patch.
htdocs/xml/csv/cache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,6 +43,6 @@
 block discarded – undo
43 43
         echo ';';
44 44
         echo '"' . mb_ereg_replace('"', '\"', $cache->getWPGC()) . '"';
45 45
         echo ';';
46
-        echo '""';  // obsolete Navicache WP
46
+        echo '""'; // obsolete Navicache WP
47 47
     }
48 48
 }
Please login to merge, or discard this patch.
htdocs/lib2/OcHTMLPurifier.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
         $config->set('Attr.IDPrefix', 'custom_');
51 51
 
52 52
         // enable 'display' and 'visibility' styles for mystery descriptions
53
-        $config->set('CSS.AllowTricky', true);                // + display, visibility, overflow
54
-        $config->set('CSS.ForbiddenProperties', 'overflow');  // - overflow
53
+        $config->set('CSS.AllowTricky', true); // + display, visibility, overflow
54
+        $config->set('CSS.ForbiddenProperties', 'overflow'); // - overflow
55 55
 
56 56
         // prepare additional definitions
57 57
         $def = $config->getHTMLDefinition(true);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         ); //  HTML5 attribs currently not supported by TinyMCE
66 66
         $def->addElement('legend', 'Inline', 'Flow', 'Common');
67 67
         $def->addElement('q', 'Inline', 'Inline', 'Common', ['cite' => 'URI']);
68
-        $def->addElement('strike', 'Inline', 'Inline', 'Common');   // -> wird in CSS umgewandelt
68
+        $def->addElement('strike', 'Inline', 'Inline', 'Common'); // -> wird in CSS umgewandelt
69 69
         $def->addElement(
70 70
             'area',
71 71
             'Inline',
Please login to merge, or discard this patch.
htdocs/lib2/cookie.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 
52 52
             if ($opt['session']['check_referer']) {
53 53
                 if (isset($_SERVER['REFERER'])) {
54
-                    if (strtolower(substr('http' + strstr($_SERVER['REFERER'], '://'), 0, strlen($opt['page']['absolute_http_url']))) != strtolower($opt['page']['absolute_http_url'])) {
54
+                    if (strtolower(substr('http' +strstr($_SERVER['REFERER'], '://'), 0, strlen($opt['page']['absolute_http_url']))) != strtolower($opt['page']['absolute_http_url'])) {
55 55
                         $this->createNewSession();
56 56
                     }
57 57
                 }
Please login to merge, or discard this patch.
htdocs/lib2/logic/logpics.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@
 block discarded – undo
17 17
     const FOR_STARTPAGE_GALLERY = 1;
18 18
     const FOR_NEWPICS_GALLERY = 2;
19 19
     const FOR_USER_STAT = 3;
20
-    const FOR_USER_GALLERY = 4;   // params: userid
20
+    const FOR_USER_GALLERY = 4; // params: userid
21 21
     const FOR_MYHOME_GALLERY = 5;
22
-    const FOR_CACHE_STAT = 6;     // params: cacheid
23
-    const FOR_CACHE_GALLERY = 7;  // params: cacheid
22
+    const FOR_CACHE_STAT = 6; // params: cacheid
23
+    const FOR_CACHE_GALLERY = 7; // params: cacheid
24 24
 
25
-    const MAX_PICTURES_PER_GALLERY_PAGE = 48;   // must be multiple of 6
25
+    const MAX_PICTURES_PER_GALLERY_PAGE = 48; // must be multiple of 6
26 26
 
27 27
 
28 28
     public static function get($purpose, $userid = 0, $cacheid = 0)
Please login to merge, or discard this patch.
htdocs/lib2/logic/const.inc.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
 define('RE_TYPE_FLOAT', 5);
17 17
 define('RE_TYPE_DOUBLE', 6);
18 18
 
19
-define('RE_INSERT_NOTHING', 0);       //
20
-define('RE_INSERT_OVERWRITE', 1);     // ignore given values and use function
21
-define('RE_INSERT_IGNORE', 2);        // dont use this column on insert
19
+define('RE_INSERT_NOTHING', 0); //
20
+define('RE_INSERT_OVERWRITE', 1); // ignore given values and use function
21
+define('RE_INSERT_IGNORE', 2); // dont use this column on insert
22 22
 define('RE_INSERT_AUTOINCREMENT', 4); // column is an auto increment column
23
-define('RE_INSERT_AUTOUUID', 8);      // if empty, UUID is generated by before insert trigger (not supported for primary key fields)
24
-define('RE_INSERT_NOW', 16);          // NOW()
23
+define('RE_INSERT_AUTOUUID', 8); // if empty, UUID is generated by before insert trigger (not supported for primary key fields)
24
+define('RE_INSERT_NOW', 16); // NOW()
25 25
 
26 26
 define('EUROPEAN_LETTERS', 'A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ');
27 27
 // ASCII + ISO-8859-1 0xC0..0xFF
@@ -31,13 +31,13 @@  discard block
 block discarded – undo
31 31
 define('REGEX_FIRST_NAME', REGEX_LAST_NAME);
32 32
 define('REGEX_STATPIC_TEXT', '^[' . EUROPEAN_LETTERS . '0-9\.\-_ @=)(\/\\\&*\$+~#!§%;,-?:\[\]{}¹²³\'\"`\|µ°\%]{0,30}$');
33 33
 
34
-define('ADMIN_TRANSLATE', 1);     // edit translation
35
-define('ADMIN_MAINTAINANCE', 2);  // check table etc.
36
-define('ADMIN_USER', 4);          // drop users, caches etc.
37
-define('ADMIN_NEWS', 8);          // obsolete / reserved
38
-define('ADMIN_RESTORE', 16);      // restore vandalized listings
39
-define('ADMIN_ROOT', 128 | 127);  // root + all previous rights
40
-define('ADMIN_LISTING', 1024);    // can edit any cache listings
34
+define('ADMIN_TRANSLATE', 1); // edit translation
35
+define('ADMIN_MAINTAINANCE', 2); // check table etc.
36
+define('ADMIN_USER', 4); // drop users, caches etc.
37
+define('ADMIN_NEWS', 8); // obsolete / reserved
38
+define('ADMIN_RESTORE', 16); // restore vandalized listings
39
+define('ADMIN_ROOT', 128 | 127); // root + all previous rights
40
+define('ADMIN_LISTING', 1024); // can edit any cache listings
41 41
 
42 42
 define('ATTRIB_SELECTED', 1);
43 43
 define('ATTRIB_UNSELECTED', 2);
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
 // ID 15 was temporarily used and is reserved, see commit dda7ef0. Continue with 16.
80 80
 
81 81
 // user.data_license values
82
-define('OLD_DATA_LICSENSE', 0);                       // before deadline
83
-define('NEW_DATA_LICENSE_ACTIVELY_DECLINED', 1);      // declined license
84
-define('NEW_DATA_LICENSE_ACTIVELY_ACCEPTED', 2);      // accepted new license on registration
85
-define('NEW_DATA_LICENSE_PASSIVELY_ACCEPTED', 3);     // did not decline license until deadline
86
-define('NEW_DATA_LICENSE_PASSIVELY_DECLINED', 4);     // could not accept/decline because disabled
82
+define('OLD_DATA_LICSENSE', 0); // before deadline
83
+define('NEW_DATA_LICENSE_ACTIVELY_DECLINED', 1); // declined license
84
+define('NEW_DATA_LICENSE_ACTIVELY_ACCEPTED', 2); // accepted new license on registration
85
+define('NEW_DATA_LICENSE_PASSIVELY_ACCEPTED', 3); // did not decline license until deadline
86
+define('NEW_DATA_LICENSE_PASSIVELY_DECLINED', 4); // could not accept/decline because disabled
87 87
 
88 88
 //picture upload/resize parameters
89 89
 define('PICTURE_QUALITY', 85);
Please login to merge, or discard this patch.
htdocs/lib2/logic/sitemapxml.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 {
13 13
     public $sDefaultChangeFreq = 'monthly';
14 14
     public $nMaxFileSize = 9961472; // max file size, 10MB by specification
15
-    public $nMaxUrlCount = 50000;   // max number of URLs per file, 50000 by specification
15
+    public $nMaxUrlCount = 50000; // max number of URLs per file, 50000 by specification
16 16
 
17 17
     public $sPath = '';
18 18
     public $sDomain = '';
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
         // open new XML file?
77 77
         if ($this->oSitemapFile === false) {
78
-            $this->nSitemapIndex ++;
78
+            $this->nSitemapIndex++;
79 79
             $sFilename = 'sitemap-' . $this->nSitemapIndex . '.xml.gz';
80 80
             $this->oSitemapFile = gzopen($this->sPath . $sFilename, 'wb');
81 81
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         // write string to XML
92 92
         gzwrite($this->oSitemapFile, $str);
93 93
         $this->nWrittenSize += strlen($str);
94
-        $this->nWrittenCount ++;
94
+        $this->nWrittenCount++;
95 95
     }
96 96
 
97 97
     public function close()
Please login to merge, or discard this patch.