Completed
Pull Request — development (#406)
by Mirko
19:49 queued 12:13
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/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.
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/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.
htdocs/lib2/logic/logtypes.inc.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -91,28 +91,28 @@  discard block
 block discarded – undo
91 91
 
92 92
     $allowed_logtypes = array();
93 93
     if ($owner || $admin_report || $admin_locked) {
94
-        $allowed_logtypes[] = 3;   // note
94
+        $allowed_logtypes[] = 3; // note
95 95
     }
96 96
     if (($owner && $statuslogs) || $admin_report) {
97 97
         if ($cache_status != 5 && (($cache_status != 4 && $cache_status != 7) || $admin_report)) {
98
-            $allowed_logtypes[] = 10;  // ready for search
99
-            $allowed_logtypes[] = 11;  // temporarily not available
100
-            $allowed_logtypes[] = 9;   // archived
101
-            $allowed_logtypes[] = 13;  // locked
98
+            $allowed_logtypes[] = 10; // ready for search
99
+            $allowed_logtypes[] = 11; // temporarily not available
100
+            $allowed_logtypes[] = 9; // archived
101
+            $allowed_logtypes[] = 13; // locked
102 102
         }
103 103
         if ($admin_report || $old_logtype == 14) {
104 104
             $allowed_logtypes[] = 14;
105 105
         }  // locked, invisible
106 106
     }
107 107
     if ($cache_type == 6) { // event
108
-        $allowed_logtypes[] = 8;   // will attend
109
-        $allowed_logtypes[] = 7;   // attended
108
+        $allowed_logtypes[] = 8; // will attend
109
+        $allowed_logtypes[] = 7; // attended
110 110
     } else {
111
-        $allowed_logtypes[] = 1;   // found
112
-        $allowed_logtypes[] = 2;   // not found
111
+        $allowed_logtypes[] = 1; // found
112
+        $allowed_logtypes[] = 2; // not found
113 113
     }
114 114
     if (!($owner || $admin_report || $admin_locked)) {
115
-        $allowed_logtypes[] = 3;   // note
115
+        $allowed_logtypes[] = 3; // note
116 116
     }
117 117
 
118 118
     // always allow to keep the existing logtype when the log is edited by an admin
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             } elseif (!$opt['logic']['admin']['team_comments_only_for_reports'] || admin_has_open_report($cache_id)) {
152 152
                 // allowed for report processing by admins
153 153
                 $allowed = true;
154
-            } elseif ($login->hasAdminPriv(ADMIN_USER) && in_array($rCache['status'], [6,7])) {
154
+            } elseif ($login->hasAdminPriv(ADMIN_USER) && in_array($rCache['status'], [6, 7])) {
155 155
                 // allowed for admins && locked caches, see http://forum.opencaching.de/index.php?topic=3102.msg39517#msg39517
156 156
                 $allowed = true;
157 157
             } else {
Please login to merge, or discard this patch.
htdocs/lib2/logic/cacheIcon.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
     public static function get($user_id, $cache_id, $cache_status, $cache_userid, $iconname)
12 12
     {
13
-        $iconname = mb_eregi_replace("cache/", "", $iconname);   // for old cache_type table contents
13
+        $iconname = mb_eregi_replace("cache/", "", $iconname); // for old cache_type table contents
14 14
         $iconext = "." . mb_eregi_replace("^.*\.", "", $iconname);
15 15
         $iconname = mb_eregi_replace("\..*", "", $iconname);
16 16
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
                 break;
31 31
             case 5:
32 32
                 $iconname .= "-s";
33
-                break;      // fix for RT ticket #3403
33
+                break; // fix for RT ticket #3403
34 34
             case 6:
35 35
                 $iconname .= "-a";
36 36
                 break;
Please login to merge, or discard this patch.