diff options
author | fabrixxm <fabrix.xm@gmail.com> | 2011-01-27 07:14:55 +0100 |
---|---|---|
committer | fabrixxm <fabrix.xm@gmail.com> | 2011-01-27 07:14:55 +0100 |
commit | 444d82a5328433fbe48e18b928d35218905a756c (patch) | |
tree | 84bd92072bf37eee3b54ebf7cb9ccaf408562e67 /mod | |
parent | 6558ee1e2210fb41b1f4d95f806ee441a565087d (diff) | |
parent | d2dddd995abef2d0805901b278647bef0ce50f88 (diff) | |
download | volse-hubzilla-444d82a5328433fbe48e18b928d35218905a756c.tar.gz volse-hubzilla-444d82a5328433fbe48e18b928d35218905a756c.tar.bz2 volse-hubzilla-444d82a5328433fbe48e18b928d35218905a756c.zip |
Merge branch 'friendika-master'
Diffstat (limited to 'mod')
-rw-r--r-- | mod/contacts.php | 12 | ||||
-rw-r--r-- | mod/dfrn_notify.php | 24 | ||||
-rw-r--r-- | mod/follow.php | 11 | ||||
-rw-r--r-- | mod/network.php | 6 | ||||
-rw-r--r-- | mod/profile.php | 7 |
5 files changed, 40 insertions, 20 deletions
diff --git a/mod/contacts.php b/mod/contacts.php index 7236a200d..177ca9973 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -53,9 +53,9 @@ function contacts_post(&$a) { return; } } +logger('contact_edit ' . print_r($_POST,true)); - - $priority = intval($_POST['priority']); + $priority = intval($_POST['poll']); if($priority == (-1)) if($priority > 5 || $priority < 0) @@ -177,6 +177,12 @@ function contacts_content(&$a) { } } + if($orig_record[0]['network'] === 'dfrn') { + require_once('include/items.php'); + dfrn_deliver($a->user,$orig_record[0],'placeholder', 1); + } + + contact_remove($contact_id); notice( t('Contact has been removed.') . EOL ); goaway($a->get_baseurl() . '/contacts'); @@ -246,7 +252,7 @@ function contacts_content(&$a) { '$contact_id' => $r[0]['id'], '$block_text' => (($r[0]['blocked']) ? t('Unblock this contact') : t('Block this contact') ), '$ignore_text' => (($r[0]['readonly']) ? t('Unignore this contact') : t('Ignore this contact') ), - '$insecure' => (($r[0]['network'] === 'dfrn') ? '' : load_view_file('view/insecure_net.tpl')), + '$insecure' => (($r[0]['network'] === 'stat') ? load_view_file('view/insecure_net.tpl') : ''), '$info' => $r[0]['info'], '$blocked' => (($r[0]['blocked']) ? '<div id="block-message">' . t('Currently blocked') . '</div>' : ''), '$ignored' => (($r[0]['readonly']) ? '<div id="ignore-message">' . t('Currently ignored') . '</div>' : ''), diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 6c3ae022b..f581702d8 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -75,6 +75,19 @@ function dfrn_notify_post(&$a) { logger('dfrn_notify: received notify from ' . $importer['name'] . ' for ' . $importer['username']); logger('dfrn_notify: data: ' . $data, LOGGER_DATA); + if($dissolve == 1) { + + /** + * Relationship is dissolved permanently + */ + + require_once('include/Contact.php'); + contact_remove($importer['id']); + logger('relationship dissolved : ' . $importer['name'] . ' dissolved ' . $importer['username']); + xml_status(0); + + } + if(strlen($key)) { $rawkey = hex2bin(trim($key)); logger('rino: md5 raw key: ' . md5($rawkey)); @@ -94,17 +107,6 @@ function dfrn_notify_post(&$a) { - if($dissolve == 1) { - - /** - * Relationship is dissolved permanently - */ - - contact_remove($importer['id']); - logger('relationship dissolved : ' . $importer['name'] . ' dissolved ' . $importer['username']); - xml_status(0); - - } if($importer['readonly']) { // We aren't receiving stuff from this person. But we will quietly ignore them diff --git a/mod/follow.php b/mod/follow.php index bad2e74f9..b4e50fa45 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -48,7 +48,8 @@ function follow_post(&$a) { } } - $network = 'stat'; + $network = 'stat'; + $priority = 0; if($hcard) { $vcard = scrape_vcard($hcard); @@ -110,7 +111,8 @@ function follow_post(&$a) { if((! $vcard['photo']) && strlen($email)) $vcard['photo'] = gravatar_img($email); $network = 'feed'; - } + $priority = 2; + } } logger('follow: poll=' . $poll . ' notify=' . $notify . ' profile=' . $profile . ' vcard=' . print_r($vcard,true)); @@ -150,7 +152,7 @@ function follow_post(&$a) { } else { // create contact record - $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `notify`, `poll`, `name`, `nick`, `photo`, `network`, `rel`, + $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `notify`, `poll`, `name`, `nick`, `photo`, `network`, `rel`, `priority`, `blocked`, `readonly`, `pending` ) VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, 0, 0, 0 ) ", intval(local_user()), @@ -162,7 +164,8 @@ function follow_post(&$a) { dbesc($vcard['nick']), dbesc($vcard['photo']), dbesc($network), - intval(REL_FAN) + intval(REL_FAN), + intval($priority) ); } diff --git a/mod/network.php b/mod/network.php index 02e458d8f..50d7134c1 100644 --- a/mod/network.php +++ b/mod/network.php @@ -79,6 +79,9 @@ function network_content(&$a, $update = 0) { $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false); + $jotplugins = ""; + call_hooks('jot_tool', $jotplugins); + $o .= replace_macros($tpl,array( '$return_path' => $a->cmd, '$baseurl' => $a->get_baseurl(), @@ -87,7 +90,8 @@ function network_content(&$a, $update = 0) { '$lockstate' => $lockstate, '$acl' => populate_acl((($group) ? $group_acl : $a->user), $celeb), '$bang' => (($group) ? '!' : ''), - '$profile_uid' => $_SESSION['uid'] + '$profile_uid' => $_SESSION['uid'], + '$jotplugins' => $jotplugins )); diff --git a/mod/profile.php b/mod/profile.php index 505edf5ce..c84b493c5 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -134,6 +134,10 @@ function profile_content(&$a, $update = 0) { $lockstate = 'lock'; else $lockstate = 'unlock'; + + $jotplugins = ""; + call_hooks('jot_tool', $jotplugins); + $o .= replace_macros($tpl,array( '$baseurl' => $a->get_baseurl(), '$defloc' => (($is_owner) ? $a->user['default-location'] : ''), @@ -142,7 +146,8 @@ function profile_content(&$a, $update = 0) { '$lockstate' => $lockstate, '$bang' => '', '$acl' => (($is_owner) ? populate_acl($a->user, $celeb) : ''), - '$profile_uid' => $a->profile['profile_uid'] + '$profile_uid' => $a->profile['profile_uid'], + '$jotplugins' => $jotplugins )); } |