X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Feditpost.php;h=149e432e15384f140003db3739dfe3d7243a4633;hb=74d813042fa96dd90955cc5c0da8cf4716485cb8;hp=eccd498d154b1dcd6c2762a0d8bdb03ee92b6d92;hpb=e1f366164509fc8217f9d0cf21d7475f6d71b73a;p=friendica.git
diff --git a/mod/editpost.php b/mod/editpost.php
index eccd498d15..149e432e15 100644
--- a/mod/editpost.php
+++ b/mod/editpost.php
@@ -1,19 +1,22 @@
argc > 1) ? intval($a->argv[1]) : 0);
- if(! $post_id) {
+ if (! $post_id) {
notice( t('Item not found') . EOL);
return;
}
@@ -23,27 +26,18 @@ function editpost_content(&$a) {
intval(local_user())
);
- if(! count($itm)) {
+ if (! dbm::is_result($itm)) {
notice( t('Item not found') . EOL);
return;
}
-/* $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;
-
-
$o .= replace_macros(get_markup_template("section_title.tpl"),array(
'$title' => t('Edit post')
));
$tpl = get_markup_template('jot-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
- '$baseurl' => App::get_baseurl(),
- '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
+ '$baseurl' => System::baseUrl(),
'$ispublic' => ' ', // t('Visible to everybody'),
'$geotag' => $geotag,
'$nickname' => $a->user['nickname']
@@ -51,8 +45,7 @@ function editpost_content(&$a) {
$tpl = get_markup_template('jot-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
- '$baseurl' => App::get_baseurl(),
- '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
+ '$baseurl' => System::baseUrl(),
'$ispublic' => ' ', // t('Visible to everybody'),
'$geotag' => $geotag,
'$nickname' => $a->user['nickname']
@@ -126,7 +119,7 @@ function editpost_content(&$a) {
'$ptyp' => $itm[0]['type'],
'$content' => undo_post_tagging($itm[0]['body']),
'$post_id' => $post_id,
- '$baseurl' => App::get_baseurl(),
+ '$baseurl' => System::baseUrl(),
'$defloc' => $a->user['default-location'],
'$visitor' => 'none',
'$pvisit' => 'none',