X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-removeip.php;h=e1970b9f0f217ee9bb0bbbd3f696397106e98db9;hb=d0f0f15c27d6af49056e2658bb683a469f49db38;hp=315194edab0274751bf254521a34123ee5263923;hpb=6c763653e88b9d10627e651ca59c7201d4b7d62b;p=mailer.git diff --git a/inc/extensions/ext-removeip.php b/inc/extensions/ext-removeip.php index 315194edab..e1970b9f0f 100644 --- a/inc/extensions/ext-removeip.php +++ b/inc/extensions/ext-removeip.php @@ -38,13 +38,13 @@ if (!defined('__SECURITY')) { } // Version number -$EXT_VERSION = "0.0"; +$EXT_VERSION = "0.0.1"; // Auto-set extension version if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION; // Version history array (add more with , "0.1" and so on) -$EXT_VER_HISTORY = array("0.0"); +$EXT_VER_HISTORY = array("0.0", "0.0.1"); switch ($EXT_LOAD_MODE) { @@ -65,6 +65,9 @@ case "register": // Do stuff when installation is running (modules.php?module=ad case "remove": // Do stuff when removing extension // SQL commands to run $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_removeip' LIMIT 1"; + + // Remove filters + UNREGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, $dry_run); break; case "activate": // Do stuff when admin activates this extension @@ -79,14 +82,21 @@ case "update": // Update an extension switch ($EXT_VER) { case "0.0.1": // SQL queries for v0.0.1 - $SQLs[] = ""; + // Update depends on sql_patches + $EXT_UPDATE_DEPENDS = "sql_patches"; + + // Add filters + REGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, $dry_run); // Update notes (these will be set as task text!) - $UPDATE_NOTES = ""; + $UPDATE_NOTES = "Filter hinzugefügt und ist von sql_patches abhängig."; break; } break; +case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; + default: // Do stuff when extension is loaded break; }