From 5b0d513d846a787285baa062db26da2879077df6 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 7 Mar 2015 00:19:12 +0100 Subject: [PATCH] Renamed some paths and a class for better understanding them: - Classes in 'databases' were backend classes (doing the hard work) so it got renamed to 'backend' - Classes in 'wrapper' were frontend classes (which classes from e.g. the "business logic" may use) so it got renamed to 'frontend' - To both above renames there are already proper "base" classes - Renamed 'LocalFileDatabase' to 'CachedLocalFileDatabase' as the entire (!) result is stored in $resultData. This is maybe fine for small tables but never good for tables with a lot rows (I don't want to name a number here). - TODOs.txt updated MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- docs/TODOs.txt | 4 ++-- .../main/database/{databases => backend}/.htaccess | 0 .../class_CachedLocalFileDatabase.php} | 10 +++++----- .../main/database/{wrapper => frontend}/.htaccess | 0 .../class_NewsDatabaseWrapper.php | 0 .../class_PaymentsDatabaseWrapper.php | 0 .../class_UserDatabaseWrapper.php | 0 .../class_UserPointsDatabaseWrapper.php | 0 inc/config.php | 2 +- 9 files changed, 8 insertions(+), 8 deletions(-) rename inc/classes/main/database/{databases => backend}/.htaccess (100%) rename inc/classes/main/database/{databases/class_LocalFileDatabase.php => backend/class_CachedLocalFileDatabase.php} (98%) rename inc/classes/main/database/{wrapper => frontend}/.htaccess (100%) rename inc/classes/main/database/{wrapper => frontend}/class_NewsDatabaseWrapper.php (100%) rename inc/classes/main/database/{wrapper => frontend}/class_PaymentsDatabaseWrapper.php (100%) rename inc/classes/main/database/{wrapper => frontend}/class_UserDatabaseWrapper.php (100%) rename inc/classes/main/database/{wrapper => frontend}/class_UserPointsDatabaseWrapper.php (100%) diff --git a/docs/TODOs.txt b/docs/TODOs.txt index ae078e4d..48f5efec 100644 --- a/docs/TODOs.txt +++ b/docs/TODOs.txt @@ -31,8 +31,8 @@ ./inc/classes/main/controller/web/class_WebStatusController.php:10: * @todo This controller shall still provide some headlines for sidebars ./inc/classes/main/criteria/search/class_SearchCriteria.php:102: * @todo Find a nice casting here. (int) allows until and including 32766. ./inc/classes/main/criteria/search/class_SearchCriteria.php:70: * @todo Find a nice casting here. (int) allows until and including 32766. -./inc/classes/main/database/databases/class_LocalFileDatabase.php:327: * @todo Do some checks on the database directory and files here -./inc/classes/main/database/databases/class_LocalFileDatabase.php:616: * @todo Add more generic non-public data for removal +./inc/classes/main/database/backend/class_CachedLocalFileDatabase.php:327: * @todo Do some checks on the database directory and files here +./inc/classes/main/database/backend/class_CachedLocalFileDatabase.php:616: * @todo Add more generic non-public data for removal ./inc/classes/main/decorator/template/class_XmlRewriterTemplateDecorator.php:427: * @todo Find something useful with this! ./inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php:85: * @todo 0% done ./inc/classes/main/file_directories/class_BaseFile.php:135: * @todo ~10% done? diff --git a/inc/classes/main/database/databases/.htaccess b/inc/classes/main/database/backend/.htaccess similarity index 100% rename from inc/classes/main/database/databases/.htaccess rename to inc/classes/main/database/backend/.htaccess diff --git a/inc/classes/main/database/databases/class_LocalFileDatabase.php b/inc/classes/main/database/backend/class_CachedLocalFileDatabase.php similarity index 98% rename from inc/classes/main/database/databases/class_LocalFileDatabase.php rename to inc/classes/main/database/backend/class_CachedLocalFileDatabase.php index 7f23e2ad..63f8b21d 100644 --- a/inc/classes/main/database/databases/class_LocalFileDatabase.php +++ b/inc/classes/main/database/backend/class_CachedLocalFileDatabase.php @@ -27,7 +27,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class LocalFileDatabase extends BaseDatabaseBackend implements DatabaseBackend { +class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBackend { /** * The file's extension */ @@ -70,14 +70,14 @@ class LocalFileDatabase extends BaseDatabaseBackend implements DatabaseBackend { } /** - * Create an object of LocalFileDatabase and set the save path from + * Create an object of CachedLocalFileDatabase and set the save path from * configuration for local files. * - * @return $databaseInstance An instance of LocalFileDatabase + * @return $databaseInstance An instance of CachedLocalFileDatabase */ - public static final function createLocalFileDatabase () { + public static final function createCachedLocalFileDatabase () { // Get an instance - $databaseInstance = new LocalFileDatabase(); + $databaseInstance = new CachedLocalFileDatabase(); // Get a new compressor channel instance $compressorInstance = ObjectFactory::createObjectByConfiguredName('compressor_channel_class'); diff --git a/inc/classes/main/database/wrapper/.htaccess b/inc/classes/main/database/frontend/.htaccess similarity index 100% rename from inc/classes/main/database/wrapper/.htaccess rename to inc/classes/main/database/frontend/.htaccess diff --git a/inc/classes/main/database/wrapper/class_NewsDatabaseWrapper.php b/inc/classes/main/database/frontend/class_NewsDatabaseWrapper.php similarity index 100% rename from inc/classes/main/database/wrapper/class_NewsDatabaseWrapper.php rename to inc/classes/main/database/frontend/class_NewsDatabaseWrapper.php diff --git a/inc/classes/main/database/wrapper/class_PaymentsDatabaseWrapper.php b/inc/classes/main/database/frontend/class_PaymentsDatabaseWrapper.php similarity index 100% rename from inc/classes/main/database/wrapper/class_PaymentsDatabaseWrapper.php rename to inc/classes/main/database/frontend/class_PaymentsDatabaseWrapper.php diff --git a/inc/classes/main/database/wrapper/class_UserDatabaseWrapper.php b/inc/classes/main/database/frontend/class_UserDatabaseWrapper.php similarity index 100% rename from inc/classes/main/database/wrapper/class_UserDatabaseWrapper.php rename to inc/classes/main/database/frontend/class_UserDatabaseWrapper.php diff --git a/inc/classes/main/database/wrapper/class_UserPointsDatabaseWrapper.php b/inc/classes/main/database/frontend/class_UserPointsDatabaseWrapper.php similarity index 100% rename from inc/classes/main/database/wrapper/class_UserPointsDatabaseWrapper.php rename to inc/classes/main/database/frontend/class_UserPointsDatabaseWrapper.php diff --git a/inc/config.php b/inc/config.php index 1a855b97..900225cb 100644 --- a/inc/config.php +++ b/inc/config.php @@ -327,7 +327,7 @@ $cfg->setConfigEntry('stacker_generic_max_size', 100); $cfg->setConfigEntry('stacker_current_node_max_size', 20); // CFG: LOCAL-FILE-DATABASE-CLASS -$cfg->setConfigEntry('local_file_database_class', 'LocalFileDatabase'); +$cfg->setConfigEntry('local_file_database_class', 'CachedLocalFileDatabase'); // CFG: COMPRESSOR-CHANNEL-CLASS $cfg->setConfigEntry('compressor_channel_class', 'CompressorChannel'); -- 2.39.5