* easily as email does today.
*/
-require_once('include/autoloader.php');
+require_once(__DIR__ . DIRECTORY_SEPARATOR. 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php');
use \Friendica\Core\Config;
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');
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']) ||
$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);
+ $this->query_string = substr($_SERVER['QUERY_STRING'], 2);
// removing trailing / - maybe a nginx problem
- $this->query_string = lrim($this->query_string, '/');
+ $this->query_string = ltrim($this->query_string, '/');
}
if (x($_GET, 'pagename')) {
}
// 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);
}
*/
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;
}
// 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);