X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-removeip.php;h=06a62eee4a646e2d0385fd95d158d17d639ba532;hb=506be1a75d826f083ae6133aa8236eb5eeecab0a;hp=62409efc4babad65550bab4f5126e7313173d769;hpb=c6838f887ab007b0d82ab9d727ba2d30b4bc5a97;p=mailer.git diff --git a/inc/extensions/ext-removeip.php b/inc/extensions/ext-removeip.php index 62409efc4b..06a62eee4a 100644 --- a/inc/extensions/ext-removeip.php +++ b/inc/extensions/ext-removeip.php @@ -14,10 +14,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 * @@ -39,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // Version number setThisExtensionVersion('0.0.1'); @@ -59,16 +58,16 @@ switch (getExtensionMode()) addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `anonymous_ip` ENUM('LOCAL','ZERO','RANDOM') NOT NULL DEFAULT '127.0.0.1'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `anonymous_ip` ENUM('LOCAL','ZERO','RANDOM') NOT NULL DEFAULT 'LOCAL'"); addAdminMenuSql('setup','config_removeip','Anonymität/Privatsphähre','Stellen Sie hier ein, ob die IP-Nummer, User-Agent und/oder Referer-Adresse anonymisiert im gesamten Script verwendet werden soll.',15); break; case 'remove': // Do stuff when removing extension // SQL commands to run - addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_removeip'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_removeip' LIMIT 1"); // Remove filters - unregisterFilter('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, getExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -83,30 +82,30 @@ switch (getExtensionMode()) switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update depends on sql_patches - addExtensionUpdateDependency('sql_patches'); + addExtensionDependency('sql_patches'); // Add filters - registerFilter('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, getExtensionDryRun()); + registerFilter('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefügt und ist von sql_patches abhängig."); break; - } + } // END - switch break; 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; -} +} // END - switch // [EOF] ?>