Addon knows '.$address_cnt.' Jabber addresses of '.$contact_cnt.' Friendica contacts (takes some time, usually 10 minutes, to update).
';
- $s .= '';
+ $s .= '';
$s .= ' ';
- $s .= '
';
$s .= '
';
@@ -400,9 +439,12 @@ 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;
+ if (!$activate || $dontinsertchat) return;
$a->page['htmlhead'] .= ''."\r\n";
$a->page['htmlhead'] .= ''."\r\n";
@@ -446,7 +488,8 @@ function jappixmini_script(&$a,&$s) {
dbesc($dfrn_id),
dbesc($dfrn_id)
);
- $name = $r[0]["name"];
+ if (count($r))
+ $name = $r[0]["name"];
$value = $row['v'];
$pos = strpos($value, ":");
@@ -462,11 +505,16 @@ function jappixmini_script(&$a,&$s) {
// get nickname
$r = q("SELECT `username` FROM `user` WHERE `uid`=$uid");
$nickname = json_encode($r[0]["username"]);
+ $groupchats = get_config('jappixmini','groupchats');
+ //if $groupchats has no value jappix_addon_start will produce a syntax error
+ if(empty($groupchats)){
+ $groupchats = "{}";
+ }
// add javascript to start Jappix Mini
$a->page['htmlhead'] .= "";
@@ -502,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;