mirror of
https://github.com/Karaka-Management/oms-Search.git
synced 2026-01-11 18:48:41 +00:00
impl. more static translations
This commit is contained in:
parent
d56703b28c
commit
96b40d999a
|
|
@ -51,21 +51,21 @@ final class Installer extends InstallerAbstract
|
||||||
* @param DatabasePool $dbPool Database pool
|
* @param DatabasePool $dbPool Database pool
|
||||||
* @param array $data Module info
|
* @param array $data Module info
|
||||||
*
|
*
|
||||||
* @return void
|
* @return array
|
||||||
*
|
*
|
||||||
* @throws PathException This exception is thrown if the Search install file couldn't be found
|
* @throws PathException This exception is thrown if the Search install file couldn't be found
|
||||||
* @throws \Exception This exception is thrown if the Search install file is invalid json
|
* @throws \Exception This exception is thrown if the Search install file is invalid json
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public static function installExternal(DatabasePool $dbPool, array $data) : void
|
public static function installExternal(DatabasePool $dbPool, array $data) : array
|
||||||
{
|
{
|
||||||
if (!\file_exists(__DIR__ . '/../SearchCommands.php')) {
|
if (!\file_exists(__DIR__ . '/../SearchCommands.php')) {
|
||||||
\file_put_contents(__DIR__ . '/../SearchCommands.php', '<?php return [];');
|
\file_put_contents(__DIR__ . '/../SearchCommands.php', '<?php return [];');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!\file_exists($data['path'] ?? '')) {
|
if (!\file_exists($data['path'] ?? '')) {
|
||||||
return;
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!\file_exists(__DIR__ . '/../SearchCommands.php')) {
|
if (!\file_exists(__DIR__ . '/../SearchCommands.php')) {
|
||||||
|
|
@ -84,5 +84,7 @@ final class Installer extends InstallerAbstract
|
||||||
$appRoutes = \array_merge_recursive($appRoutes, $moduleRoutes);
|
$appRoutes = \array_merge_recursive($appRoutes, $moduleRoutes);
|
||||||
|
|
||||||
\file_put_contents(__DIR__ . '/../SearchCommands.php', '<?php return ' . ArrayParser::serializeArray($appRoutes) . ';', \LOCK_EX);
|
\file_put_contents(__DIR__ . '/../SearchCommands.php', '<?php return ' . ArrayParser::serializeArray($appRoutes) . ';', \LOCK_EX);
|
||||||
|
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user