mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
added spaces (coding convention)
Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
951006dd10
commit
c2d8738285
11 changed files with 336 additions and 330 deletions
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
if(class_exists('BaseObject'))
|
||||
if (class_exists('BaseObject')) {
|
||||
return;
|
||||
}
|
||||
|
||||
require_once('boot.php');
|
||||
|
||||
|
@ -18,8 +19,9 @@ class BaseObject {
|
|||
* Same as get_app from boot.php
|
||||
*/
|
||||
public function get_app() {
|
||||
if(self::$app)
|
||||
if (self::$app) {
|
||||
return self::$app;
|
||||
}
|
||||
|
||||
self::$app = get_app();
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
if(class_exists('Conversation'))
|
||||
if (class_exists('Conversation')) {
|
||||
return;
|
||||
}
|
||||
|
||||
require_once('boot.php');
|
||||
require_once('object/BaseObject.php');
|
||||
|
@ -28,7 +29,7 @@ class Conversation extends BaseObject {
|
|||
* Set the mode we'll be displayed on
|
||||
*/
|
||||
private function set_mode($mode) {
|
||||
if($this->get_mode() == $mode)
|
||||
if ($this->get_mode() == $mode)
|
||||
return;
|
||||
|
||||
$a = $this->get_app();
|
||||
|
@ -92,11 +93,11 @@ class Conversation extends BaseObject {
|
|||
*/
|
||||
public function add_thread($item) {
|
||||
$item_id = $item->get_id();
|
||||
if(!$item_id) {
|
||||
if (!$item_id) {
|
||||
logger('[ERROR] Conversation::add_thread : Item has no ID!!', LOGGER_DEBUG);
|
||||
return false;
|
||||
}
|
||||
if($this->get_thread($item->get_id())) {
|
||||
if ($this->get_thread($item->get_id())) {
|
||||
logger('[WARN] Conversation::add_thread : Thread already exists ('. $item->get_id() .').', LOGGER_DEBUG);
|
||||
return false;
|
||||
}
|
||||
|
@ -104,11 +105,11 @@ class Conversation extends BaseObject {
|
|||
/*
|
||||
* Only add will be displayed
|
||||
*/
|
||||
if($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) {
|
||||
if ($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) {
|
||||
logger('[WARN] Conversation::add_thread : Thread is a mail ('. $item->get_id() .').', LOGGER_DEBUG);
|
||||
return false;
|
||||
}
|
||||
if($item->get_data_value('verb') === ACTIVITY_LIKE || $item->get_data_value('verb') === ACTIVITY_DISLIKE) {
|
||||
if ($item->get_data_value('verb') === ACTIVITY_LIKE || $item->get_data_value('verb') === ACTIVITY_DISLIKE) {
|
||||
logger('[WARN] Conversation::add_thread : Thread is a (dis)like ('. $item->get_id() .').', LOGGER_DEBUG);
|
||||
return false;
|
||||
}
|
||||
|
@ -132,13 +133,14 @@ class Conversation extends BaseObject {
|
|||
|
||||
$i = 0;
|
||||
|
||||
foreach($this->threads as $item) {
|
||||
if($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid'))
|
||||
foreach ($this->threads as $item) {
|
||||
if ($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$item_data = $item->get_template_data($conv_responses);
|
||||
|
||||
if(!$item_data) {
|
||||
if (!$item_data) {
|
||||
logger('[ERROR] Conversation::get_template_data : Failed to get item template data ('. $item->get_id() .').', LOGGER_DEBUG);
|
||||
return false;
|
||||
}
|
||||
|
@ -156,9 +158,10 @@ class Conversation extends BaseObject {
|
|||
* _ false on failure
|
||||
*/
|
||||
private function get_thread($id) {
|
||||
foreach($this->threads as $item) {
|
||||
if($item->get_id() == $id)
|
||||
foreach ($this->threads as $item) {
|
||||
if ($item->get_id() == $id) {
|
||||
return $item;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
if(class_exists('Item'))
|
||||
if (class_exists('Item')) {
|
||||
return;
|
||||
}
|
||||
|
||||
require_once('object/BaseObject.php');
|
||||
require_once('include/text.php');
|
||||
|
@ -181,19 +182,19 @@ class Item extends BaseObject {
|
|||
$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate));
|
||||
|
||||
$searchpath = "search?tag=";
|
||||
$tags=array();
|
||||
$tags = array();
|
||||
$hashtags = array();
|
||||
$mentions = array();
|
||||
|
||||
|
||||
/*foreach(explode(',',$item['tag']) as $tag){
|
||||
/*foreach (explode(',',$item['tag']) as $tag){
|
||||
$tag = trim($tag);
|
||||
if ($tag!="") {
|
||||
$t = bbcode($tag);
|
||||
$tags[] = $t;
|
||||
if($t[0] == '#')
|
||||
if ($t[0] == '#')
|
||||
$hashtags[] = $t;
|
||||
elseif($t[0] == '@')
|
||||
elseif ($t[0] == '@')
|
||||
$mentions[] = $t;
|
||||
}
|
||||
}*/
|
||||
|
@ -258,7 +259,7 @@ class Item extends BaseObject {
|
|||
}
|
||||
|
||||
$tagger = '';
|
||||
if(feature_enabled($conv->get_profile_owner(),'commtag')) {
|
||||
if (feature_enabled($conv->get_profile_owner(),'commtag')) {
|
||||
$tagger = array(
|
||||
'add' => t("add tag"),
|
||||
'class' => "",
|
||||
|
@ -503,7 +504,7 @@ class Item extends BaseObject {
|
|||
*/
|
||||
protected function set_parent($item) {
|
||||
$parent = $this->get_parent();
|
||||
if($parent) {
|
||||
if ($parent) {
|
||||
$parent->remove_child($this);
|
||||
}
|
||||
$this->parent = $item;
|
||||
|
@ -734,9 +735,9 @@ class Item extends BaseObject {
|
|||
$conv = $this->get_conversation();
|
||||
$this->wall_to_wall = false;
|
||||
|
||||
if($this->is_toplevel()) {
|
||||
if($conv->get_mode() !== 'profile') {
|
||||
if($this->get_data_value('wall') AND !$this->get_data_value('self')) {
|
||||
if ($this->is_toplevel()) {
|
||||
if ($conv->get_mode() !== 'profile') {
|
||||
if ($this->get_data_value('wall') AND !$this->get_data_value('self')) {
|
||||
// On the network page, I am the owner. On the display page it will be the profile owner.
|
||||
// This will have been stored in $a->page_contact by our calling page.
|
||||
// Put this person as the wall owner of the wall-to-wall notice.
|
||||
|
@ -745,7 +746,7 @@ class Item extends BaseObject {
|
|||
$this->owner_photo = $a->page_contact['thumb'];
|
||||
$this->owner_name = $a->page_contact['name'];
|
||||
$this->wall_to_wall = true;
|
||||
} elseif($this->get_data_value('owner-link')) {
|
||||
} elseif ($this->get_data_value('owner-link')) {
|
||||
|
||||
$owner_linkmatch = (($this->get_data_value('owner-link')) && link_compare($this->get_data_value('owner-link'),$this->get_data_value('author-link')));
|
||||
$alias_linkmatch = (($this->get_data_value('alias')) && link_compare($this->get_data_value('alias'),$this->get_data_value('author-link')));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue