X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fextensions%2Fext-register.php;h=d6ed16780c0d162f493e82935ec4a24cbcf85988;hb=7abe06638f99ea90073779a154dd845a85376366;hp=34c95aecc4586f7c79476882a4be2d44fd57a0dc;hpb=c6838f887ab007b0d82ab9d727ba2d30b4bc5a97;p=mailer.git
diff --git a/inc/extensions/ext-register.php b/inc/extensions/ext-register.php
index 34c95aecc4..d6ed16780c 100644
--- a/inc/extensions/ext-register.php
+++ b/inc/extensions/ext-register.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, 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 *
@@ -56,10 +55,10 @@ switch (getExtensionMode()) {
case 'remove': // Do stuff when removing extension
// SQL commands to run
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_register'");
- addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_must_register`");
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_must_register`');
// Unregister a filter
- unregisterFilter('register_must_fillout', 'REGISTER_MUST_FILLOUT', false, true, getExtensionDryRun());
+ unregisterFilter(__FUNCTION__, __LINE__, 'register_must_fillout', 'REGISTER_MUST_FILLOUT', true, isExtensionDryRun());
break;
case 'activate': // Do stuff when admin activates this extension
@@ -73,10 +72,9 @@ switch (getExtensionMode()) {
break;
case 'update': // Update an extension
- switch (getCurrentExtensionVersion())
- {
+ switch (getCurrentExtensionVersion()) {
case '0.1.0': // SQL queries for v0.1
- addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_must_register`");
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_must_register`');
addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_must_register` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
field_name VARCHAR(255) NOT NULL DEFAULT '',
@@ -103,7 +101,7 @@ PRIMARY KEY (id)
addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET ext_has_css='Y' WHERE `ext_name`='register' AND ext_has_css='N' LIMIT 1");
// This update depends on sql_patches update!
- addExtensionUpdateDependency('sql_patches');
+ addExtensionDependency('sql_patches');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
@@ -111,7 +109,7 @@ PRIMARY KEY (id)
case '0.1.3': // SQL queries for v0.1.3
// This update depends on sql_patches update!
- addExtensionUpdateDependency('sql_patches');
+ addExtensionDependency('sql_patches');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Standart Referal-Id kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)");
@@ -209,12 +207,12 @@ PRIMARY KEY (id)
case '0.3.2': // SQL queries for v0.3.2
// Update notes (these will be set as task text!)
- setExtensionUpdateNotes("Einbindung der Erweiterung country, die Sie sich noch optional von meiner Seite herunterladen müssen.
+ setExtensionUpdateNotes("Einbindung der Erweiterung country, die Sie sich noch optional von meiner Seite herunterladen müssen.
Wichtig: Laden Sie noch das Template guest_register.tpl mit hoch, welches unter templates/".getLanguage()."/html/guest/ zu finden ist!");
// Depends on 'country'
- addExtensionUpdateDependency('country');
+ addExtensionDependency('country');
break;
case '0.3.3': // SQL queries for v0.3.3
@@ -321,7 +319,7 @@ PRIMARY KEY (id)
case '0.5.3': // SQL queries for v0.5.3
// Register a filter
- registerFilter('register_must_fillout', 'REGISTER_MUST_FILLOUT', false, true, getExtensionDryRun());
+ registerFilter('register_must_fillout', 'REGISTER_MUST_FILLOUT', false, true, isExtensionDryRun());
// Run these SQLs
addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('gender','Y')");
@@ -353,7 +351,7 @@ PRIMARY KEY (id)
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