New dba functions
This commit is contained in:
		
					parent
					
						
							
								7b6664f0f7
							
						
					
				
			
			
				commit
				
					
						d810b21f87
					
				
			
		
					 12 changed files with 157 additions and 167 deletions
				
			
		| 
						 | 
				
			
			@ -680,11 +680,10 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
 | 
			
		|||
				$hashtags = array();
 | 
			
		||||
				$mentions = array();
 | 
			
		||||
 | 
			
		||||
				$taglist = q("SELECT `type`, `term`, `url` FROM `term` WHERE `otype` = %d AND `oid` = %d AND `type` IN (%d, %d) ORDER BY `tid`",
 | 
			
		||||
				$taglist = dba::p("SELECT `type`, `term`, `url` FROM `term` WHERE `otype` = ? AND `oid` = ? AND `type` IN (?, ?) ORDER BY `tid`",
 | 
			
		||||
						intval(TERM_OBJ_POST), intval($item['id']), intval(TERM_HASHTAG), intval(TERM_MENTION));
 | 
			
		||||
 | 
			
		||||
				foreach ($taglist as $tag) {
 | 
			
		||||
 | 
			
		||||
				while ($tag = dba::fetch($taglist)) {
 | 
			
		||||
					if ($tag["url"] == "") {
 | 
			
		||||
						$tag["url"] = $searchpath . strtolower($tag["term"]);
 | 
			
		||||
					}
 | 
			
		||||
| 
						 | 
				
			
			@ -698,6 +697,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
 | 
			
		|||
					}
 | 
			
		||||
					$tags[] = $prefix."<a href=\"" . $tag["url"] . "\" target=\"_blank\">" . $tag["term"] . "</a>";
 | 
			
		||||
				}
 | 
			
		||||
				dba::close($taglist);
 | 
			
		||||
 | 
			
		||||
				$sp = false;
 | 
			
		||||
				$profile_link = best_link_url($item,$sp);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue