]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Merge pull request #2190 from annando/1512-getload
[friendica.git] / boot.php
index 19cfd71a8aad7343b499983c1bb0b39064de9fa1..cc56949009fbaffe67bd2cc2d40422b375b407ad 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -17,7 +17,7 @@ require_once('include/dbstructure.php');
 
 define ( 'FRIENDICA_PLATFORM',     'Friendica');
 define ( 'FRIENDICA_CODENAME',     'Lily of the valley');
-define ( 'FRIENDICA_VERSION',      '3.4.3-dev' );
+define ( 'FRIENDICA_VERSION',      '3.4.3-rc' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
 define ( 'DB_UPDATE_VERSION',      1191      );
 define ( 'EOL',                    "<br />\r\n"     );
@@ -634,6 +634,9 @@ if(! class_exists('App')) {
 
                        $basepath = get_config("system", "basepath");
 
+                       if ($basepath == "")
+                               $basepath = dirname(__FILE__);
+
                        if ($basepath == "")
                                $basepath = $_SERVER["DOCUMENT_ROOT"];
 
@@ -1945,3 +1948,15 @@ function validate_include(&$file) {
 
        return true;
 }
+
+function current_load() {
+       if (!function_exists('sys_getloadavg'))
+               return false;
+
+       $load_arr = sys_getloadavg();
+
+       if (!is_array($load_arr))
+               return false;
+
+       return max($load_arr);
+}