added curely braces + TODO for maybe avoiding multi-lined if() blocks as it confuses #3254
Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
		
					parent
					
						
							
								f94a10bf00
							
						
					
				
			
			
				commit
				
					
						e4ad359f5a
					
				
			
		
					 2 changed files with 21 additions and 12 deletions
				
			
		|  | @ -2159,7 +2159,7 @@ class dfrn { | ||||||
| 					$title = $attributes->textContent; | 					$title = $attributes->textContent; | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 			if (($rel != "") AND ($href != "")) | 			if (($rel != "") AND ($href != "")) { | ||||||
| 				switch ($rel) { | 				switch ($rel) { | ||||||
| 					case "alternate": | 					case "alternate": | ||||||
| 						$item["plink"] = $href; | 						$item["plink"] = $href; | ||||||
|  | @ -2175,6 +2175,7 @@ class dfrn { | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	/** | 	/** | ||||||
| 	 * @brief Processes the entry elements which contain the items and comments | 	 * @brief Processes the entry elements which contain the items and comments | ||||||
|  |  | ||||||
|  | @ -411,45 +411,53 @@ class ostatus { | ||||||
| 						if ($attributes->name == "title") | 						if ($attributes->name == "title") | ||||||
| 							$title = $attributes->textContent; | 							$title = $attributes->textContent; | ||||||
| 					} | 					} | ||||||
| 					if (($rel != "") AND ($href != "")) | 					if (($rel != "") AND ($href != "")) { | ||||||
| 						switch ($rel) { | 						switch ($rel) { | ||||||
| 							case "alternate": | 							case "alternate": | ||||||
| 								$item["plink"] = $href; | 								$item["plink"] = $href; | ||||||
|  | 								/// @TODO These multi-lines can confuse, let's avoid them
 | ||||||
| 								if (($item["object-type"] == ACTIVITY_OBJ_QUESTION) OR | 								if (($item["object-type"] == ACTIVITY_OBJ_QUESTION) OR | ||||||
| 									($item["object-type"] == ACTIVITY_OBJ_EVENT)) | 									($item["object-type"] == ACTIVITY_OBJ_EVENT)) { | ||||||
| 									$item["body"] .= add_page_info($href); | 									$item["body"] .= add_page_info($href); | ||||||
|  | 								} | ||||||
| 								break; | 								break; | ||||||
| 							case "ostatus:conversation": | 							case "ostatus:conversation": | ||||||
| 								$conversation = $href; | 								$conversation = $href; | ||||||
| 								break; | 								break; | ||||||
| 							case "enclosure": | 							case "enclosure": | ||||||
| 								$enclosure = $href; | 								$enclosure = $href; | ||||||
| 								if(strlen($item["attach"])) | 								if (strlen($item["attach"])) { | ||||||
| 									$item["attach"] .= ','; | 									$item["attach"] .= ','; | ||||||
|  | 								} | ||||||
| 
 | 
 | ||||||
| 								$item["attach"] .= '[attach]href="' . $href . '" length="' . $length . '" type="' . $type . '" title="' . $title . '"[/attach]'; | 								$item["attach"] .= '[attach]href="' . $href . '" length="' . $length . '" type="' . $type . '" title="' . $title . '"[/attach]'; | ||||||
| 								break; | 								break; | ||||||
| 							case "related": | 							case "related": | ||||||
| 								if ($item["object-type"] != ACTIVITY_OBJ_BOOKMARK) { | 								if ($item["object-type"] != ACTIVITY_OBJ_BOOKMARK) { | ||||||
| 									if (!isset($item["parent-uri"])) | 									if (!isset($item["parent-uri"])) { | ||||||
| 										$item["parent-uri"] = $href; | 										$item["parent-uri"] = $href; | ||||||
|  | 									} | ||||||
| 
 | 
 | ||||||
| 									if ($related == "") | 									if ($related == "") { | ||||||
| 										$related = $href; | 										$related = $href; | ||||||
| 								} else | 									} | ||||||
|  | 								} else { | ||||||
| 									$item["body"] .= add_page_info($href); | 									$item["body"] .= add_page_info($href); | ||||||
|  | 								} | ||||||
| 								break; | 								break; | ||||||
| 							case "self": | 							case "self": | ||||||
| 								$self = $href; | 								$self = $href; | ||||||
| 								break; | 								break; | ||||||
| 							case "mentioned": | 							case "mentioned": | ||||||
| 								// Notification check
 | 								// Notification check
 | ||||||
| 								if ($importer["nurl"] == normalise_link($href)) | 								if ($importer["nurl"] == normalise_link($href)) { | ||||||
| 									$mention = true; | 									$mention = true; | ||||||
|  | 								} | ||||||
| 								break; | 								break; | ||||||
| 						} | 						} | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
|  | 			} | ||||||
| 
 | 
 | ||||||
| 			$local_id = ""; | 			$local_id = ""; | ||||||
| 			$repeat_of = ""; | 			$repeat_of = ""; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue