<?php
/**
* Name: public_server
- * Description: Friendica addon with functions suitable for a public server.
+ * Description: Friendica addon with functions suitable for a public server. WARNING: This addon is currently not well maintained. It may produce unexpected results. Use with caution!
* Version: 1.1
* Author: Keith Fernie <http://friendika.me4.it/profile/keith>
*/
use Friendica\App;
use Friendica\BaseModule;
-use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\DI;
+use Friendica\Model\Notify\Type;
use Friendica\Util\ConfigFileLoader;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Strings;
foreach ($r as $rr) {
notification([
'uid' => $rr['uid'],
- 'type' => NOTIFY_SYSTEM,
+ 'type' => Type::SYSTEM,
'system_type' => 'public_server_expire',
'language' => $rr['language'],
'to_name' => $rr['username'],
function public_server_enotify(&$a, &$b)
{
- if (!empty($b['params']) && $b['params']['type'] == NOTIFY_SYSTEM
+ if (!empty($b['params']) && $b['params']['type'] == Type::SYSTEM
&& !empty($b['params']['system_type']) && $b['params']['system_type'] === 'public_server_expire') {
$b['itemlink'] = DI::baseUrl()->get();
$b['epreamble'] = $b['preamble'] = DI::l10n()->t('Your account on %s will expire in a few days.', DI::config()->get('system', 'sitename'));