diff --git a/application/loginwebpage.class.inc.php b/application/loginwebpage.class.inc.php index aebd813a2..246f0d826 100644 --- a/application/loginwebpage.class.inc.php +++ b/application/loginwebpage.class.inc.php @@ -700,26 +700,36 @@ EOF } } } - + /** * Check if the user is already authentified, if yes, then performs some additional validations: * - if $bMustBeAdmin is true, then the user must be an administrator, otherwise an error is displayed - * - if $bIsAllowedToPortalUsers is false and the user has only access to the portal, then the user is redirected to the portal + * - if $bIsAllowedToPortalUsers is false and the user has only access to the portal, then the user is redirected + * to the portal + * * @param bool $bMustBeAdmin Whether or not the user must be an admin to access the current page * @param bool $bIsAllowedToPortalUsers Whether or not the current page is considered as part of the portal * @param int iOnExit What action to take if the user is not logged on (one of the class constants EXIT_...) + * + * @return int|mixed|string + * @throws \Exception */ static function DoLogin($bMustBeAdmin = false, $bIsAllowedToPortalUsers = false, $iOnExit = self::EXIT_PROMPT) { $sRequestedPortalId = $bIsAllowedToPortalUsers ? 'legacy_portal' : 'backoffice'; return self::DoLoginEx($sRequestedPortalId, $bMustBeAdmin, $iOnExit); } - + /** - * Check if the user is already authentified, if yes, then performs some additional validations to redirect towards the desired "portal" + * Check if the user is already authentified, if yes, then performs some additional validations to redirect towards + * the desired "portal" + * * @param string|null $sRequestedPortalId The requested "portal" interface, null for any * @param bool $bMustBeAdmin Whether or not the user must be an admin to access the current page * @param int iOnExit What action to take if the user is not logged on (one of the class constants EXIT_...) + * + * @return int|mixed|string + * @throws \Exception */ static function DoLoginEx($sRequestedPortalId = null, $bMustBeAdmin = false, $iOnExit = self::EXIT_PROMPT) { diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index 58ab9457a..80d6dfb46 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -843,7 +843,13 @@ class SetupUtils return $aResult; } - + + /** + * @param string $sDir + * + * @return bool|float false if failure + * @uses \disk_free_space() + */ static function CheckDiskSpace($sDir) { while(($f = @disk_free_space($sDir)) == false)