Completed
Push — 16.1 ( 7ccc73...046888 )
by Nathan
64:46 queued 51:15
created
api/src/Db/Exception.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,10 @@
 block discarded – undo
29 29
 	 */
30 30
 	function __construct($msg=null,$code=100)
31 31
 	{
32
-		if (is_null($msg)) $msg = lang('Database error!');
32
+		if (is_null($msg))
33
+		{
34
+			$msg = lang('Database error!');
35
+		}
33 36
 
34 37
 		parent::__construct($msg,$code);
35 38
 	}
Please login to merge, or discard this patch.
api/src/Db/Deprecated.php 1 patch
Braces   +17 added lines, -5 removed lines patch added patch discarded remove patch
@@ -121,10 +121,13 @@  discard block
 block discarded – undo
121 121
 		{
122 122
 			throw new Exception('next_record called with no query pending.');
123 123
 		}
124
-		if ($this->Row)	// first row is already fetched
124
+		if ($this->Row)
125
+		{
126
+			// first row is already fetched
125 127
 		{
126 128
 			$this->Query_ID->MoveNext();
127 129
 		}
130
+		}
128 131
 		++$this->Row;
129 132
 
130 133
 		$this->Record = $this->Query_ID->fields;
@@ -133,12 +136,15 @@  discard block
 block discarded – undo
133 136
 		{
134 137
 			return False;
135 138
 		}
136
-		if ($this->capabilities[self::CAPABILITY_NAME_CASE] == 'upper')	// maxdb, oracle, ...
139
+		if ($this->capabilities[self::CAPABILITY_NAME_CASE] == 'upper')
140
+		{
141
+			// maxdb, oracle, ...
137 142
 		{
138 143
 			switch($fetch_mode)
139 144
 			{
140 145
 				case self::FETCH_ASSOC:
141 146
 					$this->Record = array_change_key_case($this->Record);
147
+		}
142 148
 					break;
143 149
 				case self::FETCH_NUM:
144 150
 					$this->Record = array_values($this->Record);
@@ -199,7 +205,8 @@  discard block
 block discarded – undo
199 205
 	* @return bool True if sucessful, False if fails
200 206
 	*/
201 207
 	function unlock()
202
-	{}
208
+	{
209
+}
203 210
 
204 211
 	/**
205 212
 	* Number of rows in current result set
@@ -289,7 +296,10 @@  discard block
 block discarded – undo
289 296
 		{
290 297
 			if (!is_numeric($column))
291 298
 			{
292
-				if ($strip) $column = str_replace($strip,'',$column);
299
+				if ($strip)
300
+				{
301
+					$column = str_replace($strip,'',$column);
302
+				}
293 303
 
294 304
 				$result[$column] = $value;
295 305
 			}
@@ -301,4 +311,6 @@  discard block
 block discarded – undo
301 311
 /**
302 312
  * @deprecated use EGroupware\Api\Db\CallbackIterator
303 313
  */
304
-class egw_db_callback_iterator extends Api\Db\CallbackIterator {}
314
+class egw_db_callback_iterator extends Api\Db\CallbackIterator
315
+{
316
+}
Please login to merge, or discard this patch.
api/src/Egw/Base.php 1 patch
Braces   +13 added lines, -3 removed lines patch added patch discarded remove patch
@@ -95,7 +95,11 @@  discard block
 block discarded – undo
95 95
 	{
96 96
 		//error_log(__METHOD__."($name)".function_backtrace());
97 97
 
98
-		if ($name == 'js') $name = 'framework';	// javascript class is integrated now into framework
98
+		if ($name == 'js')
99
+		{
100
+			$name = 'framework';
101
+		}
102
+		// javascript class is integrated now into framework
99 103
 
100 104
 		if (isset($this->$name))
101 105
 		{
@@ -104,7 +108,10 @@  discard block
 block discarded – undo
104 108
 
105 109
 		if (!isset(self::$sub_objects[$name]) && !class_exists('EGroupware\\Api\\'.ucfirst($name)) && !class_exists($name))
106 110
 		{
107
-			if ($name != 'ADOdb') error_log(__METHOD__.": There's NO $name object! ".function_backtrace());
111
+			if ($name != 'ADOdb')
112
+			{
113
+				error_log(__METHOD__.": There's NO $name object! ".function_backtrace());
114
+			}
108 115
 			return null;
109 116
 		}
110 117
 		switch($name)
@@ -121,7 +128,10 @@  discard block
 block discarded – undo
121 128
 				return $this->ldap = Api\Ldap::factory(false);
122 129
 			default:
123 130
 				$class = isset(self::$sub_objects[$name]) ? self::$sub_objects[$name] : 'EGroupware\\Api\\'.ucfirst($name);
124
-				if (!class_exists($class)) $class = $name;
131
+				if (!class_exists($class))
132
+				{
133
+					$class = $name;
134
+				}
125 135
 				break;
126 136
 		}
127 137
 		return $this->$name = new $class();
Please login to merge, or discard this patch.
api/src/Contacts/Tracking.php 1 patch
Braces   +12 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,7 +116,10 @@  discard block
 block discarded – undo
116 116
 				if ($data['is_contactform'])
117 117
 				{
118 118
 					$copy = preg_split('/, ?/',$data['email_contactform']);
119
-					if  ($data['email_copytoreceiver']) $copy[] = $data['email'];
119
+					if  ($data['email_copytoreceiver'])
120
+					{
121
+						$copy[] = $data['email'];
122
+					}
120 123
 					return $copy;
121 124
 				}
122 125
 				break;
@@ -150,7 +153,10 @@  discard block
 block discarded – undo
150 153
 		{
151 154
 			$changed_fields = self::changed_fields($data,$old);
152 155
 		}
153
-		if (!$changed_fields) return 0;
156
+		if (!$changed_fields)
157
+		{
158
+			return 0;
159
+		}
154 160
 
155 161
 		foreach(array('adr_one_countryname' => 'adr_one_countrycode', 'adr_two_countryname' => 'adr_two_countrycode') as $name => $code)
156 162
 		{
@@ -231,7 +237,10 @@  discard block
 block discarded – undo
231 237
 
232 238
 		foreach($this->contacts->contact_fields as $name => $label)
233 239
 		{
234
-			if (!$data[$name] && $name != 'owner') continue;
240
+			if (!$data[$name] && $name != 'owner')
241
+			{
242
+				continue;
243
+			}
235 244
 
236 245
 			switch($name)
237 246
 			{
Please login to merge, or discard this patch.
api/src/Contacts/Ads.php 1 patch
Braces   +13 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,11 @@  discard block
 block discarded – undo
84 84
 	 */
85 85
 	function __construct(array $ldap_config=null, $ds=null)
86 86
 	{
87
-		if (false) parent::__construct ();	// quiten IDE warning, we are explicitly NOT calling parrent constructor!
87
+		if (false)
88
+		{
89
+			parent::__construct ();
90
+		}
91
+		// quiten IDE warning, we are explicitly NOT calling parrent constructor!
88 92
 
89 93
 		$this->accountName 		= $GLOBALS['egw_info']['user']['account_lid'];
90 94
 
@@ -202,10 +206,16 @@  discard block
 block discarded – undo
202 206
 		$contact['id'] = $contact['uid'] = $this->accounts_ads->objectguid2str($data['objectguid']);
203 207
 
204 208
 		// ignore system accounts
205
-		if ($contact['account_id'] < Api\Accounts\Ads::MIN_ACCOUNT_ID) return false;
209
+		if ($contact['account_id'] < Api\Accounts\Ads::MIN_ACCOUNT_ID)
210
+		{
211
+			return false;
212
+		}
206 213
 
207 214
 		// ignore deactivated or expired accounts
208
-		if (!$this->accounts_ads->user_active($data)) return false;
215
+		if (!$this->accounts_ads->user_active($data))
216
+		{
217
+			return false;
218
+		}
209 219
 
210 220
 		$this->_inetorgperson2egw($contact, $data, 'displayname');
211 221
 	}
Please login to merge, or discard this patch.
api/src/Contacts/Merge.php 1 patch
Braces   +51 added lines, -13 removed lines patch added patch discarded remove patch
@@ -84,7 +84,10 @@  discard block
 block discarded – undo
84 84
 	 */
85 85
 	protected function calendar_replacements($id,$last_event_too=false)
86 86
 	{
87
-		if (!class_exists('calendar_boupdate')) return array();
87
+		if (!class_exists('calendar_boupdate'))
88
+		{
89
+			return array();
90
+		}
88 91
 
89 92
 		$calendar = new calendar_boupdate();
90 93
 
@@ -118,11 +121,17 @@  discard block
 block discarded – undo
118 121
 		foreach($events as $key => $event)
119 122
 		{
120 123
 			// Use -1 for previous key
121
-			if($key < 0) $n = $key;
124
+			if($key < 0)
125
+			{
126
+				$n = $key;
127
+			}
122 128
 
123 129
 			foreach($calendar->event2array($event) as $name => $data)
124 130
 			{
125
-				if (substr($name,-4) == 'date') $name = substr($name,0,-4);
131
+				if (substr($name,-4) == 'date')
132
+				{
133
+					$name = substr($name,0,-4);
134
+				}
126 135
 				$replacements['$$calendar/'.$n.'/'.$name.'$$'] = is_array($data['data']) ? implode(', ',$data['data']) : $data['data'];
127 136
 			}
128 137
 			foreach(array('start','end') as $what)
@@ -134,7 +143,10 @@  discard block
 block discarded – undo
134 143
 				) as $name => $format)
135 144
 				{
136 145
 					$value = $event[$what] ? date($format,$event[$what]) : '';
137
-					if ($format == 'l') $value = lang($value);
146
+					if ($format == 'l')
147
+					{
148
+						$value = lang($value);
149
+					}
138 150
 					$replacements['$$calendar/'.$n.'/'.$what.$name.'$$'] = $value;
139 151
 				}
140 152
 			}
@@ -145,7 +157,8 @@  discard block
 block discarded – undo
145 157
 		}
146 158
 
147 159
 		// Need to set some keys if there is no previous event
148
-		if($last_event_too && count($events['-1']) == 0) {
160
+		if($last_event_too && count($events['-1']) == 0)
161
+		{
149 162
 			$replacements['$$calendar/-1/start$$'] = '';
150 163
 			$replacements['$$calendar/-1/end$$'] = '';
151 164
 			$replacements['$$calendar/-1/owner$$'] = '';
@@ -170,22 +183,38 @@  discard block
 block discarded – undo
170 183
 		$n = 0;
171 184
 		foreach($this->contacts->contact_fields as $name => $label)
172 185
 		{
173
-			if (in_array($name,array('tid','label','geo'))) continue;	// dont show them, as they are not used in the UI atm.
186
+			if (in_array($name,array('tid','label','geo')))
187
+			{
188
+				continue;
189
+			}
190
+			// dont show them, as they are not used in the UI atm.
174 191
 
175
-			if (in_array($name,array('email','org_name','tel_work','url')) && $n&1)		// main values, which should be in the first column
192
+			if (in_array($name,array('email','org_name','tel_work','url')) && $n&1)
193
+			{
194
+				// main values, which should be in the first column
176 195
 			{
177 196
 				echo "</tr>\n";
197
+			}
178 198
 				$n++;
179 199
 			}
180
-			if (!($n&1)) echo '<tr>';
200
+			if (!($n&1))
201
+			{
202
+				echo '<tr>';
203
+			}
181 204
 			echo '<td>{{'.$name.'}}</td><td>'.$label.'</td>';
182 205
 			if($name == 'cat_id')
183 206
 			{
184
-				if ($n&1) echo "</tr>\n";
207
+				if ($n&1)
208
+				{
209
+					echo "</tr>\n";
210
+				}
185 211
 				echo '<td>{{categories}}</td><td>'.lang('Category path').'</td>';
186 212
 				$n++;
187 213
 			}
188
-			if ($n&1) echo "</tr>\n";
214
+			if ($n&1)
215
+			{
216
+				echo "</tr>\n";
217
+			}
189 218
 			$n++;
190 219
 		}
191 220
 
@@ -242,14 +271,23 @@  discard block
 block discarded – undo
242 271
 			'owner'    => lang('Owner'),
243 272
 		) as $name => $label)
244 273
 		{
245
-			if (in_array($name,array('start','end')) && $n&1)		// main values, which should be in the first column
274
+			if (in_array($name,array('start','end')) && $n&1)
275
+			{
276
+				// main values, which should be in the first column
246 277
 			{
247 278
 				echo "</tr>\n";
279
+			}
248 280
 				$n++;
249 281
 			}
250
-			if (!($n&1)) echo '<tr>';
282
+			if (!($n&1))
283
+			{
284
+				echo '<tr>';
285
+			}
251 286
 			echo '<td>{{calendar/#/'.$name.'}}</td><td>'.$label.'</td>';
252
-			if ($n&1) echo "</tr>\n";
287
+			if ($n&1)
288
+			{
289
+				echo "</tr>\n";
290
+			}
253 291
 			$n++;
254 292
 		}
255 293
 		echo "</table>\n";
Please login to merge, or discard this patch.
api/src/Egw.php 1 patch
Braces   +37 added lines, -10 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 			'config_app'  => 'phpgwapi',
119 119
 			'config_name' => array('system_charset','install_id','temp_dir'),
120 120
 		),__LINE__,__FILE__) as $row)
121
-		{
121
+			{
122 122
 			$GLOBALS['egw_info']['server'][$row['config_name']] = $row['config_value'];
123 123
 		}
124 124
 		if ($GLOBALS['egw_info']['server']['system_charset'] && $GLOBALS['egw_info']['server']['system_charset'] != 'utf-8')
@@ -131,11 +131,14 @@  discard block
 block discarded – undo
131 131
 		// if no server timezone set, use date_default_timezone_get() to determine it once
132 132
 		// it fills to log with deprecated warnings under 5.3 otherwise
133 133
 		if (empty($GLOBALS['egw_info']['server']['server_timezone']) ||
134
-			$GLOBALS['egw_info']['server']['server_timezone'] == 'System/Localtime')	// treat invalid tz like empty!
134
+			$GLOBALS['egw_info']['server']['server_timezone'] == 'System/Localtime')
135
+		{
136
+			// treat invalid tz like empty!
135 137
 		{
136 138
 			try
137 139
 			{
138 140
 				$tz = new \DateTimeZone(date_default_timezone_get());
141
+		}
139 142
 				Config::save_value('server_timezone',$GLOBALS['egw_info']['server']['server_timezone'] = $tz->getName(),'phpgwapi');
140 143
 				error_log(__METHOD__."() stored server_timezone=".$GLOBALS['egw_info']['server']['server_timezone']);
141 144
 			}
@@ -301,14 +304,20 @@  discard block
 block discarded – undo
301 304
 			exit;
302 305
 		}
303 306
 		// check if we have a session, if not try to automatic create one
304
-		if ($this->session->verify()) return true;
307
+		if ($this->session->verify())
308
+		{
309
+			return true;
310
+		}
305 311
 
306 312
 		$account = null;
307 313
 		if (($account_callback = $GLOBALS['egw_info']['flags']['autocreate_session_callback']) && is_callable($account_callback) &&
308
-			($sessionid = call_user_func_array($account_callback,array(&$account))) === true)	// $account_call_back returns true, false or a session-id
314
+			($sessionid = call_user_func_array($account_callback,array(&$account))) === true)
315
+		{
316
+			// $account_call_back returns true, false or a session-id
309 317
 		{
310 318
 			$sessionid = $this->session->create($account);
311 319
 		}
320
+		}
312 321
 		if (!$sessionid)
313 322
 		{
314 323
 			//echo "<p>account_callback='$account_callback', account=".print_r($account,true).", sessionid=$sessionid</p>\n"; exit;
@@ -337,9 +346,15 @@  discard block
 block discarded – undo
337 346
 			{
338 347
 				$redirect = '/login.php?';
339 348
 				// only add "your session could not be verified", if a sessionid is given (cookie or on url)
340
-				if (Session::get_sessionid()) $redirect .= 'cd=10&';
349
+				if (Session::get_sessionid())
350
+				{
351
+					$redirect .= 'cd=10&';
352
+				}
353
+			}
354
+			if ($relpath)
355
+			{
356
+				$redirect .= 'phpgw_forward='.urlencode($relpath.(!empty($query) ? '?'.$query : ''));
341 357
 			}
342
-			if ($relpath) $redirect .= 'phpgw_forward='.urlencode($relpath.(!empty($query) ? '?'.$query : ''));
343 358
 			self::redirect_link($redirect);
344 359
 		}
345 360
 	}
@@ -357,7 +372,9 @@  discard block
 block discarded – undo
357 372
 	{
358 373
 		$this->currentapp = $GLOBALS['egw_info']['flags']['currentapp'];	// some apps change it later
359 374
 
360
-		if (!in_array($GLOBALS['egw_info']['flags']['currentapp'], array('api','about')))	// give everyone implicit api rights
375
+		if (!in_array($GLOBALS['egw_info']['flags']['currentapp'], array('api','about')))
376
+		{
377
+			// give everyone implicit api rights
361 378
 		{
362 379
 			// This will need to use ACL in the future
363 380
 			if (!$GLOBALS['egw_info']['user']['apps'][$currentapp = $GLOBALS['egw_info']['flags']['currentapp']] ||
@@ -370,6 +387,7 @@  discard block
 block discarded – undo
370 387
 					if (($sessionid = Session::get_sessionid(true)))
371 388
 					{
372 389
 						$GLOBALS['egw']->session->destroy($sessionid);
390
+		}
373 391
 					}
374 392
 					throw new Exception\Redirect(self::link('/logout.php'));
375 393
 				}
@@ -555,7 +573,10 @@  discard block
 block discarded – undo
555 573
 				try {
556 574
 					//error_log(__METHOD__."() running ".array2string($data));
557 575
 					$callback = array_shift($data);
558
-					if (!is_array($callback) || strpos($callback[1], 'session') === false) continue;
576
+					if (!is_array($callback) || strpos($callback[1], 'session') === false)
577
+					{
578
+						continue;
579
+					}
559 580
 					call_user_func_array($callback, $data);
560 581
 				}
561 582
 				catch (\Exception $ex) {
@@ -565,7 +586,10 @@  discard block
 block discarded – undo
565 586
 			}
566 587
 			// now we can close the session
567 588
 			// without closing the session fastcgi_finish_request() will NOT send output to user
568
-			if (isset($GLOBALS['egw']->session) && is_object($GLOBALS['egw']->session)) $GLOBALS['egw']->session->commit_session();
589
+			if (isset($GLOBALS['egw']->session) && is_object($GLOBALS['egw']->session))
590
+			{
591
+				$GLOBALS['egw']->session->commit_session();
592
+			}
569 593
 
570 594
 			// flush all output to user
571 595
 			/* does NOT work on Apache :-(
@@ -593,9 +617,12 @@  discard block
 block discarded – undo
593 617
 				}
594 618
 			}
595 619
 			// call the asyncservice check_run function if it is not explicitly set to cron-only
596
-			if (!$GLOBALS['egw_info']['server']['asyncservice'])	// is default
620
+			if (!$GLOBALS['egw_info']['server']['asyncservice'])
621
+			{
622
+				// is default
597 623
 			{
598 624
 				$async = new Asyncservice();
625
+			}
599 626
 				$async->check_run('fallback');
600 627
 			}
601 628
 			$this->db->disconnect();
Please login to merge, or discard this patch.
api/src/Vfs/Dav/Directory.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,10 @@
 block discarded – undo
69 69
 		$path = $this->vfs_path . '/' . $name;
70 70
 		$vfs_path = $this->vfs_path . '/' . Vfs::encodePathComponent($name);
71 71
 
72
-		if (!Vfs::file_exists($vfs_path)) throw new DAV\Exception\NotFound('File with name ' . $path . ' could not be located');
72
+		if (!Vfs::file_exists($vfs_path))
73
+		{
74
+			throw new DAV\Exception\NotFound('File with name ' . $path . ' could not be located');
75
+		}
73 76
 
74 77
 		if (Vfs::is_dir($vfs_path))
75 78
 		{
Please login to merge, or discard this patch.
api/src/WebDAV/Tools/_parse_lockinfo.php 1 patch
Braces   +45 added lines, -20 removed lines patch added patch discarded remove patch
@@ -99,7 +99,8 @@  discard block
 block discarded – undo
99 99
 
100 100
         // open stream
101 101
         $f_in = fopen($path, "r");
102
-        if (!$f_in) {
102
+        if (!$f_in)
103
+        {
103 104
             $this->success = false;
104 105
             return;
105 106
         }
@@ -119,16 +120,19 @@  discard block
 block discarded – undo
119 120
                               XML_OPTION_CASE_FOLDING, false);
120 121
 
121 122
         // parse input
122
-        while ($this->success && !feof($f_in)) {
123
+        while ($this->success && !feof($f_in))
124
+        {
123 125
             $line = fgets($f_in);
124
-            if (is_string($line)) {
126
+            if (is_string($line))
127
+            {
125 128
                 $had_input = true;
126 129
                 $this->success &= xml_parse($xml_parser, $line, false);
127 130
             }
128 131
         }
129 132
 
130 133
         // finish parsing
131
-        if ($had_input) {
134
+        if ($had_input)
135
+        {
132 136
             $this->success &= xml_parse($xml_parser, "", true);
133 137
         }
134 138
 
@@ -156,29 +160,40 @@  discard block
 block discarded – undo
156 160
     function _startElement($parser, $name, $attrs)
157 161
     {
158 162
         // namespace handling
159
-        if (strstr($name, " ")) {
163
+        if (strstr($name, " "))
164
+        {
160 165
             list($ns, $tag) = explode(" ", $name);
161
-        } else {
166
+        }
167
+        else
168
+        {
162 169
             $ns  = "";
163 170
             $tag = $name;
164 171
         }
165 172
 
166 173
 
167
-        if ($this->collect_owner) {
174
+        if ($this->collect_owner)
175
+        {
168 176
             // everything within the <owner> tag needs to be collected
169 177
             $ns_short = "";
170 178
             $ns_attr  = "";
171
-            if ($ns) {
172
-                if ($ns == "DAV:") {
179
+            if ($ns)
180
+            {
181
+                if ($ns == "DAV:")
182
+                {
173 183
                     $ns_short = "D:";
174
-                } else {
184
+                }
185
+                else
186
+                {
175 187
                     $ns_attr = " xmlns='$ns'";
176 188
                 }
177 189
             }
178 190
             $this->owner .= "<$ns_short$tag$ns_attr>";
179
-        } else if ($ns == "DAV:") {
191
+        }
192
+        else if ($ns == "DAV:")
193
+        {
180 194
             // parse only the essential tags
181
-            switch ($tag) {
195
+            switch ($tag)
196
+            {
182 197
             case "write":
183 198
                 $this->locktype = $tag;
184 199
                 break;
@@ -204,7 +219,8 @@  discard block
 block discarded – undo
204 219
     function _data($parser, $data)
205 220
     {
206 221
         // only the <owner> tag has data content
207
-        if ($this->collect_owner) {
222
+        if ($this->collect_owner)
223
+        {
208 224
             $this->owner .= $data;
209 225
         }
210 226
     }
@@ -220,26 +236,35 @@  discard block
 block discarded – undo
220 236
     function _endElement($parser, $name)
221 237
     {
222 238
         // namespace handling
223
-        if (strstr($name, " ")) {
239
+        if (strstr($name, " "))
240
+        {
224 241
             list($ns, $tag) = explode(" ", $name);
225
-        } else {
242
+        }
243
+        else
244
+        {
226 245
             $ns  = "";
227 246
             $tag = $name;
228 247
         }
229 248
 
230 249
         // <owner> finished?
231
-        if (($ns == "DAV:") && ($tag == "owner")) {
250
+        if (($ns == "DAV:") && ($tag == "owner"))
251
+        {
232 252
             $this->collect_owner = false;
233 253
         }
234 254
 
235 255
         // within <owner> we have to collect everything
236
-        if ($this->collect_owner) {
256
+        if ($this->collect_owner)
257
+        {
237 258
             $ns_short = "";
238 259
             $ns_attr  = "";
239
-            if ($ns) {
240
-                if ($ns == "DAV:") {
260
+            if ($ns)
261
+            {
262
+                if ($ns == "DAV:")
263
+                {
241 264
                     $ns_short = "D:";
242
-                } else {
265
+                }
266
+                else
267
+                {
243 268
                     $ns_attr = " xmlns='$ns'";
244 269
                 }
245 270
             }
Please login to merge, or discard this patch.