Skip to content

Commit

Permalink
=
Browse files Browse the repository at this point in the history
  • Loading branch information
Arikaim committed Jan 4, 2022
1 parent 2073849 commit 407bb75
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
open_collective: arikaim-cms
ko_fi: arikaim
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This package is part of arikaim/core package.


#### Requirements
* PHP 7.2, 7.3, 7.4
* PHP 7.3, 7.4


#### Installation
Expand Down
17 changes: 10 additions & 7 deletions RouteType.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,26 @@ public static function isAdminPage(string $url): bool
/**
* Return true if request is for installation
*
* @param string|null $uri
* @return boolean
*/
public static function isApiInstallRequest(): bool
public static function isApiInstallRequest(?string $uri = null): bool
{
$uri = $_SERVER['REQUEST_URI'] ?? '';

return (\substr($uri,-17) == 'core/api/install/');
$uri = $uri ?? $_SERVER['REQUEST_URI'] ?? '';
$path = \str_replace(BASE_PATH,'',$uri);

return (\substr($path,0,18) == '/core/api/install/');
}

/**
* Check for install page url
*
*
* @param string|null $uri
* @return boolean
*/
public static function isInstallPage(): bool
public static function isInstallPage(?string $uri = null): bool
{
$uri = $_SERVER['REQUEST_URI'] ?? '';
$uri = $uri ?? $_SERVER['REQUEST_URI'] ?? '';

return (\substr($uri,-13) == Self::INSTALL_PAGE_URL_PATH);
}
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"homepage": "http://arikaim.com"
}],
"homepage": "http://arikaim.com",
"require": {
"php": ">=7.1",
"require": {
"arikaim/interfaces": "^1.0.0"
},
"autoload": {
Expand Down

0 comments on commit 407bb75

Please sign in to comment.