-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplified initialization logic by removing unnecessary path manipula…
…tion and improving error message clarity.
- Loading branch information
1 parent
f45a4d5
commit cb368f6
Showing
1 changed file
with
3 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* anyStores for Contao Open Source CMS | ||
* | ||
* @copyright (c) 2015 - 2016 Tastaturberuf <[email protected]> | ||
* @copyright (c) 2015 - 2025 Tastaturberuf <[email protected]> | ||
* @author Daniel Jahnsmüller <[email protected]> | ||
* @license http://opensource.org/licenses/lgpl-3.0.html | ||
* @package anyStores | ||
|
@@ -16,15 +16,11 @@ | |
define('TL_MODE', 'FE'); | ||
define('TL_SCRIPT', __FILE__); | ||
|
||
$file = dirname(__DIR__) . 'initialize.php'; | ||
|
||
$remove = 'modules' . DIRECTORY_SEPARATOR . 'anyStores'; | ||
|
||
$file = str_replace($remove, '', $file); | ||
$file = str_replace('vendor/tastaturberuf/anystores', 'system/initialize.php', dirname(__DIR__)); | ||
|
||
if (!file_exists($file)) { | ||
http_response_code(404); | ||
die('404 Not Found. Have you renamed the module folder? MUST be `anyStores`.'); | ||
die('404 Not Found'); | ||
} | ||
|
||
require $file; | ||
|