Browse Source

more ssl_policy cleanup, allow manual feed update per contact when hub is whacked, log feed parse errors

pull/1/head
Friendika 10 years ago
parent
commit
3eefe8b500
10 changed files with 42 additions and 12 deletions
  1. +6
    -4
      boot.php
  2. +4
    -0
      include/items.php
  3. +3
    -0
      include/poller.php
  4. +10
    -0
      mod/contacts.php
  5. +3
    -2
      view/de/contact_edit.tpl
  6. +3
    -2
      view/en/contact_edit.tpl
  7. +3
    -2
      view/fr/contact_edit.tpl
  8. +3
    -2
      view/it/contact_edit.tpl
  9. +3
    -0
      view/theme/default/style.css
  10. +4
    -0
      view/theme/duepuntozero/style.css

+ 6
- 4
boot.php View File

@ -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;


+ 4
- 0
include/items.php View File

@ -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 = '';


+ 3
- 0
include/poller.php View File

@ -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;


+ 10
- 0
mod/contacts.php View File

@ -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
- 2
view/de/contact_edit.tpl View File

@ -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
- 2
view/en/contact_edit.tpl View File

@ -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
- 2
view/fr/contact_edit.tpl View File

@ -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
- 2
view/it/contact_edit.tpl View File

@ -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
- 0
view/theme/default/style.css View File

@ -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;


+ 4
- 0
view/theme/duepuntozero/style.css View File

@ -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…
Cancel
Save