mirror of
https://github.com/operasoftware/ssh-key-authority.git
synced 2026-05-24 22:18:54 -05:00
Move $base_path definition to core.php to fix CLI script error
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
## limitations under the License.
|
||||
##
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
$base_path = dirname(__FILE__);
|
||||
chdir($base_path);
|
||||
mb_internal_encoding('UTF-8');
|
||||
date_default_timezone_set('UTC');
|
||||
set_error_handler('exception_error_handler');
|
||||
|
||||
@@ -27,7 +27,6 @@ if(isset($_SERVER['PHP_AUTH_USER'])) {
|
||||
}
|
||||
|
||||
// Work out where we are on the server
|
||||
$base_path = dirname(__FILE__);
|
||||
$base_url = dirname($_SERVER['SCRIPT_NAME']);
|
||||
$request_url = $_SERVER['REQUEST_URI'];
|
||||
$relative_request_url = preg_replace('/^'.preg_quote($base_url, '/').'/', '/', $request_url);
|
||||
|
||||
Reference in New Issue
Block a user