aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/deliver.php18
-rw-r--r--include/js_strings.php1
-rw-r--r--include/network.php7
-rw-r--r--include/photos.php2
4 files changed, 27 insertions, 1 deletions
diff --git a/include/deliver.php b/include/deliver.php
index 47d8562df..498440271 100644
--- a/include/deliver.php
+++ b/include/deliver.php
@@ -20,6 +20,24 @@ function deliver_run($argv, $argc) {
dbesc($argv[$x])
);
if($r) {
+ $h = parse_url($r[0]['outq_posturl']);
+ if($h) {
+ $base = $h['scheme'] . '://' . $h['host'] . (($h['port']) ? ':' . $h['port'] : '');
+ if($base !== z_root()) {
+ $y = q("select site_update from site where site_url = '%s' ",
+ dbesc($base)
+ );
+ if($y && $y[0]['site_update'] < datetime_convert('UTC','UTC','now - 1 month')) {
+ q("update outq set outq_priority = %d where outq_hash = '%s'",
+ intval($r[0]['outq_priority'] + 10),
+ dbesc($r[0]['outq_hash'])
+ );
+ logger('immediate delivery deferred for site ' . $base);
+ continue;
+ }
+ }
+ }
+
if($r[0]['outq_driver'] === 'post') {
$result = z_post_url($r[0]['outq_posturl'],$r[0]['outq_msg']);
if($result['success'] && $result['return_code'] < 300) {
diff --git a/include/js_strings.php b/include/js_strings.php
index 56ffa9536..84c1d70fb 100644
--- a/include/js_strings.php
+++ b/include/js_strings.php
@@ -20,6 +20,7 @@ function js_strings() {
'$rating_val' => t('Rating'),
'$rating_text' => t('Describe (optional)'),
'$submit' => t('Submit'),
+ '$linkurl' => t('Please enter a link URL'),
'$t01' => ((t('timeago.prefixAgo') != 'timeago.prefixAgo') ? t('timeago.prefixAgo') : ''),
'$t02' => ((t('timeago.prefixFromNow') != 'timeago.prefixFromNow') ? t('timeago.prefixFromNow') : ''),
diff --git a/include/network.php b/include/network.php
index db32396e4..5912ad79d 100644
--- a/include/network.php
+++ b/include/network.php
@@ -19,6 +19,7 @@ function get_capath() {
* 'timeout' => int seconds, default system config value or 60 seconds
* 'http_auth' => username:password
* 'novalidate' => do not validate SSL certs, default is to validate using our CA list
+ * 'nobody' => only return the header
*
* @returns array
* 'return_code' => HTTP return code or 0 if timeout or failure
@@ -51,6 +52,9 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
if(x($opts,'headers'))
@curl_setopt($ch, CURLOPT_HTTPHEADER, $opts['headers']);
+ if(x($opts,'nobody'))
+ @curl_setopt($ch, CURLOPT_NOBODY, $opts['nobody']);
+
if(x($opts,'timeout') && intval($opts['timeout'])) {
@curl_setopt($ch, CURLOPT_TIMEOUT, $opts['timeout']);
}
@@ -182,6 +186,9 @@ function z_post_url($url,$params, $redirects = 0, $opts = array()) {
if(x($opts,'headers'))
@curl_setopt($ch, CURLOPT_HTTPHEADER, $opts['headers']);
+ if(x($opts,'nobody'))
+ @curl_setopt($ch, CURLOPT_NOBODY, $opts['nobody']);
+
if(x($opts,'timeout') && intval($opts['timeout'])) {
@curl_setopt($ch, CURLOPT_TIMEOUT, $opts['timeout']);
}
diff --git a/include/photos.php b/include/photos.php
index 794ff7748..cd753ffea 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -31,7 +31,7 @@ function photo_upload($channel, $observer, $args) {
if($newalbum)
$album = $newalbum;
else
- $album = datetime_convert('UTC',date_default_timezone_get(),'now', 'Y');
+ $album = datetime_convert('UTC',date_default_timezone_get(),'now', 'Y-m');
}
/**