mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-04 15:44:07 +01:00
* [FIX] Fixed wrong behavior on IIS-PHP (Windows). Thanks to @davidpsc for the feedback. Related #276
This commit is contained in:
@@ -323,9 +323,10 @@ class Init
|
||||
private static function setPaths()
|
||||
{
|
||||
// Calcular los directorios raíz
|
||||
$dir = substr(__DIR__, 0, strpos(__DIR__, str_replace('\\', '/', __NAMESPACE__)) - 1);
|
||||
// $dir = substr(__DIR__, 0, strpos(__DIR__, str_replace('\\', '/', __NAMESPACE__)) - 1);
|
||||
// self::$SERVERROOT = substr($dir, 0, strripos($dir, DIRECTORY_SEPARATOR));
|
||||
|
||||
self::$SERVERROOT = substr($dir, 0, strripos($dir, DIRECTORY_SEPARATOR));
|
||||
self::$SERVERROOT = dirname(BASE_DIR);
|
||||
|
||||
self::$SUBURI = str_replace("\\", '/', substr(realpath($_SERVER['SCRIPT_FILENAME']), strlen(self::$SERVERROOT)));
|
||||
|
||||
@@ -354,7 +355,7 @@ class Init
|
||||
self::$WEBROOT = '/' . self::$WEBROOT;
|
||||
}
|
||||
|
||||
$protocol = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
|
||||
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https://' : 'http://';
|
||||
self::$WEBURI .= $protocol . $_SERVER['HTTP_HOST'] . self::$WEBROOT;
|
||||
}
|
||||
|
||||
|
||||
@@ -353,7 +353,7 @@ class Util
|
||||
* Devuelve información sobre la aplicación.
|
||||
*
|
||||
* @param string $index con la key a devolver
|
||||
* @return array con las propiedades de la aplicación
|
||||
* @return array|string con las propiedades de la aplicación
|
||||
*/
|
||||
public static function getAppInfo($index = null)
|
||||
{
|
||||
@@ -386,7 +386,7 @@ class Util
|
||||
*/
|
||||
public static function getVersion($retBuild = false, $normalized = false)
|
||||
{
|
||||
$build = 17073101;
|
||||
$build = 17073102;
|
||||
$version = [2, 1, 12];
|
||||
|
||||
if ($normalized === true) {
|
||||
|
||||
Reference in New Issue
Block a user