Completed
Branch master (84f4f1)
by Thomas
23:30
created
htdocs/lib2/logic/sitemapxml.class.php 2 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -46,6 +46,11 @@  discard block
 block discarded – undo
46 46
     /* sChaneFreq = {always, hourly, daily, weekly, monthly, yearly, never}
47 47
      * nPriority  = {0.0 to 1.0}
48 48
      */
49
+
50
+    /**
51
+     * @param string $sFile
52
+     * @param integer $dLastMod
53
+     */
49 54
     public function write($sFile, $dLastMod, $sChangeFreq = false, $nPriority = 0.5)
50 55
     {
51 56
         if ($sChangeFreq == false) {
@@ -62,6 +67,9 @@  discard block
 block discarded – undo
62 67
         $this->writeInternal($sXML);
63 68
     }
64 69
 
70
+    /**
71
+     * @param string $str
72
+     */
65 73
     public function writeInternal($str)
66 74
     {
67 75
         global $opt;
Please login to merge, or discard this 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.
htdocs/lib2/search/search.txt.inc.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -228,6 +228,9 @@
 block discarded – undo
228 228
     return $str;
229 229
 }
230 230
 
231
+/**
232
+ * @param string $str
233
+ */
231 234
 function lf2crlf($str)
232 235
 {
233 236
     return mb_ereg_replace("\r\r\n", "\r\n", mb_ereg_replace("\n", "\r\n", $str));
Please login to merge, or discard this patch.
htdocs/src/Oc/Libse/ChildWp/ControllerChildWp.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -28,6 +28,9 @@  discard block
 block discarded – undo
28 28
         $this->translator = $this->initTranslator($translator);
29 29
     }
30 30
 
31
+    /**
32
+     * @param boolean $request
33
+     */
31 34
     private function initRequest($request)
32 35
     {
33 36
         if ($request) {
@@ -37,6 +40,9 @@  discard block
 block discarded – undo
37 40
         return new RequestHttp();
38 41
     }
39 42
 
43
+    /**
44
+     * @param boolean $translator
45
+     */
40 46
     private function initTranslator($translator)
41 47
     {
42 48
         if ($translator) {
Please login to merge, or discard this patch.
htdocs/util/notification/run_notify.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -197,6 +197,9 @@
 block discarded – undo
197 197
     return 0;
198 198
 }
199 199
 
200
+/**
201
+ * @param string $domain
202
+ */
200 203
 function is_existent_maildomain($domain)
201 204
 {
202 205
     $smtp_serverlist = [];
Please login to merge, or discard this patch.
local/devel/find_bad_encodings.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -39,6 +39,9 @@
 block discarded – undo
39 39
 }
40 40
 
41 41
 
42
+/**
43
+ * @param string $path
44
+ */
42 45
 function test_encoding($path)
43 46
 {
44 47
     static $ur_exclude = [  // no unicode reminder needed
Please login to merge, or discard this 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
 function test_encoding($path)
43 43
 {
44
-    static $ur_exclude = [  // no unicode reminder needed
44
+    static $ur_exclude = [// no unicode reminder needed
45 45
         'lib2/html2text.class.php',
46 46
         'lib2/imagebmp.inc.php',
47 47
         'lib2/Net/IDNA2',
Please login to merge, or discard this patch.
htdocs/restorecaches.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1011,7 +1011,7 @@
 block discarded – undo
1011 1011
                             }
1012 1012
                             $logs_restored = true;
1013 1013
                         }
1014
-                       // if it was not already restored by a later restore operation ...
1014
+                        // if it was not already restored by a later restore operation ...
1015 1015
                     } elseif (sql_value("SELECT `id` FROM `cache_logs` WHERE `id`='&1'", 0, $revert_logid) == 0) {
1016 1016
                         // id, uuid, date_created and last_modified are set automatically;
1017 1017
                         // picture will be updated automatically on picture-restore
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
     $rs = sql("SELECT * FROM `caches` WHERE `cache_id` IN " . $cachelist);
368 368
     while ($r = sql_fetch_assoc($rs)) {
369 369
         $nextcd[$r['wp_oc']] = $r;
370
-        $user_id = $r['user_id'];     // is used later for logs
370
+        $user_id = $r['user_id']; // is used later for logs
371 371
     }
372 372
     sql_free_result($rs);
373 373
 
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
         "SELECT * FROM `caches_attributes_modified`
468 468
          WHERE `cache_id` IN " . $cachelist . "  /* OConly attrib is shown, but not restorable */
469 469
          ORDER BY `date_modified` ASC"
470
-    );   // order doesn't matter as long it is date only
470
+    ); // order doesn't matter as long it is date only
471 471
     while ($r = sql_fetch_assoc($rs)) {
472 472
         append_data(
473 473
             $data,
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
         "SELECT *, " . $piccacheid . "AS `cache_id` FROM `pictures_modified`
624 624
          WHERE " . $piccacheid . " IN " . $cachelist . "
625 625
          ORDER BY `date_modified` ASC"
626
-    );  // order is relevant for the case of restore-reverts
626
+    ); // order is relevant for the case of restore-reverts
627 627
     while ($r = sql_fetch_assoc($rs)) {
628 628
         $r['date_modified'] = substr($r['date_modified'], 0, 10);
629 629
         switch ($r['operation']) {
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
 {
728 728
     global $opt, $login;
729 729
 
730
-    sql("SET @restoredby='&1'", $login->userid);         // is evaluated by trigger functions
730
+    sql("SET @restoredby='&1'", $login->userid); // is evaluated by trigger functions
731 731
     sql_slave("SET @restoredby='&1'", $login->userid);
732 732
 
733 733
     $restored = array();
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
                         // id, uuid, date_created and last_modified are set automatically;
1020 1020
                         // picture will be updated automatically on picture-restore
1021 1021
                         $log = new cachelog();
1022
-                        $log->setNode($r['node']);  // cachelog class currently does not initialize node field
1022
+                        $log->setNode($r['node']); // cachelog class currently does not initialize node field
1023 1023
                         $log->setCacheId($r['cache_id']);
1024 1024
                         $log->setUserId($r['user_id']);
1025 1025
                         $log->setType($r['type'], true);
@@ -1071,7 +1071,7 @@  discard block
 block discarded – undo
1071 1071
                 }  // not already processed
1072 1072
 
1073 1073
                 if ($error != "") {
1074
-                    $restored[$wp]['internal error - could not $error log ' + $r['id'] + "/" + $logid];
1074
+                    $restored[$wp]['internal error - could not $error log ' +$r['id'] + "/" +$logid];
1075 1075
                 }
1076 1076
                 if ($logs_restored) {
1077 1077
                     $restored[$wp]['logs'] = true;
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
                 }  // not already processed
1204 1204
 
1205 1205
                 if ($error != "") {
1206
-                    $restored[$wp]['internal error - could not $error picture ' . $r['id'] + "/" + $picid] = true;
1206
+                    $restored[$wp]['internal error - could not $error picture ' . $r['id'] + "/" +$picid] = true;
1207 1207
                 }
1208 1208
                 if ($pics_restored) {
1209 1209
                     $restored[$wp]['pictures'] = true;
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/translate.php 1 patch
Switch Indentation   +100 added lines, -100 removed lines patch added patch discarded remove patch
@@ -86,69 +86,69 @@  discard block
 block discarded – undo
86 86
 }
87 87
 
88 88
 switch ($action) {
89
-    case 'selectlang':
90
-        break;
89
+        case 'selectlang':
90
+            break;
91 91
 
92
-    case 'verify':
93
-        verify();
94
-        break;
92
+        case 'verify':
93
+            verify();
94
+            break;
95 95
 
96
-    case 'resetids':
97
-        resetIds();
98
-        break;
96
+        case 'resetids':
97
+            resetIds();
98
+            break;
99 99
 
100
-    case 'clearcache':
101
-        clearCache();
102
-        break;
100
+        case 'clearcache':
101
+            clearCache();
102
+            break;
103 103
 
104
-    case 'export':
105
-        export();
106
-        break;
104
+        case 'export':
105
+            export();
106
+            break;
107 107
 
108
-    case 'xmlexport':
109
-        xmlexport();
110
-        break;
108
+        case 'xmlexport':
109
+            xmlexport();
110
+            break;
111 111
 
112
-    case 'xmlimport':
113
-        break;
112
+        case 'xmlimport':
113
+            break;
114 114
 
115
-    case 'xmlimport2':
116
-        xmlimport2();
117
-        break;
115
+        case 'xmlimport2':
116
+            xmlimport2();
117
+            break;
118 118
 
119
-    case 'xmlimport3':
120
-        xmlimport3();
121
-        break;
119
+        case 'xmlimport3':
120
+            xmlimport3();
121
+            break;
122 122
 
123
-    case 'textexportnew':
124
-        textexport($translang, false);
125
-        break;
123
+        case 'textexportnew':
124
+            textexport($translang, false);
125
+            break;
126 126
 
127
-    case 'textexportall':
128
-        textexport($translang, true);
129
-        break;
127
+        case 'textexportall':
128
+            textexport($translang, true);
129
+            break;
130 130
 
131
-    case 'textimport':
132
-        break;
131
+        case 'textimport':
132
+            break;
133 133
 
134
-    case 'textimport2':
135
-        textimport($translang);
136
-        break;
134
+        case 'textimport2':
135
+            textimport($translang);
136
+            break;
137 137
 
138
-    case 'edit':
139
-        if (!$access->mayTranslate($translang)) {
140
-            $tpl->error(ERROR_NO_ACCESS);
141
-        }
142
-        edit();
143
-        break;
138
+        case 'edit':
139
+            if (!$access->mayTranslate($translang)) {
140
+                $tpl->error(ERROR_NO_ACCESS);
141
+            }
142
+            edit();
143
+            break;
144 144
 
145
-    case 'copy_en':
146
-        copy_english_texts();
147
-        break;
145
+        case 'copy_en':
146
+            copy_english_texts();
147
+            break;
148 148
 
149
-    case 'listfaults':
150
-        $trans = sql(
151
-            "SELECT
149
+        case 'listfaults':
150
+            $trans = sql(
151
+                "SELECT
152 152
                 `sys_trans`.`id`,
153 153
                 `sys_trans`.`text`
154 154
              FROM `sys_trans`
@@ -156,14 +156,14 @@  discard block
 block discarded – undo
156 156
                 ON `sys_trans`.`id`=`sys_trans_ref`.`trans_id`
157 157
              WHERE ISNULL(`sys_trans_ref`.`trans_id`)
158 158
              ORDER BY `sys_trans`.`id` DESC"
159
-        );
160
-        $tpl->assign_rs('trans', $trans);
161
-        sql_free_result($trans);
162
-        break;
159
+            );
160
+            $tpl->assign_rs('trans', $trans);
161
+            sql_free_result($trans);
162
+            break;
163 163
 
164
-    case 'listall':
165
-        $trans = sql(
166
-            "SELECT
164
+        case 'listall':
165
+            $trans = sql(
166
+                "SELECT
167 167
                 `sys_trans`.`id`,
168 168
                 `sys_trans`.`text`,
169 169
                 `sys_trans_text`.`text` AS `trans`
@@ -172,48 +172,48 @@  discard block
 block discarded – undo
172 172
                 ON `sys_trans`.`id`=`sys_trans_text`.`trans_id`
173 173
                 AND `sys_trans_text`.`lang`='&1'
174 174
              ORDER BY `sys_trans`.`id` DESC",
175
-            $translang
176
-        );
177
-        $tpl->assign_rs('trans', $trans);
178
-        sql_free_result($trans);
179
-        break;
175
+                $translang
176
+            );
177
+            $tpl->assign_rs('trans', $trans);
178
+            sql_free_result($trans);
179
+            break;
180 180
 
181
-    case 'remove':
182
-        if (!$access->mayTranslate($translang)) {
183
-            $tpl->error(ERROR_NO_ACCESS);
184
-        }
185
-        remove();
186
-        break;
187
-
188
-    case 'scan':
189
-        scan();
190
-        break;
191
-
192
-    case 'scanstart':
193
-        scanStart();
194
-        break;
195
-
196
-    case 'scanfile':
197
-        $filename = isset($_REQUEST['filename']) ? $_REQUEST['filename'] : '';
198
-        scanFile($filename);
199
-        exit;
200
-
201
-    case 'quicknone':
202
-        $cookie->un_set('translate_mode');
203
-        break;
204
-
205
-    case 'quicknew':
206
-        $cookie->set('translate_mode', 'new');
207
-        break;
208
-
209
-    case 'quickall':
210
-        $cookie->set('translate_mode', 'all');
211
-        break;
212
-
213
-    default:
214
-        $action = 'listnew';
215
-        $trans = sql(
216
-            "SELECT DISTINCT
181
+        case 'remove':
182
+            if (!$access->mayTranslate($translang)) {
183
+                $tpl->error(ERROR_NO_ACCESS);
184
+            }
185
+            remove();
186
+            break;
187
+
188
+        case 'scan':
189
+            scan();
190
+            break;
191
+
192
+        case 'scanstart':
193
+            scanStart();
194
+            break;
195
+
196
+        case 'scanfile':
197
+            $filename = isset($_REQUEST['filename']) ? $_REQUEST['filename'] : '';
198
+            scanFile($filename);
199
+            exit;
200
+
201
+        case 'quicknone':
202
+            $cookie->un_set('translate_mode');
203
+            break;
204
+
205
+        case 'quicknew':
206
+            $cookie->set('translate_mode', 'new');
207
+            break;
208
+
209
+        case 'quickall':
210
+            $cookie->set('translate_mode', 'all');
211
+            break;
212
+
213
+        default:
214
+            $action = 'listnew';
215
+            $trans = sql(
216
+                "SELECT DISTINCT
217 217
                 `sys_trans`.`id`,
218 218
                 `sys_trans`.`text`
219 219
              FROM `sys_trans`
@@ -224,10 +224,10 @@  discard block
 block discarded – undo
224 224
                 ON `sys_trans`.`id`=`sys_trans_ref`.`trans_id`
225 225
              WHERE ISNULL(`sys_trans_text`.`trans_id`) OR `sys_trans_text`.`text`=''
226 226
              ORDER BY `sys_trans`.`id` DESC",
227
-            $translang
228
-        );
229
-        $tpl->assign_rs('trans', $trans);
230
-        sql_free_result($trans);
227
+                $translang
228
+            );
229
+            $tpl->assign_rs('trans', $trans);
230
+            sql_free_result($trans);
231 231
 }
232 232
 
233 233
 $languages = [];
Please login to merge, or discard this patch.
htdocs/lib2/logic/logpics.class.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         global $login;
31 31
 
32 32
         $fields =
33
-          "`pics`.`uuid` AS `pic_uuid`,
33
+            "`pics`.`uuid` AS `pic_uuid`,
34 34
            `pics`.`url` AS `pic_url`,
35 35
            `pics`.`title`,
36 36
            `pics`.`date_created`,
Please login to merge, or discard this 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.