X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=362ab3cd37e1bef5cd189703f949063c99c6309c;hb=be73757131127c687090f925ff873ff385a88604;hp=e1857a55db4e1c0d92dce9a093b5d94303873051;hpb=4737563b957e84ee06d07f373af533b2f037497a;p=quix0rs-gnu-social.git diff --git a/index.php b/index.php index e1857a55db..362ab3cd37 100644 --- a/index.php +++ b/index.php @@ -18,7 +18,8 @@ */ define('INSTALLDIR', dirname(__FILE__)); -define('LACONICA', true); +define('STATUSNET', true); +define('LACONICA', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; @@ -31,7 +32,13 @@ function getPath($req) && array_key_exists('p', $req)) { return $req['p']; } else if (array_key_exists('PATH_INFO', $_SERVER)) { - return $_SERVER['PATH_INFO']; + $path = $_SERVER['PATH_INFO']; + $script = $_SERVER['SCRIPT_NAME']; + if (substr($path, 0, mb_strlen($script)) == $script) { + return substr($path, mb_strlen($script)); + } else { + return $path; + } } else { return null; } @@ -93,7 +100,7 @@ function checkMirror($action_obj, $args) // on the master DB $config['db']['database_rw'] = $config['db']['database']; - $config['db']['ini_rw'] = INSTALLDIR.'/classes/laconica.ini'; + $config['db']['ini_rw'] = INSTALLDIR.'/classes/statusnet.ini'; foreach ($alwaysRW as $table) { $config['db']['table_'.$table] = 'rw';