]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-register.php
Templates added if user retreats an URL, tpos fixed
[mailer.git] / inc / extensions / ext-register.php
index 1d510b728dcb33997b9987a3520b0cf8c4e5b68f..26380abf2c0df83fb622bea5a1b6c6c9e23bbc2d 100644 (file)
@@ -32,8 +32,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])))
-{
+if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
@@ -49,7 +48,7 @@ $EXT_VER_HISTORY = array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.
 
 switch ($EXT_LOAD_MODE)
 {
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
        // SQL commands to run
        $SQLs[] = "";
 
@@ -59,7 +58,7 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='setup' AND 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
@@ -80,20 +79,20 @@ case "update": // Update an extension
                $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',
+field_required ENUM('Y','N') NOT NULL DEFAULT 'Y',
 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.";
@@ -114,7 +113,7 @@ PRIMARY KEY(id)
                $EXT_UPDATE_DEPENDS = "sql_patches";
 
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Standart Referral-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)";
+               $UPDATE_NOTES = "Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)";
                break;
 
        case "0.1.4": // SQL queries for v0.1.4
@@ -184,7 +183,7 @@ PRIMARY KEY(id)
 
        case "0.2.7": // SQL queries for v0.2.7
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Referral-ID wird endlich korrekt gesetzt.";
+               $UPDATE_NOTES = "Referal-ID wird endlich korrekt gesetzt.";
                break;
 
        case "0.2.8": // SQL queries for v0.2.8
@@ -287,7 +286,7 @@ PRIMARY KEY(id)
 
        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
@@ -326,11 +325,5 @@ default: // Do stuff when extension is loaded
        break;
 }
 
-// Language file prefix
-$EXT_LANG_PREFIX = "register";
-
-// Extension is always active?
-$EXT_ALWAYS_ACTIVE = "N";
-
 //
 ?>