X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-active.php;h=89541f5506a554ef5e6b86e843e036815b4c7c6b;hb=5ef42cb239e9225f160f5963a718f14bc70a1866;hp=44627a50c46f952b400649a68c55eaa7e1c8309b;hpb=e2148142f8b1a8f40fd6e7ca32185569c5a9083e;p=mailer.git diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index 44627a50c4..89541f5506 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -14,11 +14,10 @@ * $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 * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -39,18 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // Version number setThisExtensionVersion('0.0.9'); -// Version history array (add more with , '0.1.0' and so on) -setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9')); +// Version history array (add more with , '0.0.1' and so on) +setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9')); switch (getExtensionMode()) { - case 'register': // Do stuff when installation is running (modules.php?module=admin is called) + case 'register': // Do stuff when installation is running // SQL commands to run - addGuestMenuSql('main','active','Heute Online','N','Y',10); + addGuestMenuSql('main', 'active', 'Heute Online', 10); break; case 'remove': // Do stuff when removing extension @@ -59,17 +58,17 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_active'"); // Unregister filter - unregisterFilter('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, getExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'online_extra_links', 'ADD_LINK_ACTIVE_LIST', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='N' WHERE `what`='active' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N',`locked`='N' WHERE `what`='active' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='active' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N',`locked`='Y' WHERE `what`='active' LIMIT 1"); break; case 'update': // Update an extension @@ -95,8 +94,8 @@ switch (getExtensionMode()) { break; case '0.0.5': // SQL queries for v0.0.5 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); - addAdminMenuSql('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (Heute Online im Gastbereich) vornehmen.', 8); + addConfigAddSql('active_limit', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 10'); + addAdminMenuSql('setup', 'config_active', 'Aktiv-Liste', 'Einstellungen an der Aktiv-Liste (Heute Online im Gastbereich) vornehmen.', 8); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Aktiven-Liste im Gastbereich ist nun einschränkbar."); @@ -118,31 +117,31 @@ switch (getExtensionMode()) { break; case '0.0.9': // SQL queries for v0.0.9 - // Make update depending on 'online' - addExtensionUpdateDependency('online'); + // Make update depending on ext-online + addExtensionDependency('online'); // Register filter - registerFilter('online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, getExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'online_extra_links', 'ADD_LINK_ACTIVE_LIST', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter für den "Wer ist Online" Block hinzugefügt und ist von online 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 - 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] ?>