changeset 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 d5847f016de5
files dbdefs.inc.php managedb.php msite.inc.php
diffstat 3 files changed, 34 insertions(+), 30 deletions(-) [+]
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 = [
--- 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();
 
--- 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);
 
 
 //