diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2016-01-11 06:38:24 +0100 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2016-01-11 06:38:24 +0100 |
commit | 42433c0b4442f1a6b451324fe7f765b1b4c354b8 (patch) | |
tree | 27d3c56df94363c5b9dad0f0ccddea9ddf7a06b2 /include | |
parent | 41057ac3642ea8c7126cc980be5d896b8b6ff7c3 (diff) | |
parent | f4d47f825df40095f5b66b039dc6ca2d689e6b16 (diff) | |
download | volse-hubzilla-42433c0b4442f1a6b451324fe7f765b1b4c354b8.tar.gz volse-hubzilla-42433c0b4442f1a6b451324fe7f765b1b4c354b8.tar.bz2 volse-hubzilla-42433c0b4442f1a6b451324fe7f765b1b4c354b8.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include')
-rw-r--r-- | include/message.php | 9 | ||||
-rw-r--r-- | include/network.php | 18 |
2 files changed, 23 insertions, 4 deletions
diff --git a/include/message.php b/include/message.php index 940fcc275..f24bb6e4b 100644 --- a/include/message.php +++ b/include/message.php @@ -11,6 +11,7 @@ require_once('include/attach.php'); function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='',$expires = ''){ $ret = array('success' => false); + $is_reply = false; $a = get_app(); $observer_hash = get_observer_hash(); @@ -51,6 +52,7 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto=' $conv_guid = ''; if(strlen($replyto)) { + $is_reply = true; $r = q("select conv_guid from mail where channel_id = %d and ( mid = '%s' or parent_mid = '%s' ) limit 1", intval(local_channel()), dbesc($replyto), @@ -187,8 +189,8 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto=' - $r = q("INSERT INTO mail ( account_id, conv_guid, mail_obscured, channel_id, from_xchan, to_xchan, title, body, attach, mid, parent_mid, created, expires ) - VALUES ( %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )", + $r = q("INSERT INTO mail ( account_id, conv_guid, mail_obscured, channel_id, from_xchan, to_xchan, title, body, attach, mid, parent_mid, created, expires, mail_isreply ) + VALUES ( %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d )", intval($channel['channel_account_id']), dbesc($conv_guid), intval(1), @@ -201,7 +203,8 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto=' dbesc($mid), dbesc($replyto), dbesc(datetime_convert()), - dbescdate($expires) + dbescdate($expires), + intval($is_reply) ); // verify the save 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, |