xchan_instance_url was still being referenced, add expire app

This commit is contained in:
zotlabs 2019-03-24 22:46:31 -07:00
parent 395d7ba802
commit 0030bdac40
7 changed files with 37 additions and 4 deletions

View file

@ -470,7 +470,7 @@ class Notifier {
if(! count(self::$env_recips))
self::$env_recips = ((self::$private) ? [] : null);
$details = q("select xchan_hash, xchan_instance_url, xchan_network, xchan_addr, xchan_guid, xchan_guid_sig from xchan where xchan_hash in (" . protect_sprintf(implode(',',self::$recipients)) . ")");
$details = q("select xchan_hash, xchan_network, xchan_addr, xchan_guid, xchan_guid_sig from xchan where xchan_hash in (" . protect_sprintf(implode(',',self::$recipients)) . ")");
$recip_list = array();

View file

@ -312,6 +312,7 @@ class Apps {
'Chatrooms' => t('Chatrooms'),
'Content Import' => t('Content Import'),
'Connections' => t('Connections'),
'Expire Posts' => t('Expire Posts'),
'Remote Diagnostics' => t('Remote Diagnostics'),
'Suggest Channels' => t('Suggest Channels'),
'Login' => t('Login'),

View file

@ -22,4 +22,4 @@ class Categories extends Controller {
}
}
}

25
Zotlabs/Module/Expire.php Normal file
View file

@ -0,0 +1,25 @@
<?php
namespace Zotlabs\Module;
use Zotlabs\Lib\Apps;
use Zotlabs\Lib\Libsync;
use Zotlabs\Web\Controller;
class Expire extends Controller {
function get() {
$desc = t('This app allows you to set an optional expiration date/time for posts, after which they will be deleted. This must be at least fifteen minutes into the future.');
$text = '<div class="section-content-info-wrapper">' . $desc . '</div>';
if(! ( local_channel() && Apps::system_app_installed(local_channel(),'Expire Posts'))) {
return $text;
}
}
}

View file

@ -28,6 +28,7 @@ use Zotlabs\Lib\ThreadListener;
use Zotlabs\Lib\Config;
use Zotlabs\Lib\IConfig;
use Zotlabs\Lib\Enotify;
use Zotlabs\Lib\Apps;
use App;
require_once('include/attach.php');
@ -771,7 +772,7 @@ class Item extends Controller {
if(feature_enabled($profile_uid,'content_expire')) {
if(Apps::system_app_installed($profile_uid,'Expire Posts')) {
if(x($_REQUEST,'expire')) {
$expires = datetime_convert(date_default_timezone_get(),'UTC', $_REQUEST['expire']);
if($expires <= datetime_convert())

6
app/expire.apd Normal file
View file

@ -0,0 +1,6 @@
version: 1
url: $baseurl/expire
requires: local_channel
name: Expire Posts
photo: icon:eraser
categories: Networking

View file

@ -1224,7 +1224,7 @@ function z_status_editor($a, $x, $popup = false) {
if(x($x, 'disable_comments'))
$feature_nocomment = false;
$feature_expire = ((feature_enabled($x['profile_uid'], 'content_expire') && (! $webpage)) ? true : false);
$feature_expire = ((Apps::system_app_installed($x['profile_uid'], 'Expire Posts') && (! $webpage)) ? true : false);
if(x($x, 'hide_expire'))
$feature_expire = false;