X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=c44599477aafdc6a05a4e33a27d0edf9a299d77d;hb=806f395724dbf472f1aaa9e7335ffeaea70b0ff0;hp=3bf85b14f4b4c9876bbd7e3f00d4db0ed8ba8ce1;hpb=0ac1af7300edf9d9f5df7fae75f578b8de0f7333;p=friendica.git diff --git a/boot.php b/boot.php index 3bf85b14f4..c44599477a 100644 --- a/boot.php +++ b/boot.php @@ -17,7 +17,7 @@ * easily as email does today. */ -require_once('include/autoloader.php'); +require_once(__DIR__ . DIRECTORY_SEPARATOR. 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'); use \Friendica\Core\Config; @@ -29,7 +29,6 @@ require_once('include/datetime.php'); require_once('include/pgettext.php'); require_once('include/nav.php'); require_once('include/cache.php'); -require_once('library/Mobile_Detect/Mobile_Detect.php'); require_once('include/features.php'); require_once('include/identity.php'); require_once('update.php'); @@ -39,7 +38,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_CODENAME', 'Asparagus'); define ( 'FRIENDICA_VERSION', '3.5.2-dev' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1216 ); +define ( 'DB_UPDATE_VERSION', 1219 ); /** * @brief Constant with a HTML line break. @@ -383,6 +382,7 @@ define ( 'ACTIVITY_UPDATE', NAMESPACE_ACTIVITY_SCHEMA . 'update' ); define ( 'ACTIVITY_TAG', NAMESPACE_ACTIVITY_SCHEMA . 'tag' ); define ( 'ACTIVITY_FAVORITE', NAMESPACE_ACTIVITY_SCHEMA . 'favorite' ); define ( 'ACTIVITY_SHARE', NAMESPACE_ACTIVITY_SCHEMA . 'share' ); +define ( 'ACTIVITY_DELETE', NAMESPACE_ACTIVITY_SCHEMA . 'delete' ); define ( 'ACTIVITY_POKE', NAMESPACE_ZOT . '/activity/poke' ); define ( 'ACTIVITY_MOOD', NAMESPACE_ZOT . '/activity/mood' ); @@ -647,13 +647,12 @@ class App { startup(); set_include_path( - 'include' . PATH_SEPARATOR + get_include_path() . PATH_SEPARATOR + . 'include' . PATH_SEPARATOR . 'library' . PATH_SEPARATOR - . 'library/phpsec' . PATH_SEPARATOR . 'library/langdet' . PATH_SEPARATOR . '.' ); - $this->scheme = 'http'; if ((x($_SERVER, 'HTTPS') && $_SERVER['HTTPS']) || @@ -697,7 +696,7 @@ class App { $this->query_string = substr($_SERVER['QUERY_STRING'], 9); // removing trailing / - maybe a nginx problem - $this->query_string = lrim($this->query_string, '/'); + $this->query_string = ltrim($this->query_string, '/'); } elseif ((x($_SERVER, 'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'], 0, 2) === "q=") { $this->query_string = substr($_SERVER['QUERY_STRING'], 2); @@ -721,8 +720,8 @@ class App { } // Diaspora style profile url - if (substr($this->cmd,0,2) === 'u/') { - $this->cmd = 'profile/' . substr($this->cmd,2); + if (substr($this->cmd, 0, 2) === 'u/') { + $this->cmd = 'profile/' . substr($this->cmd, 2); } @@ -1368,11 +1367,15 @@ class App { $cmdline = implode($args, " "); if (get_config('system', 'proc_windows')) { - proc_close(proc_open('cmd /c start /b ' . $cmdline, array(), $foo, dirname(__FILE__))); + $resource = proc_open('cmd /c start /b ' . $cmdline, array(), $foo, dirname(__FILE__)); } else { - proc_close(proc_open($cmdline . " &", array(), $foo, dirname(__FILE__))); + $resource = proc_open($cmdline . " &", array(), $foo, dirname(__FILE__)); } - + if (!is_resource($resource)) { + logger('We got no resource for command '.$cmdline, LOGGER_DEBUG); + return; + } + proc_close($resource); } /** @@ -1450,7 +1453,7 @@ function get_app() { */ function x($s,$k = NULL) { if ($k != NULL) { - if ((is_array($s)) && (array_key_exists($k,$s))) { + if ((is_array($s)) && (array_key_exists($k, $s))) { if ($s[$k]) { return (int) 1; } @@ -2474,7 +2477,7 @@ function get_temppath() { // Check if it is usable if (($temppath != "") AND App::directory_usable($temppath)) { // To avoid any interferences with other systems we create our own directory - $new_temppath .= "/".$a->get_hostname(); + $new_temppath = $temppath."/".$a->get_hostname(); if (!is_dir($new_temppath)) { /// @TODO There is a mkdir()+chmod() upwards, maybe generalize this (+ configurable) into a function/method? mkdir($new_temppath);