]> git.mxchange.org Git - friendica.git/blobdiff - mod/contacts.php
Merge branch 'friendika-master'
[friendica.git] / mod / contacts.php
index 83f73140bdf603203a8e5aaafb315c840a3a1fb1..61d9ce3986f49056147d353e9c088ab050444a4c 100644 (file)
@@ -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']) ? '<div id="block-message">' . t('Currently blocked') . '</div>' : ''),
                        '$ignored' => (($r[0]['readonly']) ? '<div id="ignore-message">' . t('Currently ignored') . '</div>' : ''),
@@ -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
                        ));