X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-cache.php;h=fd920a839c66da74adc42308f6b1f4244c3560bb;hb=b8e38719844932afed4b1ac23755a4c05b72eb99;hp=a53cb55f9973cb1c5895fbe563cee064ce301724;hpb=039203d5428c9c6a3bed61fb3a9a16958c6fd44c;p=mailer.git diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index a53cb55f99..fd920a839c 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -15,10 +15,9 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009 - 2011 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -61,15 +60,15 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('cache_stats','config_config')"); // Unregister all filters - unregisterFilter('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, getExtensionDryRun()); - unregisterFilter('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, getExtensionDryRun()); - unregisterFilter('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, getExtensionDryRun()); - unregisterFilter('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, getExtensionDryRun()); - unregisterFilter('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, getExtensionDryRun()); - unregisterFilter('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, getExtensionDryRun()); - unregisterFilter('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, getExtensionDryRun()); - unregisterFilter('extension_remove', 'CACHE_DESTROY_ALL', true, getExtensionDryRun()); - unregisterFilter('shutdown', 'CACHE_DESTROY_FILTER', true, getExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'post_form_submited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'post_form_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'post_form_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'extension_remove', 'CACHE_DESTROY_ALL', true, isExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'shutdown', 'CACHE_DESTROY_FILTER', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -122,8 +121,8 @@ switch (getExtensionMode()) { break; case '0.0.7': // SQL queries for v0.0.7 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql("db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql("cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); addAdminMenuSql('stats','cache_stats','DB-Cache','Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4); // Update notes (these will be set as task text!) @@ -192,7 +191,7 @@ switch (getExtensionMode()) { case '0.2.0': // SQL queries for v0.2.0 // This update depends on sql_patches - addExtensionUpdateDependency('sql_patches'); + addExtensionDependency('sql_patches'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Die Erweiterung hängt nun von der sql_patches ab."); @@ -200,14 +199,14 @@ switch (getExtensionMode()) { case '0.2.1': // SQL queries for v0.2.1 // Register the new filter - registerFilter('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, getExtensionDryRun()); - registerFilter('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, getExtensionDryRun()); - registerFilter('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, getExtensionDryRun()); - registerFilter('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, getExtensionDryRun()); - registerFilter('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, getExtensionDryRun()); - registerFilter('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, getExtensionDryRun()); - registerFilter('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, getExtensionDryRun()); - registerFilter('extension_remove', 'CACHE_DESTROY_ALL', false, true, getExtensionDryRun()); + registerFilter('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); + registerFilter('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); + registerFilter('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); + registerFilter('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); + registerFilter('post_form_submited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); + registerFilter('post_form_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); + registerFilter('post_form_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); + registerFilter('extension_remove', 'CACHE_DESTROY_ALL', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter für Erweiterungsmanagement hinzugefügt."); @@ -219,13 +218,13 @@ switch (getExtensionMode()) { break; case '0.2.3': // SQL queries for v0.2.3 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD cache_filter ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql("cache_filter ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Cachen von Filtern hinzugefügt."); // Register a new filter - registerFilter('shutdown', 'CACHE_DESTROY_FILTER', false, true, getExtensionDryRun()); + registerFilter('shutdown', 'CACHE_DESTROY_FILTER', false, true, isExtensionDryRun()); break; case '0.2.4': // SQL queries for v0.2.4 @@ -256,14 +255,14 @@ switch (getExtensionMode()) { case 'modify': // When the extension got modified break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + case 'test': // For testing purposes break; case 'init': // Do stuff when extension is initialized break; default: // Unknown extension mode - logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); break; }