Replace dba::select(limit => 1) by dba::selectOne
- Convert array declarations to new style
This commit is contained in:
		
					parent
					
						
							
								a2d3cee006
							
						
					
				
			
			
				commit
				
					
						da60893590
					
				
			
		
					 51 changed files with 206 additions and 219 deletions
				
			
		| 
						 | 
				
			
			@ -106,7 +106,7 @@ function notification($params)
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	if ($params['type'] == NOTIFY_COMMENT) {
 | 
			
		||||
		$p = dba::select('thread', ['ignored'], ['iid' => $parent_id], ['limit' => 1]);
 | 
			
		||||
		$p = dba::selectOne('thread', ['ignored'], ['iid' => $parent_id]);
 | 
			
		||||
		if (DBM::is_result($p) && $p["ignored"]) {
 | 
			
		||||
			logger("Thread ".$parent_id." will be ignored", LOGGER_DEBUG);
 | 
			
		||||
			return;
 | 
			
		||||
| 
						 | 
				
			
			@ -131,7 +131,7 @@ function notification($params)
 | 
			
		|||
		$p = null;
 | 
			
		||||
 | 
			
		||||
		if ($params['otype'] === 'item' && $parent_id) {
 | 
			
		||||
			$p = dba::select('item', [], ['id' => $parent_id], ['limit' => 1]);
 | 
			
		||||
			$p = dba::selectOne('item', [], ['id' => $parent_id]);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		$item_post_type = item_post_type($p);
 | 
			
		||||
| 
						 | 
				
			
			@ -672,12 +672,12 @@ function check_item_notification($itemid, $uid, $defaulttype = "") {
 | 
			
		|||
	$profiles = $notification_data["profiles"];
 | 
			
		||||
 | 
			
		||||
	$fields = ['notify-flags', 'language', 'username', 'email', 'nickname'];
 | 
			
		||||
	$user = dba::select('user', $fields, ['uid' => $uid], ['limit' => 1]);
 | 
			
		||||
	$user = dba::selectOne('user', $fields, ['uid' => $uid]);
 | 
			
		||||
	if (!DBM::is_result($user)) {
 | 
			
		||||
		return false;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	$owner = dba::select('contact', ['url'], ['self' => true, 'uid' => $uid], ['limit' => 1]);
 | 
			
		||||
	$owner = dba::selectOne('contact', ['url'], ['self' => true, 'uid' => $uid]);
 | 
			
		||||
	if (!DBM::is_result($owner)) {
 | 
			
		||||
		return false;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue