# HG changeset patch # User Matti Hamalainen # Date 1571038419 -10800 # Node ID 24e6915fc0fb432e3b274f1654e90e9cad6e3378 # Parent 51f24cb35fc8089f49489dfc8ee368d8184f4446 Move database field length definitions from msite.inc.php to dbdefs.inc.php diff -r 51f24cb35fc8 -r 24e6915fc0fb dbdefs.inc.php --- a/dbdefs.inc.php Mon Oct 14 10:31:39 2019 +0300 +++ b/dbdefs.inc.php Mon Oct 14 10:33:39 2019 +0300 @@ -3,6 +3,39 @@ $dbVersion = 31; // +// Define sizes of database fields, see createdb.php +// and also the places where input is validated. +// +define("SQL_LEN_USERNAME", 32); +define("SQL_LEN_GROUPS", 64); +define("SQL_LEN_ONELINER", 64); +define("SQL_LEN_EMAIL", 80); +define("SQL_LEN_REGHOST", 128); + +define("SQL_LEN_NEWS_TITLE", 128); +define("SQL_LEN_NEWS_TEXT", 4096); +define("SQL_LEN_NEWS_AUTHOR", 64); + +define("SQL_LEN_COMPO_NAME", 128); +define("SQL_LEN_COMPO_DESC", 4096); +define("SQL_LEN_COMPO_NOTES", 4096); +define("SQL_LEN_COMPO_PATH", 128); + +define("SQL_LEN_ENTRY_NAME", 64); +define("SQL_LEN_ENTRY_AUTHOR", 64); +define("SQL_LEN_ENTRY_FILENAME", 128); +define("SQL_LEN_ENTRY_INFO", 50*4); +define("SQL_LEN_ENTRY_NOTES", 1024); +define("SQL_LEN_ENTRY_PREVIEW_FILE", 128); + +define("SQL_LEN_DISP_SLIDE_TITLE", 64); +define("SQL_LEN_DISP_SLIDE_TEXT", 4096); +define("SQL_LEN_ROT_LIST_NAME", 128); + +define("SQL_LEN_USERKEY", 64); + + +// // Site settings and defaults we put in // $siteSettingsGroups = [ diff -r 51f24cb35fc8 -r 24e6915fc0fb managedb.php --- a/managedb.php Mon Oct 14 10:31:39 2019 +0300 +++ b/managedb.php Mon Oct 14 10:33:39 2019 +0300 @@ -14,7 +14,6 @@ require_once "mconfig.inc.php"; require_once "msite.inc.php"; -require_once "dbdefs.inc.php"; stCheckCLIExec(); diff -r 51f24cb35fc8 -r 24e6915fc0fb msite.inc.php --- a/msite.inc.php Mon Oct 14 10:31:39 2019 +0300 +++ b/msite.inc.php Mon Oct 14 10:33:39 2019 +0300 @@ -5,6 +5,7 @@ // (C) Copyright 2012-2017 Tecnic Software productions (TNSP) // require_once "msitegen.inc.php"; +require_once "dbdefs.inc.php"; // Define modes of party information display system define("SMODE_DISABLED", 0); @@ -12,35 +13,6 @@ define("SMODE_COMPO", 2); -// Define sizes of database fields, see createdb.php -// and also the places where input is validated. -define("SQL_LEN_USERNAME", 32); -define("SQL_LEN_GROUPS", 64); -define("SQL_LEN_ONELINER", 64); -define("SQL_LEN_EMAIL", 80); -define("SQL_LEN_REGHOST", 128); - -define("SQL_LEN_NEWS_TITLE", 128); -define("SQL_LEN_NEWS_TEXT", 4096); -define("SQL_LEN_NEWS_AUTHOR", 64); - -define("SQL_LEN_COMPO_NAME", 128); -define("SQL_LEN_COMPO_DESC", 4096); -define("SQL_LEN_COMPO_NOTES", 4096); -define("SQL_LEN_COMPO_PATH", 128); - -define("SQL_LEN_ENTRY_NAME", 64); -define("SQL_LEN_ENTRY_AUTHOR", 64); -define("SQL_LEN_ENTRY_FILENAME", 128); -define("SQL_LEN_ENTRY_INFO", 50*4); -define("SQL_LEN_ENTRY_NOTES", 1024); -define("SQL_LEN_ENTRY_PREVIEW_FILE", 128); - -define("SQL_LEN_DISP_SLIDE_TITLE", 64); -define("SQL_LEN_DISP_SLIDE_TEXT", 4096); -define("SQL_LEN_ROT_LIST_NAME", 128); - -define("SQL_LEN_USERKEY", 64); //