Merge branch 'dev'

This commit is contained in:
zotlabs 2018-10-21 18:06:24 -07:00
commit b5063ab2a7
8 changed files with 21 additions and 14 deletions

View file

@ -151,8 +151,7 @@ class Onepoll {
$j = json_decode($x['body'],true);
if($j['success'] && $j['messages']) {
foreach($j['messages'] as $message) {
$results = Libzot::process_delivery(array('hash' => $contact['xchan_hash']), get_item_elements($message),
array(array('hash' => $importer['xchan_hash'])), false);
$results = Libzot::process_delivery($contact['xchan_hash'], get_item_elements($message), [ $importer['xchan_hash'] ], false);
logger('onepoll: feed_update: process_delivery: ' . print_r($results,true), LOGGER_DATA);
$total ++;
}

View file

@ -1894,6 +1894,7 @@ class Activity {
$is_sys_channel = is_sys_channel($channel['channel_id']);
$parent = false;
// Mastodon only allows visibility in public timelines if the public inbox is listed in the 'to' field.
// They are hidden in the public timeline if the public inbox is listed in the 'cc' field.
@ -1953,6 +1954,7 @@ class Activity {
set_iconfig($item,'activitypub','recips',$act->raw_recips);
if($item['parent_mid'] && $item['parent_mid'] !== $item['mid']) {
$parent = true;
$p = q("select parent_mid from item where mid = '%s' and uid = %d limit 1",
dbesc($item['parent_mid']),
intval($item['uid'])
@ -2393,6 +2395,7 @@ class Activity {
static function media_not_in_body($s,$body) {
if((strpos($body,']' . $s . '[/img]') === false) &&
(strpos($body,']' . $s . '[/zmg]') === false) &&
(strpos($body,']' . $s . '[/video]') === false) &&
(strpos($body,']' . $s . '[/audio]') === false)) {
return true;

View file

@ -808,7 +808,7 @@ class Enotify {
? t('created a new post')
: sprintf( t('reacted to %s\'s conversation'), $item['owner']['xchan_name']));
if($item['verb'] === 'Announce') {
$itemem_text = sprintf( t('post shared by %s'), $item['owner']['xchan_name']);
$itemem_text = sprintf( t('shared %s\'s post'), $item['owner']['xchan_name']);
}
}

View file

@ -68,8 +68,10 @@ class Pconfig extends \Zotlabs\Web\Controller {
if(argc() == 2) {
$content .= '<a href="pconfig">pconfig[' . local_channel() . ']</a>' . EOL;
load_pconfig(local_channel(),escape_tags(argv(1)));
foreach(\App::$config[local_channel()][escape_tags(argv(1))] as $k => $x) {
$content .= '<a href="pconfig/' . escape_tags(argv(1)) . '/' . $k . '" >pconfig[' . local_channel() . '][' . escape_tags(argv(1)) . '][' . $k . ']</a> = ' . escape_tags($x) . EOL;
if(\App::$config[local_channel()][escape_tags(argv(1))]) {
foreach(\App::$config[local_channel()][escape_tags(argv(1))] as $k => $x) {
$content .= '<a href="pconfig/' . escape_tags(argv(1)) . '/' . $k . '" >pconfig[' . local_channel() . '][' . escape_tags(argv(1)) . '][' . $k . ']</a> = ' . escape_tags($x) . EOL;
}
}
}

View file

@ -624,7 +624,7 @@ function sys_boot() {
define( 'DEFAULT_NOTIFY_ICON', '/images/hz-white-64.png' );
}
App::head_set_icon(DEFAULT_PLATFORM_ICON);
// App::head_set_icon(DEFAULT_PLATFORM_ICON);
/*
* Try to open the database;
@ -1101,7 +1101,10 @@ class App {
self::$meta->set('generator', Zotlabs\Lib\System::get_platform_name());
head_add_link(['rel' => 'shortcut icon', 'href' => head_get_icon()]);
$i = head_get_icon();
if($i) {
head_add_link(['rel' => 'shortcut icon', 'href' => head_get_icon()]);
}
$x = [ 'header' => '' ];
/**
@ -1224,7 +1227,7 @@ class App {
public static function head_get_icon() {
$icon = self::$data['pageicon'];
if(! strpos($icon,'://'))
if($icon && ! strpos($icon,'://'))
$icon = z_root() . $icon;
return $icon;
}
@ -2312,7 +2315,7 @@ function head_set_icon($icon) {
function head_get_icon() {
$icon = App::$data['pageicon'];
if(! strpos($icon, '://'))
if($icon && ! strpos($icon, '://'))
$icon = z_root() . $icon;
return $icon;

View file

@ -1,4 +1,4 @@
<?php /** @file */
<?php
function update_channels_total_stat() {
$r = q("select count(channel_id) as channels_total from channel left join account on account_id = channel_account_id
@ -13,7 +13,7 @@ function update_channels_total_stat() {
function update_channels_active_halfyear_stat() {
$r = q("select channel_id from channel left join account on account_id = channel_account_id
where account_flags = 0 and account_lastlog > %s - INTERVAL %s",
where account_flags = 0 and channel_active > %s - INTERVAL %s",
db_utcnow(), db_quoteinterval('6 MONTH')
);
if($r) {
@ -26,7 +26,7 @@ function update_channels_active_halfyear_stat() {
function update_channels_active_monthly_stat() {
$r = q("select channel_id from channel left join account on account_id = channel_account_id
where account_flags = 0 and account_lastlog > %s - INTERVAL %s",
where account_flags = 0 and channel_active > %s - INTERVAL %s",
db_utcnow(), db_quoteinterval('1 MONTH')
);
if($r) {

View file

@ -10,7 +10,7 @@
* https://opensource.org/licenses/MIT
*/
class UploadHandler
class UploadHandlerA
{
protected $options;

View file

@ -9,7 +9,7 @@
* Licensed under the MIT license:
* https://opensource.org/licenses/MIT
*/
exit;
error_reporting(E_ALL | E_STRICT);
require('UploadHandler.php');
$upload_handler = new UploadHandler();