X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcontacts.php;h=61d9ce3986f49056147d353e9c088ab050444a4c;hb=97b608db38edac6e4989c7343e9de8f32f46f263;hp=83f73140bdf603203a8e5aaafb315c840a3a1fb1;hpb=05350082fab123a1ba01340d3fef95f4edf6fb5b;p=friendica.git diff --git a/mod/contacts.php b/mod/contacts.php index 83f73140bd..61d9ce3986 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) @@ -121,6 +121,15 @@ function contacts_content(&$a) { return; // NOTREACHED } + if($cmd === 'update') { + + // pull feed and consume it, which should subscribe to the hub. + + $php_path = ((x($a->config,'php_path') && strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); + proc_run($php_path,"include/poller.php","$contact_id"); + goaway($a->get_baseurl() . '/contacts/' . $contact_id); + // NOTREACHED + } if($cmd === 'block') { $blocked = (($orig_record[0]['blocked']) ? 0 : 1); @@ -248,11 +257,12 @@ function contacts_content(&$a) { '$last_update' => (($r[0]['last-update'] == '0000-00-00 00:00:00') ? t('Never') : datetime_convert('UTC',date_default_timezone_get(),$r[0]['last-update'],'D, j M Y, g:i A')), + '$udnow' => t('Update now'), '$profile_select' => contact_profile_assign($r[0]['profile-id'],(($r[0]['network'] !== 'dfrn') ? true : false)), '$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']) ? '
' . t('Currently blocked') . '
' : ''), '$ignored' => (($r[0]['readonly']) ? '
' . t('Currently ignored') . '
' : ''), @@ -357,7 +367,7 @@ function contacts_content(&$a) { '$alt_text' => $alt_text, '$dir_icon' => $dir_icon, '$thumb' => $rr['thumb'], - '$name' => $rr['name'], + '$name' => substr($rr['name'],0,20), '$sparkle' => $sparkle, '$url' => $url ));