X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=13cc2aaf5bdf7a612e47a0d6ee11bcbadc879a63;hb=f0d5c97c0801e944a520f972a9f80fae04fd80cf;hp=fe4e5a275701d54126aeb447c71981999aee9dee;hpb=beb2346cfc8e3aa57ed0203e35034241e814b61a;p=friendica.git diff --git a/boot.php b/boot.php index fe4e5a2757..13cc2aaf5b 100644 --- a/boot.php +++ b/boot.php @@ -6,11 +6,11 @@ /** * Friendica - * + * * Friendica is a communications platform for integrated social communications * utilising decentralised communications and linkage to several indie social * projects - as well as popular mainstream providers. - * + * * Our mission is to free our friends and families from the clutches of * data-harvesting corporations, and pave the way to a future where social * communications are free and open and flow between alternate providers as @@ -18,7 +18,7 @@ */ require_once('include/autoloader.php'); - + require_once('include/config.php'); require_once('include/network.php'); require_once('include/plugin.php'); @@ -38,7 +38,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_CODENAME', 'Asparagus'); define ( 'FRIENDICA_VERSION', '3.5-dev' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1194 ); +define ( 'DB_UPDATE_VERSION', 1195 ); /** * @brief Constant with a HTML line break. @@ -1098,6 +1098,11 @@ class App { return($this->is_friendica_app); } + /** + * @brief Checks if the maximum load is reached + * + * @return bool Is the load reached? + */ function maxload_reached() { $maxsysload = intval(get_config('system', 'maxloadavg')); @@ -1114,7 +1119,16 @@ class App { return false; } - function is_already_running($task, $taskname, $timeout = 540) { + /** + * @brief Checks if the process is already running + * + * @param string $taskname The name of the task that will be used for the name of the lockfile + * @param string $task The path and name of the php script + * @param int $timeout The timeout after which a task should be killed + * + * @return bool Is the process running? + */ + function is_already_running($taskname, $task = "", $timeout = 540) { $lockpath = get_lockpath(); if ($lockpath != '') { @@ -1544,7 +1558,7 @@ function killme() { * @brief Redirect to another URL and terminate this process. */ function goaway($s) { - if (!strstr(normalise_link($s), normalise_link(App::get_baseurl()))) + if (!strstr(normalise_link($s), "http://")) $s = App::get_baseurl()."/".$s; header("Location: $s");