more ssl_policy cleanup, allow manual feed update per contact when hub is whacked, log feed parse errors
parent
a598f17e6d
commit
3eefe8b500
10
boot.php
10
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;
|
||||
|
|
|
@ -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 = '';
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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') ),
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1209,6 +1209,10 @@ input#dfrn-url {
|
|||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#contact-edit-update-now {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
#contact-edit-photo-wrapper {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue