X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-removeip.php;h=1f656ce00cb552ade4bed00c4c3a2ecbe47cff7b;hb=675778ff98b75b6c5071e2709c2d6b0af86cf79d;hp=e3ac89737d6ede8178039b54938ee7c64ae9db25;hpb=e2148142f8b1a8f40fd6e7ca32185569c5a9083e;p=mailer.git diff --git a/inc/extensions/ext-removeip.php b/inc/extensions/ext-removeip.php index e3ac89737d..1f656ce00c 100644 --- a/inc/extensions/ext-removeip.php +++ b/inc/extensions/ext-removeip.php @@ -18,6 +18,7 @@ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 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 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // Version number setThisExtensionVersion('0.0.1'); @@ -59,16 +60,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 @@ -86,12 +87,12 @@ switch (getExtensionMode()) addExtensionUpdateDependency('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 @@ -104,9 +105,9 @@ switch (getExtensionMode()) break; default: // Unknown extension mode - DEBUG_LOG(__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] ?>