]> git.mxchange.org Git - friendica.git/blobdiff - mod/contacts.php
photo album prev/next links
[friendica.git] / mod / contacts.php
index 4c627c88f91ceba6f906eb82ccdb6c74b793eea9..c2d28dc1f25e5d7363e041170724c66fb2fb5474 100644 (file)
@@ -13,7 +13,7 @@ function contacts_init(&$a) {
 
        $tpl = load_view_file('view/follow.tpl');
        $a->page['aside'] .= replace_macros($tpl,array(
-               '$label' => t('Connect/Follow [profile address]'),
+               '$label' => t('Connect/Follow'),
                '$hint' => t('Example: bob@example.com, http://example.com/barbara'),
                '$follow' => t('Follow')
        ));
@@ -124,9 +124,7 @@ function contacts_content(&$a) {
                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");
+                       proc_run('php',"include/poller.php","$contact_id");
                        goaway($a->get_baseurl() . '/contacts/' . $contact_id);
                        // NOTREACHED
                }
@@ -245,6 +243,13 @@ function contacts_content(&$a) {
                        $sparkle = '';
                }
 
+               $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'));
+
+               if($r[0]['last-update'] !== '0000-00-00 00:00:00')
+                       $last_update .= ' ' . (($r[0]['last-update'] == $r[0]['success_update']) ? t("\x28Update was successful\x29") : t("\x28Update was not successful\x29"));
+
                $o .= replace_macros($tpl,array(
                        '$header' => t('Contact Editor'),
                        '$visit' => t('Visit $name\'s profile'),
@@ -254,9 +259,7 @@ function contacts_content(&$a) {
                        '$poll_interval' => contact_poll_interval($r[0]['priority']),
                        '$lastupdtext' => t('Last updated: '),
                        '$updpub' => t('Update public posts: '),
-                       '$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')),
+                       '$last_update' => $last_update,
                        '$udnow' => t('Update now'),
                        '$profile_select' => contact_profile_assign($r[0]['profile-id'],(($r[0]['network'] !== 'dfrn') ? true : false)),
                        '$contact_id' => $r[0]['id'],
@@ -367,7 +370,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
                        ));