aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot.php10
-rw-r--r--include/items.php4
-rw-r--r--include/poller.php3
-rw-r--r--mod/contacts.php10
-rw-r--r--view/de/contact_edit.tpl5
-rw-r--r--view/en/contact_edit.tpl5
-rw-r--r--view/fr/contact_edit.tpl5
-rw-r--r--view/it/contact_edit.tpl5
-rw-r--r--view/theme/default/style.css3
-rw-r--r--view/theme/duepuntozero/style.css4
10 files changed, 42 insertions, 12 deletions
diff --git a/boot.php b/boot.php
index 6b4fa080e..6cbb4f07c 100644
--- a/boot.php
+++ b/boot.php
@@ -283,10 +283,12 @@ class App {
$scheme = $this->scheme;
- if(($ssl) || ($this->config['ssl_policy'] == SSL_POLICY_FULL))
- $scheme = 'https';
- if(($this->config['ssl_policy'] == SSL_POLICY_SELFSIGN) && (local_user() || x($_POST,'auth-params')))
- $scheme = 'https';
+ if(x($this->config,'ssl_policy')) {
+ if(($ssl) || ($this->config['ssl_policy'] == SSL_POLICY_FULL))
+ $scheme = 'https';
+ if(($this->config['ssl_policy'] == SSL_POLICY_SELFSIGN) && (local_user() || x($_POST,'auth-params')))
+ $scheme = 'https';
+ }
$this->baseurl = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' );
return $this->baseurl;
diff --git a/include/items.php b/include/items.php
index e238280fc..a5991d663 100644
--- a/include/items.php
+++ b/include/items.php
@@ -903,6 +903,10 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0) {
$feed->enable_order_by_date(false);
$feed->init();
+ if($feed->error())
+ logger('consume_feed: Error parsing XML: ' . $feed->error());
+
+
// Check at the feed level for updated contact name and/or photo
$name_updated = '';
diff --git a/include/poller.php b/include/poller.php
index 0dbc6f583..4567a5cfc 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -58,6 +58,9 @@ function poller_run($argv, $argc){
foreach($contacts as $contact) {
+ if($manual_id)
+ $contact['last-update'] = '0000-00-00 00:00:00';
+
if($contact['priority'] || $contact['subhub']) {
$hub_update = true;
diff --git a/mod/contacts.php b/mod/contacts.php
index 177ca9973..4c627c88f 100644
--- a/mod/contacts.php
+++ b/mod/contacts.php
@@ -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,6 +257,7 @@ 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') ),
diff --git a/view/de/contact_edit.tpl b/view/de/contact_edit.tpl
index fcd3f2d66..0b32bdd66 100644
--- a/view/de/contact_edit.tpl
+++ b/view/de/contact_edit.tpl
@@ -3,6 +3,8 @@
<div id="contact-edit-banner-name">$name</div>
+<form action="contacts/$contact_id" method="post" >
+<input type="hidden" name="contact_id" value="$contact_id">
<div id="contact-edit-wrapper" >
@@ -24,13 +26,12 @@
</div>
<div id="contact-edit-nav-end"></div>
-<form action="contacts/$contact_id" method="post" >
-<input type="hidden" name="contact_id" value="$contact_id">
<div id="contact-edit-poll-wrapper">
<div id="contact-edit-last-update-text">$lastupdtext<span id="contact-edit-last-updated">$last_update</span</div>
<div id="contact-edit-poll-text">$updpub</div>
$poll_interval
+ <div id="contact-edit-update-now"><a href="contacts/$contact_id/update">$udnow</a></div>
</div>
</div>
<div id="contact-edit-end" ></div>
diff --git a/view/en/contact_edit.tpl b/view/en/contact_edit.tpl
index ea546b784..9aca60188 100644
--- a/view/en/contact_edit.tpl
+++ b/view/en/contact_edit.tpl
@@ -3,6 +3,8 @@
<div id="contact-edit-banner-name">$name</div>
+<form action="contacts/$contact_id" method="post" >
+<input type="hidden" name="contact_id" value="$contact_id">
<div id="contact-edit-wrapper" >
@@ -24,13 +26,12 @@
</div>
<div id="contact-edit-nav-end"></div>
-<form action="contacts/$contact_id" method="post" >
-<input type="hidden" name="contact_id" value="$contact_id">
<div id="contact-edit-poll-wrapper">
<div id="contact-edit-last-update-text">$lastupdtext<span id="contact-edit-last-updated">$last_update</span</div>
<div id="contact-edit-poll-text">$updpub</div>
$poll_interval
+ <div id="contact-edit-update-now"><a href="contacts/$contact_id/update">$udnow</a></div>
</div>
</div>
<div id="contact-edit-end" ></div>
diff --git a/view/fr/contact_edit.tpl b/view/fr/contact_edit.tpl
index c7d2d5975..9f36ddcc4 100644
--- a/view/fr/contact_edit.tpl
+++ b/view/fr/contact_edit.tpl
@@ -3,6 +3,8 @@
<div id="contact-edit-banner-name">$name</div>
+<form action="contacts/$contact_id" method="post" >
+<input type="hidden" name="contact_id" value="$contact_id">
<div id="contact-edit-wrapper" >
@@ -24,14 +26,13 @@
</div>
<div id="contact-edit-nav-end"></div>
-<form action="contacts/$contact_id" method="post" >
-<input type="hidden" name="contact_id" value="$contact_id">
<div id="contact-edit-poll-wrapper">
<div id="contact-edit-last-update-text">$lastupdtext<span id="contact-edit-last-updated">$last_update</span</div>
<div id="contact-edit-poll-text">$updpub</div>
$poll_interval
+ <div id="contact-edit-update-now"><a href="contacts/$contact_id/update">$udnow</a></div>
</div>
</div>
<div id="contact-edit-end" ></div>
diff --git a/view/it/contact_edit.tpl b/view/it/contact_edit.tpl
index d4217ba8c..ac0f13a54 100644
--- a/view/it/contact_edit.tpl
+++ b/view/it/contact_edit.tpl
@@ -3,6 +3,8 @@
<div id="contact-edit-banner-name">$name</div>
+<form action="contacts/$contact_id" method="post" >
+<input type="hidden" name="contact_id" value="$contact_id">
<div id="contact-edit-wrapper" >
@@ -24,13 +26,12 @@
</div>
<div id="contact-edit-nav-end"></div>
-<form action="contacts/$contact_id" method="post" >
-<input type="hidden" name="contact_id" value="$contact_id">
<div id="contact-edit-poll-wrapper">
<div id="contact-edit-last-update-text">$lastupdtext<span id="contact-edit-last-updated">$last_update</span</div>
<div id="contact-edit-poll-text">$updpub</div>
$poll_interval
+ <div id="contact-edit-update-now"><a href="contacts/$contact_id/update">$udnow</a></div>
</div>
</div>
<div id="contact-edit-end" ></div>
diff --git a/view/theme/default/style.css b/view/theme/default/style.css
index 3ef63e265..ae45a4244 100644
--- a/view/theme/default/style.css
+++ b/view/theme/default/style.css
@@ -1333,6 +1333,9 @@ input#dfrn-url {
#contact-edit-poll-text {
margin-bottom: 10px;
}
+#contact-edit-update-now {
+ margin-top: 15px;
+}
#contact-edit-photo-wrapper {
margin-bottom: 20px;
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css
index 59a5bf88a..d6a1744a6 100644
--- a/view/theme/duepuntozero/style.css
+++ b/view/theme/duepuntozero/style.css
@@ -1209,6 +1209,10 @@ input#dfrn-url {
margin-bottom: 10px;
}
+#contact-edit-update-now {
+ margin-top: 15px;
+}
+
#contact-edit-photo-wrapper {
margin-bottom: 20px;
}