]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-active.php
Refback will be payed now (user cannot setup currently)
[mailer.git] / inc / extensions / ext-active.php
index d85309ce5e35613271f84913b901b7c50a4f53cd..82f8c63625bbe0169876a290d1f97e8d3d29e421 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);
 }
@@ -51,10 +50,10 @@ switch ($EXT_LOAD_MODE)
 {
 case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
        // SQL commands to run
-       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort, visible, locked) VALUES ('main', 'active', 'Heute Online', 10, 'N', 'Y')";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')";
 
        // Load CSS file?
-       $EXT_CSS = 'Y';
+       $EXT_CSS = "Y";
        break;
 
 case "remove": // Do stuff when removing extension
@@ -93,12 +92,12 @@ case "update": // Update an extension
 
        case "0.0.4": // SQL queries for v0.0.4
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Seit <A href=\"".SERVER_URL."/patches/340-Gast_Mitgliedsmenue_Deaktivieren.zip\">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.0.5": // SQL queries for v0.0.5
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD active_limit bigint(20) not null default '10'";
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('setup', 'config_active', 'Aktiv-Liste', 'Einstellungen an der Aktiv-Liste (<STRONG>Heute Online</STRONG> im Gastbereich) vornehmen.', 8)";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'";
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (<STRONG>Heute Online</STRONG> im Gastbereich) vornehmen.', 8)";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Aktiven-Liste im Gastbereich ist nun einschr&auml;nkbar.";
@@ -122,16 +121,14 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $DUMMY = LOAD_CONFIG("0");
-       $CONFIG['active_limit'] = $DUMMY['active_limit']; // Only display X most active users for today
-       unset($DUMMY);
        break;
 }
+
 // Language file prefix
 $EXT_LANG_PREFIX = "active";
 
 // Extension is always active?
-$EXT_ALWAYS_ACTIVE = 'N';
+$EXT_ALWAYS_ACTIVE = "N";
 
 //
 ?>