]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Move Notify::TYPE_SUGGEST
[friendica.git] / boot.php
index c863cda723c91cde9953ea63f26cb837a19557d5..950624ad44ff1da82843beb2ef9df7c77ff569fc 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -17,7 +17,6 @@
  * easily as email does today.
  */
 
-use Friendica\Core\Config;
 use Friendica\Core\Protocol;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
@@ -34,7 +33,7 @@ define('DFRN_PROTOCOL_VERSION',  '2.23');
 define('NEW_UPDATE_ROUTINE_VERSION', 1170);
 
 /**
- * @brief Constant with a HTML line break.
+ * Constant with a HTML line break.
  *
  * Contains a HTML line break (br) element and a real carriage return with line
  * feed for the source.
@@ -43,7 +42,7 @@ define('NEW_UPDATE_ROUTINE_VERSION', 1170);
 define('EOL',                    "<br />\r\n");
 
 /**
- * @brief Image storage quality.
+ * Image storage quality.
  *
  * Lower numbers save space at cost of image detail.
  * For ease of upgrade, please do not change here. Set system.jpegquality = n in config/local.config.php,
@@ -141,20 +140,12 @@ define('MAX_LIKERS',    75);
  * Email notification options
  * @{
  */
-define('NOTIFY_INTRO',        1);
-define('NOTIFY_CONFIRM',      2);
-define('NOTIFY_WALL',         4);
-define('NOTIFY_COMMENT',      8);
-define('NOTIFY_MAIL',        16);
-define('NOTIFY_SUGGEST',     32);
 define('NOTIFY_PROFILE',     64);
 define('NOTIFY_TAGSELF',    128);
 define('NOTIFY_TAGSHARE',   256);
 define('NOTIFY_POKE',       512);
 define('NOTIFY_SHARE',     1024);
 
-define('SYSTEM_EMAIL',    16384);
-
 define('NOTIFY_SYSTEM',   32768);
 /* @}*/
 
@@ -233,7 +224,7 @@ if (!defined('CURLE_OPERATION_TIMEDOUT')) {
 }
 
 /**
- * @brief Returns the user id of locally logged in user or false.
+ * Returns the user id of locally logged in user or false.
  *
  * @return int|bool user id or false
  */
@@ -246,7 +237,7 @@ function local_user()
 }
 
 /**
- * @brief Returns the public contact id of logged in user or false.
+ * Returns the public contact id of logged in user or false.
  *
  * @return int|bool public contact id or false
  */
@@ -270,7 +261,7 @@ function public_contact()
 }
 
 /**
- * @brief Returns contact id of authenticated site visitor or false
+ * Returns contact id of authenticated site visitor or false
  *
  * @return int|bool visitor_id or false
  */
@@ -288,7 +279,7 @@ function remote_user()
 }
 
 /**
- * @brief Show an error message to user.
+ * Show an error message to user.
  *
  * This function save text in session, to be shown to the user at next page load
  *
@@ -310,7 +301,7 @@ function notice($s)
 }
 
 /**
- * @brief Show an info message to user.
+ * Show an info message to user.
  *
  * This function save text in session, to be shown to the user at next page load
  *
@@ -356,7 +347,7 @@ function feed_birthday($uid, $tz)
                $tz = 'UTC';
        }
 
-       $profile = DBA::selectFirst('profile', ['dob'], ['is-default' => true, 'uid' => $uid]);
+       $profile = DBA::selectFirst('profile', ['dob'], ['uid' => $uid]);
        if (DBA::isResult($profile)) {
                $tmp_dob = substr($profile['dob'], 5);
                if (intval($tmp_dob)) {
@@ -375,7 +366,7 @@ function feed_birthday($uid, $tz)
 }
 
 /**
- * @brief Check if current user has admin role.
+ * Check if current user has admin role.
  *
  * @return bool true if user is an admin
  */
@@ -383,7 +374,7 @@ function is_site_admin()
 {
        $a = DI::app();
 
-       $admin_email = Config::get('config', 'admin_email');
+       $admin_email = DI::config()->get('config', 'admin_email');
 
        $adminlist = explode(',', str_replace(' ', '', $admin_email));
 
@@ -446,7 +437,7 @@ function curPageURL()
 
 function get_temppath()
 {
-       $temppath = Config::get("system", "temppath");
+       $temppath = DI::config()->get("system", "temppath");
 
        if (($temppath != "") && System::isDirectoryUsable($temppath)) {
                // We have a temp path and it is usable
@@ -470,7 +461,7 @@ function get_temppath()
 
                if (System::isDirectoryUsable($new_temppath)) {
                        // The new path is usable, we are happy
-                       Config::set("system", "temppath", $new_temppath);
+                       DI::config()->set("system", "temppath", $new_temppath);
                        return $new_temppath;
                } else {
                        // We can't create a subdirectory, strange.
@@ -520,7 +511,7 @@ function clear_cache($basepath = "", $path = "")
                return;
        }
 
-       $cachetime = (int) Config::get('system', 'itemcache_duration');
+       $cachetime = (int) DI::config()->get('system', 'itemcache_duration');
        if ($cachetime == 0) {
                $cachetime = 86400;
        }
@@ -544,12 +535,12 @@ function clear_cache($basepath = "", $path = "")
 function get_itemcachepath()
 {
        // Checking, if the cache is deactivated
-       $cachetime = (int) Config::get('system', 'itemcache_duration');
+       $cachetime = (int) DI::config()->get('system', 'itemcache_duration');
        if ($cachetime < 0) {
                return "";
        }
 
-       $itemcache = Config::get('system', 'itemcache');
+       $itemcache = DI::config()->get('system', 'itemcache');
        if (($itemcache != "") && System::isDirectoryUsable($itemcache)) {
                return BasePath::getRealPath($itemcache);
        }
@@ -563,7 +554,7 @@ function get_itemcachepath()
                }
 
                if (System::isDirectoryUsable($itemcache)) {
-                       Config::set("system", "itemcache", $itemcache);
+                       DI::config()->set("system", "itemcache", $itemcache);
                        return $itemcache;
                }
        }
@@ -571,13 +562,13 @@ function get_itemcachepath()
 }
 
 /**
- * @brief Returns the path where spool files are stored
+ * Returns the path where spool files are stored
  *
  * @return string Spool path
  */
 function get_spoolpath()
 {
-       $spoolpath = Config::get('system', 'spoolpath');
+       $spoolpath = DI::config()->get('system', 'spoolpath');
        if (($spoolpath != "") && System::isDirectoryUsable($spoolpath)) {
                // We have a spool path and it is usable
                return $spoolpath;
@@ -595,7 +586,7 @@ function get_spoolpath()
 
                if (System::isDirectoryUsable($spoolpath)) {
                        // The new path is usable, we are happy
-                       Config::set("system", "spoolpath", $spoolpath);
+                       DI::config()->set("system", "spoolpath", $spoolpath);
                        return $spoolpath;
                } else {
                        // We can't create a subdirectory, strange.