]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
multi-user, do not cache open mbox
[friendica.git] / mod / network.php
index 35b6a299b209da14002e974bc1cbe155adcbe1a8..746206031c679ab08e51e50f1c21398aea834a53 100644 (file)
@@ -21,7 +21,7 @@ function network_init(&$a) {
 
        $a->page['aside'] .= '</div>';
 
-       $a->page['aside'] .= group_side('network','network');
+       $a->page['aside'] .= group_side('network','network',true);
 }
 
 
@@ -94,6 +94,28 @@ function network_content(&$a, $update = 0) {
 
                $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);