diff dbdefs.inc.php @ 1115:24e6915fc0fb

Move database field length definitions from msite.inc.php to dbdefs.inc.php
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 14 Oct 2019 10:33:39 +0300
parents 51f24cb35fc8
children b2bca5f6d0ff
line wrap: on
line diff
--- 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 = [