aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormrjive <mrjive@mrjive.it>2016-01-10 09:44:43 +0100
committermrjive <mrjive@mrjive.it>2016-01-10 09:44:43 +0100
commit9cbbc92062f0e42e32881a972a234a6c25758c37 (patch)
treead7c9ba78f82aa67ba6c4846a857dfd9c7355cdd /include
parent0fa34c6880853e64b88749bcf9cc9b9e8c9a198b (diff)
parent23c7086605d54fc6d9a537b20fc3377a52b24ee8 (diff)
downloadvolse-hubzilla-9cbbc92062f0e42e32881a972a234a6c25758c37.tar.gz
volse-hubzilla-9cbbc92062f0e42e32881a972a234a6c25758c37.tar.bz2
volse-hubzilla-9cbbc92062f0e42e32881a972a234a6c25758c37.zip
Merge pull request #13 from redmatrix/master
updating from original codebase
Diffstat (limited to 'include')
-rw-r--r--include/ItemObject.php2
-rw-r--r--include/network.php18
-rw-r--r--include/notifier.php2
-rw-r--r--include/zot.php3
4 files changed, 22 insertions, 3 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php
index 8be99d91e..1b7b2ce78 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -264,7 +264,7 @@ class Item extends BaseObject {
if($keep_reports === 0)
$keep_reports = 30;
- if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC',"now - $keep_reports days")) > 0)
+ if((! get_config('system','disable_dreport')) && strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC',"now - $keep_reports days")) > 0)
$dreport = t('Delivery Report');
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
diff --git a/include/network.php b/include/network.php
index 859a60650..94298abef 100644
--- a/include/network.php
+++ b/include/network.php
@@ -1144,6 +1144,10 @@ function discover_by_webbie($webbie) {
dbesc($addr)
);
+ // fix relative urls
+ if($vcard['photo'] && (strpos($vcard['photo'],'http') !== 0))
+ $vcard['photo'] = $diaspora_base . '/' . $vcard['photo'];
+
/**
*
* Diaspora communications are notoriously unreliable and receiving profile update messages (indeed any messages)
@@ -1788,6 +1792,17 @@ function get_site_info() {
$hide_in_statistics = intval(get_config('system','hide_in_statistics'));
$site_expire = intval(get_config('system', 'default_expire_days'));
+ load_config('feature_lock');
+ $locked_features = array();
+ if(is_array($a->config['feature_lock']) && count($a->config['feature_lock'])) {
+ foreach($a->config['feature_lock'] as $k => $v) {
+ if($k === 'config_loaded')
+ continue;
+ $locked_features[$k] = intval($v);
+ }
+ }
+
+
$data = Array(
'version' => $version,
@@ -1799,9 +1814,10 @@ function get_site_info() {
'invitation_only' => intval(get_config('system','invitation_only')),
'directory_mode' => $directory_mode[get_config('system','directory_mode')],
'language' => get_config('system','language'),
- 'rss_connections' => get_config('system','feed_contacts'),
+ 'rss_connections' => intval(get_config('system','feed_contacts')),
'expiration' => $site_expire,
'default_service_restrictions' => $service_class,
+ 'locked_features' => $locked_features,
'admin' => $admin,
'site_name' => (($site_name) ? $site_name : ''),
'platform' => PLATFORM_NAME,
diff --git a/include/notifier.php b/include/notifier.php
index 32d702cb5..5260e629f 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -578,7 +578,7 @@ function notifier_run($argv, $argc){
));
// only create delivery reports for normal undeleted items
- if(is_array($target_item) && array_key_exists('postopts',$target_item) && (! $target_item['item_deleted'])) {
+ if(is_array($target_item) && array_key_exists('postopts',$target_item) && (! $target_item['item_deleted']) && (! get_config('system','disable_dreport'))) {
q("insert into dreport ( dreport_mid, dreport_site, dreport_recip, dreport_result, dreport_time, dreport_xchan, dreport_queue ) values ( '%s','%s','%s','%s','%s','%s','%s' ) ",
dbesc($target_item['mid']),
dbesc($hub['hubloc_host']),
diff --git a/include/zot.php b/include/zot.php
index a644bbd06..beaa54126 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -3924,6 +3924,9 @@ function check_zotinfo($channel,$locations,&$ret) {
function delivery_report_is_storable($dr) {
+ if(get_config('system','disable_dreport'))
+ return false;
+
call_hooks('dreport_is_storable',$dr);
// let plugins accept or reject - if neither, continue on