bring back events app - calendar is not yet ready for prime time

This commit is contained in:
zotlabs 2019-05-15 21:22:47 -07:00
parent 52fe8485d7
commit a59489e9dd
4 changed files with 14 additions and 3 deletions

View file

@ -67,7 +67,8 @@ class Apps {
'View Profile', 'View Profile',
'Photos', 'Photos',
'Calendar', 'Calendar',
'Directory', // 'Directory',
'Events',
'Search', 'Search',
'Profile Photo' 'Profile Photo'
]); ]);

View file

@ -12,7 +12,7 @@ class Enotify {
/** /**
* @brief * @brief
* *
* @param array $params an assoziative array with: * @param array $params an associative array with:
* * \e string \b from_xchan sender xchan hash * * \e string \b from_xchan sender xchan hash
* * \e string \b to_xchan recipient xchan hash * * \e string \b to_xchan recipient xchan hash
* * \e array \b item an assoziative array * * \e array \b item an assoziative array
@ -53,6 +53,8 @@ class Enotify {
return; return;
} }
// from here on everything is in the recipients language // from here on everything is in the recipients language
push_lang($recip['account_language']); // should probably have a channel language push_lang($recip['account_language']); // should probably have a channel language
@ -840,6 +842,9 @@ class Enotify {
$ret = ''; $ret = '';
$expire = get_config('system','default_expire_days');
$expire_date = (($expire) ? datetime_convert('UTC','UTC','now() - ' . $expire . ' days') : NULL_DATE);
require_once('include/conversation.php'); require_once('include/conversation.php');
// Call localize_item to get a one line status for activities. // Call localize_item to get a one line status for activities.
@ -898,6 +903,11 @@ class Enotify {
'display' => true 'display' => true
); );
$post_date = (($edit)? $item['edited'] : $item['created']);
if($post_date && $post_date < $expire_date) {
return [];
}
call_hooks('enotify_format',$x); call_hooks('enotify_format',$x);
if(! $x['display']) { if(! $x['display']) {
return []; return [];

View file

@ -4,7 +4,7 @@ namespace Zotlabs\Module;
use App; use App;
use Zotlabs\Web\Controller; use Zotlabs\Web\Controller;
use Zotlabs\Lib\Libsync; use Zotlabs\Lib\Libsync;
use Zotlabs\Lib\AccessControl; use Zotlabs\Access\AccessControl;
use Zotlabs\Lib\Apps; use Zotlabs\Lib\Apps;
use Zotlabs\Daemon\Master; use Zotlabs\Daemon\Master;