]> git.mxchange.org Git - friendica-addons.git/blobdiff - public_server/public_server.php
Rename "fetchUrl" and "fetchUrlFull" to "fetch" and "fetchFull"
[friendica-addons.git] / public_server / public_server.php
index 098e0d4a7abb1a6e2eb486b020f7908fe7d07068..41c6283253d86a0cedf1ba54a568c0b3653fe447 100644 (file)
@@ -1,19 +1,19 @@
 <?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;
@@ -68,7 +68,7 @@ function public_server_cron($a, $b)
                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'],
@@ -124,7 +124,7 @@ function public_server_cron($a, $b)
 
 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'));