]> git.mxchange.org Git - friendica.git/blobdiff - mod/editpost.php
multi-user, do not cache open mbox
[friendica.git] / mod / editpost.php
index 862ba937f08467648b81af3a8e8bf5478f9f3d2f..7a102119ba8a49caaa8ab4ace07bfd0a320ada10 100644 (file)
@@ -51,6 +51,28 @@ function editpost_content(&$a) {
 
        $jotplugins = '';
        $jotnets = '';
+
+       $mail_enabled = false;
+       $pubmail_enabled = false;
+
+
+       $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1",
+               intval(local_user())
+       );
+       if(count($r)) {
+               $mail_enabled = true;
+               if(intval($r[0]['pubmail']))
+                       $pubmail_enabled = true;
+       }
+
+       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>';
+       }
+                                       
+
+
        call_hooks('jot_tool', $jotplugins);
        call_hooks('jot_networks', $jotnets);