From c085dd45543def1d9fdc641f3f38dc08faf6c505 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 23 Dec 2022 01:34:14 +0100 Subject: [PATCH] Continued: - removed .htaccess - updated exception handler - remove deprecated "?>" - updated copyright year MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- application/.htaccess | 1 - application/lfdb2/.htaccess | 1 - application/lfdb2/classes/.htaccess | 1 - application/lfdb2/classes/command/.htaccess | 1 - .../lfdb2/classes/command/console/.htaccess | 1 - .../class_Lfdb2ConsoleServerCommand.php | 5 +- .../lfdb2/classes/controller/.htaccess | 1 - .../classes/controller/console/.htaccess | 1 - ...lass_Lfdb2ConsoleDefaultNewsController.php | 7 +-- application/lfdb2/classes/filter/.htaccess | 1 - .../lfdb2/classes/filter/bootstrap/.htaccess | 1 - .../classes/filter/bootstrap/server/.htaccess | 1 - ...erverBootstrapExtraBootstrappingFilter.php | 3 - ...lass_ServerBootstrapListenerPoolFilter.php | 5 +- .../classes/filter/class_BaseLfdb2Filter.php | 9 +-- .../classes/filter/class_BaseServerFilter.php | 5 +- .../lfdb2/classes/filter/server/.htaccess | 1 - .../class_ServerInitializationFilter.php | 5 +- .../class_ServerPhpRequirementsFilter.php | 9 +-- .../class_ServerWelcomeTeaserFilter.php | 3 - .../lfdb2/classes/filter/shutdown/.htaccess | 1 - .../classes/filter/shutdown/server/.htaccess | 1 - .../class_ServerShutdownServerFilter.php | 5 +- .../class_ServerShutdownTaskHandlerFilter.php | 5 +- .../lfdb2/classes/filter/task/.htaccess | 1 - .../classes/filter/task/server/.htaccess | 1 - ...ass_ServerTaskHandlerInitializerFilter.php | 5 +- application/lfdb2/classes/resolver/.htaccess | 1 - .../lfdb2/classes/resolver/command/.htaccess | 1 - .../resolver/command/console/.htaccess | 1 - .../class_Lfdb2ConsoleCommandResolver.php | 5 +- .../classes/resolver/controller/.htaccess | 1 - .../resolver/controller/console/.htaccess | 1 - .../class_Lfdb2ConsoleControllerResolver.php | 7 +-- application/lfdb2/config.php | 5 +- application/lfdb2/debug.php | 5 +- application/lfdb2/exceptions.php | 60 ++++++++++++------- application/lfdb2/exceptions/.htaccess | 1 - application/lfdb2/interfaces/.htaccess | 1 - application/lfdb2/templates/.htaccess | 1 - db/.htaccess | 1 - db/news/.htaccess | 1 - db/payments/.htaccess | 1 - db/user/.htaccess | 1 - db/user_points/.htaccess | 1 - 45 files changed, 57 insertions(+), 119 deletions(-) delete mode 100644 application/.htaccess delete mode 100644 application/lfdb2/.htaccess delete mode 100644 application/lfdb2/classes/.htaccess delete mode 100644 application/lfdb2/classes/command/.htaccess delete mode 100644 application/lfdb2/classes/command/console/.htaccess delete mode 100644 application/lfdb2/classes/controller/.htaccess delete mode 100644 application/lfdb2/classes/controller/console/.htaccess delete mode 100644 application/lfdb2/classes/filter/.htaccess delete mode 100644 application/lfdb2/classes/filter/bootstrap/.htaccess delete mode 100644 application/lfdb2/classes/filter/bootstrap/server/.htaccess delete mode 100644 application/lfdb2/classes/filter/server/.htaccess delete mode 100644 application/lfdb2/classes/filter/shutdown/.htaccess delete mode 100644 application/lfdb2/classes/filter/shutdown/server/.htaccess delete mode 100644 application/lfdb2/classes/filter/task/.htaccess delete mode 100644 application/lfdb2/classes/filter/task/server/.htaccess delete mode 100644 application/lfdb2/classes/resolver/.htaccess delete mode 100644 application/lfdb2/classes/resolver/command/.htaccess delete mode 100644 application/lfdb2/classes/resolver/command/console/.htaccess delete mode 100644 application/lfdb2/classes/resolver/controller/.htaccess delete mode 100644 application/lfdb2/classes/resolver/controller/console/.htaccess delete mode 100644 application/lfdb2/exceptions/.htaccess delete mode 100644 application/lfdb2/interfaces/.htaccess delete mode 100644 application/lfdb2/templates/.htaccess delete mode 100644 db/.htaccess delete mode 100644 db/news/.htaccess delete mode 100644 db/payments/.htaccess delete mode 100644 db/user/.htaccess delete mode 100644 db/user_points/.htaccess diff --git a/application/.htaccess b/application/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/.htaccess b/application/lfdb2/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/.htaccess b/application/lfdb2/classes/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/command/.htaccess b/application/lfdb2/classes/command/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/command/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/command/console/.htaccess b/application/lfdb2/classes/command/console/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/command/console/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/command/console/class_Lfdb2ConsoleServerCommand.php b/application/lfdb2/classes/command/console/class_Lfdb2ConsoleServerCommand.php index 017c8d8..e04c3d5 100644 --- a/application/lfdb2/classes/command/console/class_Lfdb2ConsoleServerCommand.php +++ b/application/lfdb2/classes/command/console/class_Lfdb2ConsoleServerCommand.php @@ -99,7 +99,7 @@ class Lfdb2ConsoleServerCommand extends BaseCommand implements Commandable { while (($serverInstance->isServerActive()) && ($handlerInstance->hasTasksLeft())) { // Handle all tasks here $handlerInstance->handleTasks(); - } // END - while + } // Debug message self::createDebugInstance(__CLASS__)->debugOutput('MAIN: --- Leaving main loop. ---'); @@ -133,6 +133,3 @@ class Lfdb2ConsoleServerCommand extends BaseCommand implements Commandable { $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('server_shutdown_server_filter')); } } - -// [EOF] -?> diff --git a/application/lfdb2/classes/controller/.htaccess b/application/lfdb2/classes/controller/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/controller/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/controller/console/.htaccess b/application/lfdb2/classes/controller/console/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/controller/console/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/controller/console/class_Lfdb2ConsoleDefaultNewsController.php b/application/lfdb2/classes/controller/console/class_Lfdb2ConsoleDefaultNewsController.php index 5ec1b9d..8425c6b 100644 --- a/application/lfdb2/classes/controller/console/class_Lfdb2ConsoleDefaultNewsController.php +++ b/application/lfdb2/classes/controller/console/class_Lfdb2ConsoleDefaultNewsController.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2013 LFDB2 Developer Team + * @copyright Copyright (c) 2013-2022 LFDB2 Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -34,7 +34,7 @@ class Lfdb2ConsoleDefaultNewsController extends BaseController implements Contro // Init additional filter chains foreach (array('bootstrap', 'activation','shutdown') as $filterChain) { $this->initFilterChain($filterChain); - } // END - foreach + } } /** @@ -151,6 +151,3 @@ class Lfdb2ConsoleDefaultNewsController extends BaseController implements Contro $this->executeFilters('shutdown', $requestInstance, $responseInstance); } } - -// [EOF] -?> diff --git a/application/lfdb2/classes/filter/.htaccess b/application/lfdb2/classes/filter/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/filter/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/filter/bootstrap/.htaccess b/application/lfdb2/classes/filter/bootstrap/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/filter/bootstrap/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/filter/bootstrap/server/.htaccess b/application/lfdb2/classes/filter/bootstrap/server/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/filter/bootstrap/server/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/filter/bootstrap/server/class_ServerBootstrapExtraBootstrappingFilter.php b/application/lfdb2/classes/filter/bootstrap/server/class_ServerBootstrapExtraBootstrappingFilter.php index 6dd5059..fcd38ee 100644 --- a/application/lfdb2/classes/filter/bootstrap/server/class_ServerBootstrapExtraBootstrappingFilter.php +++ b/application/lfdb2/classes/filter/bootstrap/server/class_ServerBootstrapExtraBootstrappingFilter.php @@ -61,6 +61,3 @@ class ServerBootstrapExtraBootstrappingFilter extends BaseServerFilter implement $serverInstance->doBootstrapping(); } } - -// [EOF] -?> diff --git a/application/lfdb2/classes/filter/bootstrap/server/class_ServerBootstrapListenerPoolFilter.php b/application/lfdb2/classes/filter/bootstrap/server/class_ServerBootstrapListenerPoolFilter.php index 65d496a..f14723c 100644 --- a/application/lfdb2/classes/filter/bootstrap/server/class_ServerBootstrapListenerPoolFilter.php +++ b/application/lfdb2/classes/filter/bootstrap/server/class_ServerBootstrapListenerPoolFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2013 LFDB2 Developer Team + * @copyright Copyright (c) 2013-2022 LFDB2 Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -61,6 +61,3 @@ class ServerBootstrapListenerPoolFilter extends BaseServerFilter implements Filt $serverInstance->initializeListenerPool(); } } - -// [EOF] -?> diff --git a/application/lfdb2/classes/filter/class_BaseLfdb2Filter.php b/application/lfdb2/classes/filter/class_BaseLfdb2Filter.php index 57fc2cc..1e33ebb 100644 --- a/application/lfdb2/classes/filter/class_BaseLfdb2Filter.php +++ b/application/lfdb2/classes/filter/class_BaseLfdb2Filter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2013 LFDB2 Developer Team + * @copyright Copyright (c) 2013-2022 LFDB2 Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -88,14 +88,14 @@ class BaseLfdb2Filter extends BaseFilter { // Skip this part, don't write NULLs to the array continue; - } // END - if + } // Debug message //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(str_replace('_', '-', strtoupper($messageType)) . '-TAG: key=' . $key . ',value=' . $value); // Set it now $this->dataXmlNodes[$key] = $value; - } // END - foreach + } // Construct an array for pushing it on next stack $messageArray = array( @@ -109,6 +109,3 @@ class BaseLfdb2Filter extends BaseFilter { $packageInstance->getStackerInstance()->pushNamed(NetworkPackage::STACKER_NAME_PROCESSED_MESSAGE, $messageArray); } } - -// [EOF] -?> diff --git a/application/lfdb2/classes/filter/class_BaseServerFilter.php b/application/lfdb2/classes/filter/class_BaseServerFilter.php index 2a09e5e..82e56c8 100644 --- a/application/lfdb2/classes/filter/class_BaseServerFilter.php +++ b/application/lfdb2/classes/filter/class_BaseServerFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2013 LFDB2 Developer Team + * @copyright Copyright (c) 2013-2022 LFDB2 Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -33,6 +33,3 @@ class BaseServerFilter extends BaseLfdb2Filter { parent::__construct($className); } } - -// [EOF] -?> diff --git a/application/lfdb2/classes/filter/server/.htaccess b/application/lfdb2/classes/filter/server/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/filter/server/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/filter/server/class_ServerInitializationFilter.php b/application/lfdb2/classes/filter/server/class_ServerInitializationFilter.php index 0e95f96..6ee2737 100644 --- a/application/lfdb2/classes/filter/server/class_ServerInitializationFilter.php +++ b/application/lfdb2/classes/filter/server/class_ServerInitializationFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2013 LFDB2 Developer Team + * @copyright Copyright (c) 2013-2022 LFDB2 Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -96,6 +96,3 @@ class ServerInitializationFilter extends BaseServerFilter implements Filterable //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[INIT:] Server ' . $nodeMode . ' has been added to registry.'); } } - -// [EOF] -?> diff --git a/application/lfdb2/classes/filter/server/class_ServerPhpRequirementsFilter.php b/application/lfdb2/classes/filter/server/class_ServerPhpRequirementsFilter.php index 9c7c0be..65f8d01 100644 --- a/application/lfdb2/classes/filter/server/class_ServerPhpRequirementsFilter.php +++ b/application/lfdb2/classes/filter/server/class_ServerPhpRequirementsFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2013 LFDB2 Developer Team + * @copyright Copyright (c) 2013-2022 LFDB2 Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -64,15 +64,12 @@ class ServerPhpRequirementsFilter extends BaseServerFilter implements Filterable // Test failed $checkPassed = FALSE; $checksFailed++; - } // END -if + } // Are all tests passed? if ($checkPassed === FALSE) { // Throw an exception throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); - } // END - if + } } } - -// [EOF] -?> diff --git a/application/lfdb2/classes/filter/server/class_ServerWelcomeTeaserFilter.php b/application/lfdb2/classes/filter/server/class_ServerWelcomeTeaserFilter.php index bed3a44..fabb6af 100644 --- a/application/lfdb2/classes/filter/server/class_ServerWelcomeTeaserFilter.php +++ b/application/lfdb2/classes/filter/server/class_ServerWelcomeTeaserFilter.php @@ -62,6 +62,3 @@ class ServerWelcomeTeaserFilter extends BaseServerFilter implements Filterable { $serverInstance->outputConsoleTeaser(); } } - -// [EOF] -?> diff --git a/application/lfdb2/classes/filter/shutdown/.htaccess b/application/lfdb2/classes/filter/shutdown/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/filter/shutdown/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/filter/shutdown/server/.htaccess b/application/lfdb2/classes/filter/shutdown/server/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/filter/shutdown/server/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/filter/shutdown/server/class_ServerShutdownServerFilter.php b/application/lfdb2/classes/filter/shutdown/server/class_ServerShutdownServerFilter.php index 56b9a18..37e8ea6 100644 --- a/application/lfdb2/classes/filter/shutdown/server/class_ServerShutdownServerFilter.php +++ b/application/lfdb2/classes/filter/shutdown/server/class_ServerShutdownServerFilter.php @@ -6,7 +6,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2013 LFDB2 Developer Team + * @copyright Copyright (c) 2013-2022 LFDB2 Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -63,6 +63,3 @@ class ServerShutdownServerFilter extends BaseServerFilter implements Filterable $serverInstance->doShutdown(); } } - -// [EOF] -?> diff --git a/application/lfdb2/classes/filter/shutdown/server/class_ServerShutdownTaskHandlerFilter.php b/application/lfdb2/classes/filter/shutdown/server/class_ServerShutdownTaskHandlerFilter.php index 20cb1f0..e4b2779 100644 --- a/application/lfdb2/classes/filter/shutdown/server/class_ServerShutdownTaskHandlerFilter.php +++ b/application/lfdb2/classes/filter/shutdown/server/class_ServerShutdownTaskHandlerFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2013 LFDB2 Developer Team + * @copyright Copyright (c) 2013-2022 LFDB2 Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -62,6 +62,3 @@ class ServerShutdownTaskHandlerFilter extends BaseServerFilter implements Filter $handlerInstance->doShutdown(); } } - -// [EOF] -?> diff --git a/application/lfdb2/classes/filter/task/.htaccess b/application/lfdb2/classes/filter/task/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/filter/task/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/filter/task/server/.htaccess b/application/lfdb2/classes/filter/task/server/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/filter/task/server/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/filter/task/server/class_ServerTaskHandlerInitializerFilter.php b/application/lfdb2/classes/filter/task/server/class_ServerTaskHandlerInitializerFilter.php index cf3f171..910b24d 100644 --- a/application/lfdb2/classes/filter/task/server/class_ServerTaskHandlerInitializerFilter.php +++ b/application/lfdb2/classes/filter/task/server/class_ServerTaskHandlerInitializerFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2013 LFDB2 Developer Team + * @copyright Copyright (c) 2013-2022 LFDB2 Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -137,6 +137,3 @@ class ServerTaskHandlerInitializerFilter extends BaseServerFilter implements Fil Registry::getRegistry()->addInstance('task_handler', $handlerInstance); } } - -// [EOF] -?> diff --git a/application/lfdb2/classes/resolver/.htaccess b/application/lfdb2/classes/resolver/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/resolver/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/resolver/command/.htaccess b/application/lfdb2/classes/resolver/command/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/resolver/command/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/resolver/command/console/.htaccess b/application/lfdb2/classes/resolver/command/console/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/resolver/command/console/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/resolver/command/console/class_Lfdb2ConsoleCommandResolver.php b/application/lfdb2/classes/resolver/command/console/class_Lfdb2ConsoleCommandResolver.php index decf986..1be95ea 100644 --- a/application/lfdb2/classes/resolver/command/console/class_Lfdb2ConsoleCommandResolver.php +++ b/application/lfdb2/classes/resolver/command/console/class_Lfdb2ConsoleCommandResolver.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2013 LFDB2 Developer Team + * @copyright Copyright (c) 2013-2022 LFDB2 Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -64,6 +64,3 @@ class Lfdb2ConsoleCommandResolver extends BaseCommandResolver implements Command return $resolverInstance; } } - -// [EOF] -?> diff --git a/application/lfdb2/classes/resolver/controller/.htaccess b/application/lfdb2/classes/resolver/controller/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/resolver/controller/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/resolver/controller/console/.htaccess b/application/lfdb2/classes/resolver/controller/console/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/classes/resolver/controller/console/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/classes/resolver/controller/console/class_Lfdb2ConsoleControllerResolver.php b/application/lfdb2/classes/resolver/controller/console/class_Lfdb2ConsoleControllerResolver.php index c925880..3365dcb 100644 --- a/application/lfdb2/classes/resolver/controller/console/class_Lfdb2ConsoleControllerResolver.php +++ b/application/lfdb2/classes/resolver/controller/console/class_Lfdb2ConsoleControllerResolver.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2013 LFDB2 Developer Team + * @copyright Copyright (c) 2013-2022 LFDB2 Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -90,7 +90,7 @@ class Lfdb2ConsoleControllerResolver extends BaseControllerResolver implements C if ((!is_object($controllerInstance)) || (!$controllerInstance instanceof Controller)) { // This command has an invalid instance! throw new InvalidControllerInstanceException(array($this, $controllerName), self::EXCEPTION_INVALID_CONTROLLER); - } // END - if + } // Set last controller $this->setResolvedInstance($controllerInstance); @@ -99,6 +99,3 @@ class Lfdb2ConsoleControllerResolver extends BaseControllerResolver implements C return $controllerInstance; } } - -// [EOF] -?> diff --git a/application/lfdb2/config.php b/application/lfdb2/config.php index 4cefa0a..9016b4d 100644 --- a/application/lfdb2/config.php +++ b/application/lfdb2/config.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0 - * @copyright Copyright (c) 2013 LFDB2 Developer Team + * @copyright Copyright (c) 2013-2022 LFDB2 Developer Team * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify @@ -88,6 +88,3 @@ $cfg->setConfigEntry('server_shutdown_task_handler_filter', 'ServerShutdownTaskH // CFG: SERVER-SHUTDOWN-SERVER-FILTER $cfg->setConfigEntry('server_shutdown_server_filter', 'ServerShutdownServerFilter'); - -// [EOF] -?> diff --git a/application/lfdb2/debug.php b/application/lfdb2/debug.php index 8366fee..b5797e9 100644 --- a/application/lfdb2/debug.php +++ b/application/lfdb2/debug.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0 - * @copyright Copyright (c) 2013 LFDB2 Developer Team + * @copyright Copyright (c) 2013-2022 LFDB2 Developer Team * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify @@ -23,6 +23,3 @@ // Set error reporting error_reporting(E_ALL | E_STRICT); - -// [EOF] -?> diff --git a/application/lfdb2/exceptions.php b/application/lfdb2/exceptions.php index 24975ff..e84a25e 100644 --- a/application/lfdb2/exceptions.php +++ b/application/lfdb2/exceptions.php @@ -1,10 +1,16 @@ - * @version 0.0 - * @copyright Copyright (c) 2013 LFDB2 Developer Team + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2022 LFDB2 Developer Team * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify @@ -24,7 +30,7 @@ // The node's own exception handler function lfdb2_exception_handler ($exceptionInstance) { // Is it an object and a valid instance? - if ((is_object($exceptionInstance)) && ($exceptionInstance instanceof FrameworkException)) { + if ((is_object($exceptionInstance)) && ($exceptionInstance instanceof Exception)) { // Init variable $backTrace = ''; @@ -36,7 +42,7 @@ function lfdb2_exception_handler ($exceptionInstance) { // Convert arguments type into human-readable foreach ($traceArray['args'] as $arg) { $argsString .= ', ' . gettype($arg); - } // END - foreach + } $argsString = substr($argsString, 2); // Set missing file/line @@ -58,7 +64,7 @@ Line : %d\n", basename($traceArray['file']), $traceArray['line'] ); - } // END - foreach + } // Construct the message $message = sprintf("-------------------------------------------------------------------------------- @@ -73,9 +79,9 @@ Backtrace: -------------------------------------------------------------------------------- %s --------------------------------------------------------------------------------\n", - trim(html_entity_decode(strip_tags($exceptionInstance->__toString()))), + trim(html_entity_decode(strip_tags(get_class($exceptionInstance)))), trim(html_entity_decode(strip_tags($exceptionInstance->getMessage()))), - $exceptionInstance->getHexCode(), + ($exceptionInstance instanceof FrameworkException ? $exceptionInstance->getHexCode() : '0x' . bin2hex($exceptionInstance->getCode())), $exceptionInstance->getFile(), $exceptionInstance->getLine(), trim($backTrace) @@ -83,16 +89,21 @@ Backtrace: // Output the message print($message); + } elseif (is_object($exceptionInstance)) { + // Output more details + printf('exceptionInstance=%s', print_r($exceptionInstance, true)); } else { - // Invalid exception instance detected! Do *only* throw exceptions that - // extends our own exception 'FrameworkException' to get such nice - // outputs like above. - print('exceptionInstance[]=' . gettype($exceptionInstance) . ' is invalid! Please inform the core developer team.'); + /* + * Invalid exception instance detected! Do *only* throw exceptions that + * extends our own exception 'FrameworkException' to get such nice + * outputs like above. + */ + printf('exceptionInstance[]=%s is invalid! Please inform the core developer team.' . PHP_EOL, gettype($exceptionInstance)); } } // Error handler -function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext) { +function lfdb2_error_handler ($errno, $errstr, $errfile, $errline, array $errcontext) { // Construct the message $message = sprintf('File: %s, Line: %s, Code: %s, Message: %s', basename($errfile), @@ -103,14 +114,14 @@ function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext) // Throw an exception here throw new FatalErrorException($message, BaseFrameworkSystem::EXCEPTION_FATAL_ERROR); -} // END - function +} // Assertion handler -function __assertHandler ($file, $line, $code) { +function lfdb2_assert_handler (string $file, int $line, $code) { // Empty code? if ($code === '') { $code = 'Unknown'; - } // END - if + } // Create message $message = sprintf('File: %s, Line: %s, Code: %s', @@ -119,19 +130,22 @@ function __assertHandler ($file, $line, $code) { $code ); + // Log assert + syslog(LOG_WARNING, $message); + // Throw an exception here throw new AssertionException($message, BaseFrameworkSystem::EXCEPTION_ASSERTION_FAILED); -} // END - function +} // Set error handler -//set_error_handler('__errorHandler'); +//set_error_handler('lfdb2_error_handler'); // Set the new handler set_exception_handler('lfdb2_exception_handler'); // Init assert handling -assert_options(ASSERT_ACTIVE , TRUE); -assert_options(ASSERT_WARNING , FALSE); -assert_options(ASSERT_BAIL , TRUE); -assert_options(ASSERT_QUIET_EVAL, FALSE); -assert_options(ASSERT_CALLBACK , '__assertHandler'); +assert_options(ASSERT_ACTIVE , true); +assert_options(ASSERT_WARNING , false); +assert_options(ASSERT_BAIL , true); +assert_options(ASSERT_QUIET_EVAL, false); +assert_options(ASSERT_CALLBACK , 'lfdb2_assert_handler'); diff --git a/application/lfdb2/exceptions/.htaccess b/application/lfdb2/exceptions/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/exceptions/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/interfaces/.htaccess b/application/lfdb2/interfaces/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/interfaces/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/lfdb2/templates/.htaccess b/application/lfdb2/templates/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/lfdb2/templates/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/db/.htaccess b/db/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/db/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/db/news/.htaccess b/db/news/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/db/news/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/db/payments/.htaccess b/db/payments/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/db/payments/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/db/user/.htaccess b/db/user/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/db/user/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/db/user_points/.htaccess b/db/user_points/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/db/user_points/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all -- 2.39.5