]> git.mxchange.org Git - friendica-addons.git/blobdiff - jappixmini/jappixmini.php
RU translation of cal addon THX pztrn
[friendica-addons.git] / jappixmini / jappixmini.php
index 73062aae2050caa9d0a6d027083955e38883b2cf..44b69a4e5843bcd43a2b26ef17a8dd2822474159 100644 (file)
@@ -315,7 +315,7 @@ function jappixmini_settings(&$a, &$s) {
     $s .= ' <input id="jappixmini-server" type="text" name="jappixmini-server" value="'.$server.'" />';
     $s .= '<br />';
 
-    if (defaultbosh == "") {
+    if ($defaultbosh == "") {
        $s .= '<label for="jappixmini-bosh">'.t('Jabber BOSH host').'</label>';
        $s .= ' <input id="jappixmini-bosh" type="text" name="jappixmini-bosh" value="'.$bosh.'" />';
        $s .= '<br />';
@@ -439,6 +439,9 @@ function jappixmini_script(&$a,&$s) {
 
     if(! local_user()) return;
 
+    if ($_GET["mode"] == "minimal")
+       return;
+
     $activate = get_pconfig(local_user(),'jappixmini','activate');
     $dontinsertchat = get_pconfig(local_user(), 'jappixmini','dontinsertchat');
     if (!$activate or $dontinsertchat) return;
@@ -547,7 +550,8 @@ function jappixmini_cron(&$a, $d) {
                $uid = $row["uid"];
 
                // for each user, go through list of contacts
-               $contacts = q("SELECT * FROM `contact` WHERE `uid`=%d AND ((LENGTH(`dfrn-id`) AND LENGTH(`pubkey`)) OR (LENGTH(`issued-id`) AND LENGTH(`prvkey`)))", intval($uid));
+               $contacts = q("SELECT * FROM `contact` WHERE `uid`=%d AND ((LENGTH(`dfrn-id`) AND LENGTH(`pubkey`)) OR (LENGTH(`issued-id`) AND LENGTH(`prvkey`))) AND `network` = '%s'",
+                       intval($uid), dbesc(NETWORK_DFRN));
                foreach ($contacts as $contact_row) {
                        $request = $contact_row["request"];
                        if (!$request) continue;