]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-register.php
All database names are now 'back-ticked' and constant _MYSQL_PREFIX is wrapped. Partl...
[mailer.git] / inc / extensions / ext-register.php
index f6d025021e57e8a77d2eee856cb43d1a3bfd990b..bf9310eee882cd468d5fc357c34e74bfdab962cf 100644 (file)
@@ -58,7 +58,7 @@ 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_register' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE what='config_register' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
@@ -75,8 +75,8 @@ case "update": // Update an extension
        switch ($EXT_VER)
        {
        case "0.1": // SQL queries for v0.1
-               $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_must_register";
-               $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_must_register (
+               $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_must_register`";
+               $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_must_register` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 field_name VARCHAR(255) NOT NULL DEFAULT '',
 field_required ENUM('Y','N') NOT NULL DEFAULT 'Y',
@@ -84,22 +84,22 @@ PRIMARY KEY(id)
 ) TYPE=MyISAM";
 
                // Add all entries as required (DO NOT DELETE THEM FROM DATABASE!)
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_must_register (field_name, field_required) VALUES ('surname','Y')";
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_must_register (field_name, field_required) VALUES ('family_name','Y')";
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_must_register (field_name, field_required) VALUES ('street_nr','Y')";
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_must_register (field_name, field_required) VALUES ('cntry','Y')";
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_must_register (field_name, field_required) VALUES ('zip','Y')";
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_must_register (field_name, field_required) VALUES ('city','Y')";
+               $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('surname','Y')";
+               $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('family_name','Y')";
+               $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('street_nr','Y')";
+               $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('cntry','Y')";
+               $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('zip','Y')";
+               $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('city','Y')";
 
                // Add admin menu
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter <STRONG>Profildaten &auml;ndern</STRONG> ein.', 12)";
+               $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter <strong>Profildaten &auml;ndern</strong> ein.', 12)";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Einstellbare Pflichtfelder hinzugef&uuml;gt.";
                break;
 
        case "0.1.1": // SQL queries for v0.1.1
-               $SQLs[] = "UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='Y' WHERE ext_name='register' AND ext_has_css='N' LIMIT 1";
+               $SQLs[] = "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!
                $EXT_UPDATE_DEPENDS = "sql_patches";
@@ -163,7 +163,7 @@ PRIMARY KEY(id)
 
        case "0.2.3": // SQL queries for v0.2.3
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Cookie <U>refid</U> aus Anmeldeformular entfernt.";
+               $UPDATE_NOTES = "Cookie <u>refid</u> aus Anmeldeformular entfernt.";
                break;
 
        case "0.2.4": // SQL queries for v0.2.4
@@ -173,7 +173,7 @@ PRIMARY KEY(id)
 
        case "0.2.5": // SQL queries for v0.2.5
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Seit <A href=\"#\">Patch 340</A> &uuml;berfl&uuml;ssige HTML-Tags entfernt.";
+               $UPDATE_NOTES = "Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.";
                break;
 
        case "0.2.6": // SQL queries for v0.2.6
@@ -188,7 +188,7 @@ PRIMARY KEY(id)
 
        case "0.2.8": // SQL queries for v0.2.8
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Parse error in <U>what-register.php</U> beseitigt.";
+               $UPDATE_NOTES = "Parse error in <u>what-register.php</u> beseitigt.";
                break;
 
        case "0.2.9": // SQL queries for v0.2.9
@@ -198,7 +198,7 @@ PRIMARY KEY(id)
 
        case "0.3.0": // SQL queries for v0.3.0
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "W&ouml;rter <STRONG>Mailtausch</STRONG>, <STRONG>Mailtausches</STRONG> und <STRONG>Mailtauscher</STRONG> sind austauschbar.";
+               $UPDATE_NOTES = "W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.";
                break;
 
        case "0.3.1": // SQL queries for v0.3.1
@@ -208,9 +208,9 @@ PRIMARY KEY(id)
 
        case "0.3.2": // SQL queries for v0.3.2
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Einbindung der Erweiterung <STRONG>country</STRONG>, die Sie sich noch optional von <A href=\"".URL."/modules.php?module=admin&amp;what=extensions&amp;do=search\">meiner Seite herunterladen</A> m&uuml;ssen.<br />
+               $UPDATE_NOTES = "Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <a href=\"{!URL!}/modules.php?module=admin&amp;what=extensions&amp;do=search\">meiner Seite herunterladen</a> m&uuml;ssen.<br />
 <br />
-<STRONG>Wichtig: Laden Sie noch das Template <STRONG>guest_register.tpl</STRONG> mit hoch, welches unter templates/".GET_LANGUAGE()."/html/guest/ zu finden ist!</STRONG>";
+<strong>Wichtig: Laden Sie noch das Template <strong>guest_register.tpl</strong> mit hoch, welches unter templates/".GET_LANGUAGE()."/html/guest/ zu finden ist!</strong>";
 
                // Depends on 'country'
                $EXT_UPDATE_DEPENDS = "country";
@@ -223,7 +223,7 @@ PRIMARY KEY(id)
 
        case "0.3.4": // SQL queries for v0.3.4
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Auf Grund der Integration der neue Erweiterung <STRONG>country</STRONG> in die Anmeldephase klappte die Anmeldung nicht. Die dazu n&uuml;tige Verkn&uuml;pfung ist nun eingebaut und die Anmeldung klappt wieder. Vielen Dank nochmals an den Bug-Reporter (Fehlermelder)!";
+               $UPDATE_NOTES = "Auf Grund der Integration der neue Erweiterung <strong>country</strong> in die Anmeldephase klappte die Anmeldung nicht. Die dazu n&uuml;tige Verkn&uuml;pfung ist nun eingebaut und die Anmeldung klappt wieder. Vielen Dank nochmals an den Bug-Reporter (Fehlermelder)!";
                break;
 
        case "0.3.5": // SQL queries for v0.3.5
@@ -233,12 +233,12 @@ PRIMARY KEY(id)
 
        case "0.3.6": // SQL queries for v0.3.6
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Fehlermeldung <STRONG>Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190</STRONG> beseitigt.";
+               $UPDATE_NOTES = "Fehlermeldung <strong>Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190</strong> beseitigt.";
                break;
 
        case "0.3.7": // SQL queries for v0.3.7
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Fehlermeldung <STRONG>Fatal error: Call to undefined function: get_curr_theme<U>e</U>() in /../../guest/what-register.php on line 190</STRONG> beseitigt.";
+               $UPDATE_NOTES = "Fehlermeldung <strong>Fatal error: Call to undefined function: get_curr_theme<u>e</u>() in /../../guest/what-register.php on line 190</strong> beseitigt.";
                break;
 
        case "0.3.8": // SQL queries for v0.3.8
@@ -262,16 +262,16 @@ PRIMARY KEY(id)
                break;
 
        case "0.4.2": // SQL queries for v0.4.2
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'";
-               $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='config_register2' WHERE what='config_reg' LIMIT 1";
+               $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'";
+               $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET what='config_register2' WHERE what='config_reg' LIMIT 1";
 
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das &Auml;ndern des Templates <STRONG>templates/".GET_LANGUAGE()."/html/guest/guest_register.tpl</STRONG> ist nicht mehr n&ouml;tig.";
+               $UPDATE_NOTES = "Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das &Auml;ndern des Templates <strong>templates/".GET_LANGUAGE()."/html/guest/guest_register.tpl</strong> ist nicht mehr n&ouml;tig.";
                break;
 
        case "0.4.3": // SQL queries for v0.4.3
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Parser-Error in <STRONG>inc/modules/guest/what-register.php</STRONG> beseitigt.";
+               $UPDATE_NOTES = "Parser-Error in <strong>inc/modules/guest/what-register.php</strong> beseitigt.";
                break;
 
        case "0.4.4": // SQL queries for v0.4.4
@@ -281,22 +281,22 @@ PRIMARY KEY(id)
 
        case "0.4.5": // SQL queries for v0.4.5
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "if-Anweisungen auf Funktion <STRONG>empty()</STRONG> umgestellt.";
+               $UPDATE_NOTES = "if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.";
                break;
 
        case "0.4.6": // SQL queries for v0.4.6
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Einstellung nach ".POINTS."-Einstellungen verlagert.";
+               $UPDATE_NOTES = "Einstellung nach {!POINTS!}-Einstellungen verlagert.";
                break;
 
        case "0.4.7": // SQL queries for v0.4.7
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "<STRONG>set_session()</STRONG> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.";
+               $UPDATE_NOTES = "<strong>set_session()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.";
                break;
 
        case "0.4.8": // SQL queries for v0.4.8
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Hash-Erstellung von <STRONG>md5()</STRONG> auf bessere Funktion <STRONG>generateHash()</STRONG> umgestellt.";
+               $UPDATE_NOTES = "Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.";
                break;
 
        case "0.4.9": // SQL queries for v0.4.9
@@ -311,7 +311,7 @@ PRIMARY KEY(id)
 
        case "0.5.1": // SQL queries for v0.5.1
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Mail-Template <strong>register-member.tpl</strong> gefixt. Danke an <A href=\"http://forum.mxchange.org/profile-59.html\" target=\"_blank\" title=\"Mitgliedsprofil aufrufen\">wliepe</A> f&uuml;r die Fehlerfindung!";
+               $UPDATE_NOTES = "Mail-Template <strong>register-member.tpl</strong> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-59.html\" target=\"_blank\" title=\"Mitgliedsprofil aufrufen\">wliepe</a> f&uuml;r die Fehlerfindung!";
                break;
 
        case "0.5.2": // SQL queries for v0.5.2
@@ -321,12 +321,12 @@ PRIMARY KEY(id)
        }
        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;
 }
 
-// Language file prefix
-$EXT_LANG_PREFIX = "register";
-
 //
 ?>