]> git.mxchange.org Git - friendica.git/blobdiff - mod/editpost.php
Better content detection for posts to Twitter
[friendica.git] / mod / editpost.php
index 5dc5ec50869c8ad40e48728a43201175e2a428a2..149e432e15384f140003db3739dfe3d7243a4633 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+use Friendica\App;
+use Friendica\Core\System;
+
 require_once('include/acl_selectors.php');
 
 function editpost_content(App $a) {
@@ -34,7 +37,7 @@ function editpost_content(App $a) {
 
        $tpl = get_markup_template('jot-header.tpl');
        $a->page['htmlhead'] .= replace_macros($tpl, array(
-               '$baseurl' => App::get_baseurl(),
+               '$baseurl' => System::baseUrl(),
                '$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
                '$geotag' => $geotag,
                '$nickname' => $a->user['nickname']
@@ -42,7 +45,7 @@ function editpost_content(App $a) {
 
        $tpl = get_markup_template('jot-end.tpl');
        $a->page['end'] .= replace_macros($tpl, array(
-               '$baseurl' => App::get_baseurl(),
+               '$baseurl' => System::baseUrl(),
                '$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
                '$geotag' => $geotag,
                '$nickname' => $a->user['nickname']
@@ -51,7 +54,7 @@ function editpost_content(App $a) {
 
        $tpl = get_markup_template("jot.tpl");
 
-       if (($group) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid'])))))
+       if(($group) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid'])))))
                $lockstate = 'lock';
        else
                $lockstate = 'unlock';
@@ -64,13 +67,13 @@ function editpost_content(App $a) {
        $mail_enabled = false;
        $pubmail_enabled = false;
 
-       if (! $mail_disabled) {
+       if(! $mail_disabled) {
                $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1",
                        intval(local_user())
                );
                if (dbm::is_result($r)) {
                        $mail_enabled = true;
-                       if (intval($r[0]['pubmail']))
+                       if(intval($r[0]['pubmail']))
                                $pubmail_enabled = true;
                }
        }
@@ -78,7 +81,7 @@ function editpost_content(App $a) {
        // I don't think there's any need for the $jotnets when editing the post,
        // and including them makes it difficult for the JS-free theme, so let's
        // disable them
-/*     if ($mail_enabled) {
+/*     if($mail_enabled) {
        $selected = (($pubmail_enabled) ? ' checked="checked" ' : '');
                $jotnets .= '<div class="profile-jot-net"><input type="checkbox" name="pubmail_enable"' . $selected . ' value="1" /> '
                . t("Post to Email") . '</div>';
@@ -116,7 +119,7 @@ function editpost_content(App $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',