X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fconversation.php;h=a1d086cb9d7c41f772b1d4e2797532d63c523866;hb=07aefe61bfeab5046f74a7f7940963011c81baf5;hp=567bf83e1bfdb2e7b0d2d0a38af11fc2b37f298e;hpb=cc16369b6f45eff2c0faa91bda96ae619f9f80e4;p=friendica.git diff --git a/include/conversation.php b/include/conversation.php index 567bf83e1b..a1d086cb9d 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -78,7 +78,7 @@ function item_redir_and_replace_images($body, $images, $cid) { $newbody .= $origbody; $cnt = 0; - foreach($images as $image) { + foreach ($images as $image) { // We're depending on the property of 'foreach' (specified on the PHP website) that // it loops over the array starting from the first element and going sequentially // to the last element @@ -324,11 +324,13 @@ function localize_item(&$item){ // add sparkle links to appropriate permalinks $x = stristr($item['plink'],'/display/'); - if($x) { + if ($x) { $sparkle = false; $y = best_link_url($item,$sparkle,true); - if(strstr($y,'/redir/')) + + if (strstr($y,'/redir/')) { $item['plink'] = $y . '?f=&url=' . $item['plink']; + } } @@ -464,7 +466,7 @@ function item_condition() { */ if(!function_exists('conversation')) { -function conversation(&$a, $items, $mode, $update, $preview = false) { +function conversation(App $a, $items, $mode, $update, $preview = false) { require_once('include/bbcode.php'); require_once('include/Contact.php'); @@ -864,7 +866,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { } $o = replace_macros($page_template, array( - '$baseurl' => $a->get_baseurl($ssl_state), + '$baseurl' => App::get_baseurl($ssl_state), '$return_path' => $a->query_string, '$live_update' => $live_update_div, '$remove' => t('remove'), @@ -1168,23 +1170,14 @@ function format_like($cnt,$arr,$type,$id) { function status_editor($a,$x, $notes_cid = 0, $popup=false) { - $o = ''; $geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : ''); -/* $plaintext = false; - if( local_user() && (intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled(local_user(),'richtext')) ) - $plaintext = true;*/ - $plaintext = true; - if( local_user() && feature_enabled(local_user(),'richtext') ) - $plaintext = false; - $tpl = get_markup_template('jot-header.tpl'); $a->page['htmlhead'] .= replace_macros($tpl, array( '$newpost' => 'true', - '$baseurl' => $a->get_baseurl(true), - '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), + '$baseurl' => App::get_baseurl(true), '$geotag' => $geotag, '$nickname' => $x['nickname'], '$ispublic' => t('Visible to everybody'), @@ -1197,12 +1190,10 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { '$delitems' => t('Delete item(s)?') )); - $tpl = get_markup_template('jot-end.tpl'); $a->page['end'] .= replace_macros($tpl, array( '$newpost' => 'true', - '$baseurl' => $a->get_baseurl(true), - '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), + '$baseurl' => App::get_baseurl(true), '$geotag' => $geotag, '$nickname' => $x['nickname'], '$ispublic' => t('Visible to everybody'), @@ -1267,7 +1258,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { '$ptyp' => (($notes_cid) ? 'note' : 'wall'), '$content' => $x['content'], '$post_id' => $x['post_id'], - '$baseurl' => $a->get_baseurl(true), + '$baseurl' => App::get_baseurl(true), '$defloc' => $x['default_location'], '$visitor' => $x['visitor'], '$pvisit' => (($notes_cid) ? 'none' : $x['visitor']),