X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-online.php;h=804e4dc9b7d50e2e5054a4648f4340344c07d22a;hb=180e58a2c8ac96a0fe9bdf30fd5f38857bdc5f33;hp=bb240f2a0e1fbf16ced3dc301044efcc14c18113;hpb=44c5b87eca387e02d33b4c0e728920aeca2a9840;p=mailer.git diff --git a/inc/extensions/ext-online.php b/inc/extensions/ext-online.php index bb240f2a0e..804e4dc9b7 100644 --- a/inc/extensions/ext-online.php +++ b/inc/extensions/ext-online.php @@ -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,15 +48,15 @@ $EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4"); 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[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_online"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_online ( -id BIGINT(20) NOT NULL AUTO_INCREMENT, +id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, sid VARCHAR(32) NOT NULL DEFAULT '', ip VARCHAR(15) NOT NULL DEFAULT '', -userid BIGINT(20) NOT NULL DEFAULT '0', -refid BIGINT(20) NOT NULL DEFAULT '0', +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +refid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', module VARCHAR(255) NOT NULL DEFAULT '', action VARCHAR(255) NOT NULL DEFAULT '', what VARCHAR(255) NOT NULL DEFAULT '', @@ -68,13 +67,13 @@ PRIMARY KEY(id), KEY(userid), KEY(refid) ) TYPE=MyISAM"; - $SQLs[]="INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('misc','usr_online','Online-Statistik','Eine Liste von derzeit "Online" Usern. Doppelte Einträge könnte auf mangelnden Cookie-Support des Browsers oder auf einen Spider hindeuten.', 1)"; + $SQLs[]="INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','usr_online','Online-Statistik','Eine Liste von derzeit "Online" Usern. Doppelte Einträge könnte auf mangelnden Cookie-Support des Browsers oder auf einen Spider hindeuten.', 1)"; break; case "remove": // Do stuff when removing extension // SQL commands to run $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_online"; - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='misc', what='usr_online' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='usr_online' LIMIT 1"; break; case "activate": // Do stuff when admin activates this extension @@ -115,11 +114,9 @@ case "update": // Update an extension default: // Do stuff when extension is loaded break; } + // Language file prefix $EXT_LANG_PREFIX = "online"; -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - // ?>