diff --git a/inc/SP/Core/Init.class.php b/inc/SP/Core/Init.class.php index d3049fed..dfee7841 100644 --- a/inc/SP/Core/Init.class.php +++ b/inc/SP/Core/Init.class.php @@ -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; } diff --git a/inc/SP/Util/Util.class.php b/inc/SP/Util/Util.class.php index 14278758..0e39dd7a 100644 --- a/inc/SP/Util/Util.class.php +++ b/inc/SP/Util/Util.class.php @@ -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) {