fix include paths when started via cmdline

This commit is contained in:
friendica 2013-05-20 17:36:29 -07:00
parent 024fe68d71
commit a1c4d0ca93
3 changed files with 13 additions and 12 deletions

View file

@ -12,7 +12,7 @@ require_once('library/Mobile_Detect/Mobile_Detect.php');
require_once('include/features.php'); require_once('include/features.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.1.1704' ); define ( 'FRIENDICA_VERSION', '3.1.1706' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1163 ); define ( 'DB_UPDATE_VERSION', 1163 );
define ( 'EOL', "<br />\r\n" ); define ( 'EOL', "<br />\r\n" );
@ -437,6 +437,14 @@ if(! class_exists('App')) {
startup(); startup();
set_include_path(
'include' . PATH_SEPARATOR
. 'library' . PATH_SEPARATOR
. 'library/phpsec' . PATH_SEPARATOR
. 'library/langdet' . PATH_SEPARATOR
. '.' );
$this->scheme = 'http'; $this->scheme = 'http';
if(x($_SERVER,'HTTPS') && $_SERVER['HTTPS']) if(x($_SERVER,'HTTPS') && $_SERVER['HTTPS'])
$this->scheme = 'https'; $this->scheme = 'https';
@ -471,14 +479,7 @@ if(! class_exists('App')) {
$argc --; $argc --;
} }
set_include_path( set_include_path("include/$this->hostname" . PATH_SEPARATOR . get_include_path());
"include/$this->hostname" . PATH_SEPARATOR
. 'include' . PATH_SEPARATOR
. 'library' . PATH_SEPARATOR
. 'library/phpsec' . PATH_SEPARATOR
. 'library/langdet' . PATH_SEPARATOR
. '.' );
if((x($_SERVER,'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'],0,2) === "q=") { if((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);

View file

@ -1,6 +1,6 @@
<?php <?php
require_once("dba.php"); require_once("include/dba.php");
/** /**
* translation support * translation support

View file

@ -6,9 +6,9 @@
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 3.1.1704\n" "Project-Id-Version: 3.1.1706\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-05-18 00:02-0700\n" "POT-Creation-Date: 2013-05-20 00:03-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"