changeset 1114:51f24cb35fc8

s/SET_LEN_/SQL_LEN_/g
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 14 Oct 2019 10:31:39 +0300
parents 824e78624715
children 24e6915fc0fb
files admajax.php dbdefs.inc.php msite.inc.php msitegen.inc.php pages/register.inc.php
diffstat 5 files changed, 90 insertions(+), 90 deletions(-) [+]
line wrap: on
line diff
--- a/admajax.php	Mon Oct 14 10:31:20 2019 +0300
+++ b/admajax.php	Mon Oct 14 10:31:39 2019 +0300
@@ -24,11 +24,11 @@
 
   stChkRequestItemFail("name", $fake, $res,
     array(CHK_ISGT, VT_STR, 0, "Compo name is empty."),
-    array(CHK_LTEQ, VT_STR, SET_LEN_COMPO_NAME, "Compo name too long (%1 chars, must be less than %2)."));
+    array(CHK_LTEQ, VT_STR, SQL_LEN_COMPO_NAME, "Compo name too long (%1 chars, must be less than %2)."));
 
   stChkRequestItemFail("description", $fake, $res,
     array(CHK_ISGT, VT_STR, 10, "Compo description too short (%1 chars, must be more than %2)"),
-    array(CHK_LTEQ, VT_STR, SET_LEN_COMPO_DESC, "Compo description too long (%1 chars, must be less than %2)."));
+    array(CHK_LTEQ, VT_STR, SQL_LEN_COMPO_DESC, "Compo description too long (%1 chars, must be less than %2)."));
 
   // Not a full check?
   if (!$full)
@@ -49,7 +49,7 @@
         array(CHK_ARRAY_KEY, $previewTypeList, "Invalid preview type value."));
 
       stChkRequestItemFail("cpath", $fake, $res,
-        array(CHK_LTEQ, VT_STR, SET_LEN_COMPO_PATH, "Compo file path too long (%1 chars, must be less than %2)."));
+        array(CHK_LTEQ, VT_STR, SQL_LEN_COMPO_PATH, "Compo file path too long (%1 chars, must be less than %2)."));
       break;
   }
 
@@ -67,11 +67,11 @@
   // Things common for all compo types
   stChkRequestItemFail("name", $fake, $res,
     array(CHK_ISGT, VT_STR, 0, "Name is empty."),
-    array(CHK_LTEQ, VT_STR, SET_LEN_ENTRY_NAME, "Name too long (%1 chars, must be less than %2)."));
+    array(CHK_LTEQ, VT_STR, SQL_LEN_ENTRY_NAME, "Name too long (%1 chars, must be less than %2)."));
 
   stChkRequestItemFail("notes", $fake, $res,
     array(CHK_TYPE, VT_TEXT, "Invalid data."),
-    array(CHK_LTEQ, VT_STR, SET_LEN_ENTRY_NOTES, "Entry notes are too long (%1 chars, must be less than %2)."));
+    array(CHK_LTEQ, VT_STR, SQL_LEN_ENTRY_NOTES, "Entry notes are too long (%1 chars, must be less than %2)."));
 
   // Check based on compo type
   switch ($ctype)
@@ -82,11 +82,11 @@
 
       stChkRequestItemFail("author", $fake, $res,
         array(CHK_ISGT, VT_STR, 0, "Author name not set."),
-        array(CHK_LTEQ, VT_STR, SET_LEN_ENTRY_AUTHOR, "Entry author too long (%1 chars, must be less than %2)."));
+        array(CHK_LTEQ, VT_STR, SQL_LEN_ENTRY_AUTHOR, "Entry author too long (%1 chars, must be less than %2)."));
 
       stChkRequestItemFail("info", $fake, $res,
         array(CHK_TYPE, VT_TEXT, "Invalid data."),
-        array(CHK_LTEQ, VT_STR, SET_LEN_ENTRY_INFO, "Entry info text too long (%1 chars, must be less than %2)."));
+        array(CHK_LTEQ, VT_STR, SQL_LEN_ENTRY_INFO, "Entry info text too long (%1 chars, must be less than %2)."));
 
       if ($full)
       {
@@ -118,15 +118,15 @@
 
   stChkRequestItemFail("text", $fake, $res,
     array(CHK_ISGT, VT_STR, 0, "News text too short."),
-    array(CHK_LTEQ, VT_STR, SET_LEN_NEWS_TEXT, "News text too long (%1 chars, must be less than %2)."));
+    array(CHK_LTEQ, VT_STR, SQL_LEN_NEWS_TEXT, "News text too long (%1 chars, must be less than %2)."));
 
   stChkRequestItemFail("author", $fake, $res,
     array(CHK_ISGT, VT_STR, 0, "News author name not set."),
-    array(CHK_LTEQ, VT_STR, SET_LEN_NEWS_AUTHOR, "News author name too long (%1 chars, must be less than %2)."));
+    array(CHK_LTEQ, VT_STR, SQL_LEN_NEWS_AUTHOR, "News author name too long (%1 chars, must be less than %2)."));
 
   stChkRequestItemFail("title", $fake, $res,
     array(CHK_ISGT, VT_STR, 0, "News title not set."),
-    array(CHK_LTEQ, VT_STR, SET_LEN_NEWS_TITLE, "News title too long (%1 chars. must be less than %2)."));
+    array(CHK_LTEQ, VT_STR, SQL_LEN_NEWS_TITLE, "News title too long (%1 chars. must be less than %2)."));
 
   return $res;
 }
@@ -140,7 +140,7 @@
   {
     case COMPO_NORMAL:
       $str1 = 
-        "  File path: ".stGetFormTextInput(40, SET_LEN_COMPO_PATH, "cpath", $id, $prefix, $item["cpath"])."<br />\n";
+        "  File path: ".stGetFormTextInput(40, SQL_LEN_COMPO_PATH, "cpath", $id, $prefix, $item["cpath"])."<br />\n";
 
       $str2 =
         "  ".stGetFormCheckBoxInput("voting", $id, $prefix, $item["voting"],
@@ -158,7 +158,7 @@
     "  <h2>#".$id." - ".chentities($item["name"])."</h2>\n".
     "  Type: ".stGetFormOptionListFromArray($prefix."type".$id, "  ", FALSE, $compoModeData, $item["ctype"], 0, 0, "updateCompoType(".$id.")").
     " - ".$compoModeData[$item["ctype"]][1]."<br />\n".
-    "  Name: ".stGetFormTextInput(40, SET_LEN_COMPO_NAME, "name", $id, $prefix, $item["name"])."<br />\n".
+    "  Name: ".stGetFormTextInput(40, SQL_LEN_COMPO_NAME, "name", $id, $prefix, $item["name"])."<br />\n".
     $str1.
     "<div class=\"compoDesc\"><h3>Description</h3>".stGetFormTextArea(8, 60, "description", $id, $prefix, $item["description"])."</div>\n".
     "<div class=\"compoDesc\"><h3>Notes (shown in results)</h3>".stGetFormTextArea(8, 60, "notes", $id, $prefix, $item["notes"])."</div>\n".
@@ -175,10 +175,10 @@
 {
   return
     "  <h2>".chentities($item["title"])."</h2>\n".
-    "  ".stGetFormTextInput(40, SET_LEN_NEWS_TITLE, "title", $id, $prefix, $item["title"]).
+    "  ".stGetFormTextInput(40, SQL_LEN_NEWS_TITLE, "title", $id, $prefix, $item["title"]).
     " - posted ".date("d M Y / H:i", $item["utime"])."<br />\n".
     "  ".stGetFormTextArea(5, 60, "text", $id, $prefix, $item["text"])."<br />\n".
-    "  ".stGetFormTextInput(20, SET_LEN_NEWS_AUTHOR, "author",  $id, $prefix, $item["author"])."\n".
+    "  ".stGetFormTextInput(20, SQL_LEN_NEWS_AUTHOR, "author",  $id, $prefix, $item["author"])."\n".
     "  ".stGetFormButtonInput("", "upd".$id, $prefix, "Update", "updateNews(".$id.")")."\n".
     "  ".stGetFormButtonInput("", "del".$id, $prefix, "Delete", "deleteNews(".$id.")")."\n";
 }
@@ -267,8 +267,8 @@
     case COMPO_NORMAL:
       echo
       "   <div class=\"entryCell entryBasic\">\n".
-      "   ".stGetEditFormTextInput($mode, "Name", 20, SET_LEN_ENTRY_NAME, "name", $eid, $prefix, $item["name"])."\n".
-      "   ".stGetEditFormTextInput($mode, "Author", 20, SET_LEN_ENTRY_AUTHOR, "author", $eid, $prefix, $item["author"])."\n".
+      "   ".stGetEditFormTextInput($mode, "Name", 20, SQL_LEN_ENTRY_NAME, "name", $eid, $prefix, $item["name"])."\n".
+      "   ".stGetEditFormTextInput($mode, "Author", 20, SQL_LEN_ENTRY_AUTHOR, "author", $eid, $prefix, $item["author"])."\n".
       "   </div>\n".
       "   <div class=\"entryCell entryFiles\">\n".
       ($mode == 2 ? "Files can be uploaded after adding the entry" : "").
@@ -332,10 +332,10 @@
     case COMPO_ASSIGN:
       echo
       "   <div class=\"entryCell entryBase\">".
-      stGetEditFormTextInput($mode, "Name", 15, SET_LEN_ENTRY_AUTHOR, "name", $eid, $prefix, $item["name"]).
+      stGetEditFormTextInput($mode, "Name", 15, SQL_LEN_ENTRY_AUTHOR, "name", $eid, $prefix, $item["name"]).
       "</div>\n".
       "   <div class=\"entryCell entryEvalue\">".
-      stGetEditFormTextInput($mode, $compoModeData[$compo["ctype"]][2], 5, SET_LEN_ENTRY_AUTHOR, "evalue", $eid, $prefix, $item["evalue"]).
+      stGetEditFormTextInput($mode, $compoModeData[$compo["ctype"]][2], 5, SQL_LEN_ENTRY_AUTHOR, "evalue", $eid, $prefix, $item["evalue"]).
       "</div>\n".
       "   <div class=\"entryCell entryNotes\">\n".
       "    ".stGetEditFormTextArea($mode, "Notes", 2, 30, "notes", $eid, $prefix, $item["notes"])."\n".
@@ -610,7 +610,7 @@
   $str =
     ($outer ? $indent."<div class=\"ctrlBox\" id=\"ctrlRotationListEdit\">\n" : "").
     $indent."  <div class=\"ctrlTitle\">Edit rotation list</div>\n".
-    $indent."  ".stGetFormTextInput(30, SET_LEN_ROT_LIST_NAME, "", "ctrlEDRotationListName", "", $data["name"])."\n".
+    $indent."  ".stGetFormTextInput(30, SQL_LEN_ROT_LIST_NAME, "", "ctrlEDRotationListName", "", $data["name"])."\n".
     $indent."  ".stGetFormButtonInput("updname", "", "", "Save", "updateRotationList(".$list_id.")")."\n".
     "<div>Available slides:</div>\n".
     stGetFormOptionListStart("ctrlEDDisplaySlides", $indent."  ", TRUE);
@@ -692,7 +692,7 @@
   if (($slide = stFetchSQL($sql)) !== FALSE)
   {
     $str .=
-      "    ".stGetFormTextInput(40, SET_LEN_DISP_SLIDE_TITLE, "", "Title", $prefix, $slide["title"])."<br />\n".
+      "    ".stGetFormTextInput(40, SQL_LEN_DISP_SLIDE_TITLE, "", "Title", $prefix, $slide["title"])."<br />\n".
       "    ".stGetFormTextArea(10, 80, "", "Text", $prefix, $slide["text"])."<br />\n";
   }
 
@@ -1057,10 +1057,10 @@
         if (stChkRequestItem("id", $slide_id, array(CHK_TYPE, VT_INT, "Invalid data.")) &&
             stChkRequestItem("title", $fake,
               array(CHK_GTEQ, VT_STR, 1, "Slide title too short."),
-              array(CHK_LTEQ, VT_STR, SET_LEN_DISP_SLIDE_TITLE, "Slide title too long.")
+              array(CHK_LTEQ, VT_STR, SQL_LEN_DISP_SLIDE_TITLE, "Slide title too long.")
             ) &&
             stChkRequestItem("text", $fake,
-              array(CHK_LTEQ, VT_STR, SET_LEN_DISP_SLIDE_TEXT, "Slide content too long.")
+              array(CHK_LTEQ, VT_STR, SQL_LEN_DISP_SLIDE_TEXT, "Slide content too long.")
             ))
         {
           $sql = stPrepareSQLUpdate("display_slides",
@@ -1106,7 +1106,7 @@
         if (stChkRequestItem("id", $list_id, array(CHK_TYPE, VT_INT, "Invalid data.")) &&
             stChkRequestItem("name", $fake,
               array(CHK_GTEQ, VT_STR, 3, "Rotation list name too short."),
-              array(CHK_LTEQ, VT_STR, SET_LEN_ROT_LIST_NAME, "Rotation list name too long.")))
+              array(CHK_LTEQ, VT_STR, SQL_LEN_ROT_LIST_NAME, "Rotation list name too long.")))
         {
           $sql = stPrepareSQLUpdate("rot_list_data",
             "WHERE id=".$list_id,
@@ -1325,9 +1325,9 @@
       case "news":
         echo
           "<form method=\"post\" action=\"\" onsubmit=\"return addNews()\">\n".
-          "  ".stGetFormTextInput(40, SET_LEN_NEWS_TITLE, "", "nntitle", "", "")."<br />\n".
+          "  ".stGetFormTextInput(40, SQL_LEN_NEWS_TITLE, "", "nntitle", "", "")."<br />\n".
           "  ".stGetFormTextArea(5, 60, "", "nntext", "", "")."<br />\n".
-          "  ".stGetFormTextInput(20, SET_LEN_NEWS_AUTHOR, "", "nnauthor", "", "orgaz")."\n".
+          "  ".stGetFormTextInput(20, SQL_LEN_NEWS_AUTHOR, "", "nnauthor", "", "orgaz")."\n".
           "  ".stGetFormSubmitInput("nnadd", "Add post")."\n".
           "  ".stGetFormButtonInput("", "", "", "Clear", "this.form.reset()")."\n".
           "</form>\n".
@@ -1367,10 +1367,10 @@
           "  <th>Actions</th>\n".
           " </tr>\n".
           " <tr>\n".
-          "  <td>".stGetFormTextInput(20, SET_LEN_USERNAME, "name", "x", $prefix, "")."</td>\n".
-          "  <td>".stGetFormTextInput(20, SET_LEN_GROUPS,   "groups", "x", $prefix, "")."</td>\n".
-          "  <td>".stGetFormTextInput(30, SET_LEN_ONELINER, "oneliner", "x", $prefix, "")."</td>\n".
-          "  <td>".stGetFormTextInput(20, SET_LEN_EMAIL,    "email", "x", $prefix, "")."</td>\n".
+          "  <td>".stGetFormTextInput(20, SQL_LEN_USERNAME, "name", "x", $prefix, "")."</td>\n".
+          "  <td>".stGetFormTextInput(20, SQL_LEN_GROUPS,   "groups", "x", $prefix, "")."</td>\n".
+          "  <td>".stGetFormTextInput(30, SQL_LEN_ONELINER, "oneliner", "x", $prefix, "")."</td>\n".
+          "  <td>".stGetFormTextInput(20, SQL_LEN_EMAIL,    "email", "x", $prefix, "")."</td>\n".
           "  <td>".stGetFormButtonInput("add", "", $prefix, " Add new ", "addAttendee()")."</td>\n".
           " </tr>\n".
           "</table>\n".
@@ -1531,7 +1531,7 @@
         echo
           "<form method=\"post\" action=\"\" onsubmit=\"return addCompo()\">\n".
           "<b>Name:<b>".
-          "  ".stGetFormTextInput(64, SET_LEN_COMPO_NAME, "", "ncname", "", "")."<br />\n".
+          "  ".stGetFormTextInput(64, SQL_LEN_COMPO_NAME, "", "ncname", "", "")."<br />\n".
           "<b>Description:</b>".
           "  ".stGetFormTextArea(5, 60, "", "ncdescription", "", "")."<br />\n".
           "  ".stGetFormSubmitInput("nccompo", "Add compo")."\n".
--- a/dbdefs.inc.php	Mon Oct 14 10:31:20 2019 +0300
+++ b/dbdefs.inc.php	Mon Oct 14 10:31:39 2019 +0300
@@ -141,17 +141,17 @@
   "news" => [
     ["id"           , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
     ["utime"        , "INT"],
-    ["title"        , "VARCHAR(".SET_LEN_NEWS_TITLE.")"],
-    ["text"         , "VARCHAR(".SET_LEN_NEWS_TEXT.")"],
-    ["author"       , "VARCHAR(".SET_LEN_NEWS_AUTHOR.")"],
+    ["title"        , "VARCHAR(".SQL_LEN_NEWS_TITLE.")"],
+    ["text"         , "VARCHAR(".SQL_LEN_NEWS_TEXT.")"],
+    ["author"       , "VARCHAR(".SQL_LEN_NEWS_AUTHOR.")"],
     ["persist"      , "INT", "DEFAULT 0"],
   ],
 
   "compos" => [
     ["id"           , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
-    ["name"         , "VARCHAR(".SET_LEN_COMPO_NAME.")"],
-    ["description"  , "VARCHAR(".SET_LEN_COMPO_DESC.")"],
-    ["notes"        , "VARCHAR(".SET_LEN_COMPO_NOTES.")"],
+    ["name"         , "VARCHAR(".SQL_LEN_COMPO_NAME.")"],
+    ["description"  , "VARCHAR(".SQL_LEN_COMPO_DESC.")"],
+    ["notes"        , "VARCHAR(".SQL_LEN_COMPO_NOTES.")"],
     ["visible"      , "INT", "DEFAULT 0"],
     ["voting"       , "INT", "DEFAULT 0"],
     
@@ -164,17 +164,17 @@
     // For COMPO_POINTS and COMPO_ASSIGN, show on results page or not
     
     ["ctype"        , "INT", "DEFAULT 0"],
-    ["cpath"        , "VARCHAR(".SET_LEN_COMPO_PATH.")"],
+    ["cpath"        , "VARCHAR(".SQL_LEN_COMPO_PATH.")"],
   ],
   
   "entries" => [
     ["id"           , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
     ["show_id"      , "INT", "DEFAULT 0"],
-    ["name"         , "VARCHAR(".SET_LEN_ENTRY_NAME.")"],
-    ["author"       , "VARCHAR(".SET_LEN_ENTRY_AUTHOR.")"],
+    ["name"         , "VARCHAR(".SQL_LEN_ENTRY_NAME.")"],
+    ["author"       , "VARCHAR(".SQL_LEN_ENTRY_AUTHOR.")"],
     ["compo_id"     , "INT", "DEFAULT 0"],
-    ["info"         , "VARCHAR(".SET_LEN_ENTRY_INFO.")", "DEFAULT NULL"],
-    ["notes"        , "VARCHAR(".SET_LEN_ENTRY_NOTES.")", "DEFAULT NULL"],
+    ["info"         , "VARCHAR(".SQL_LEN_ENTRY_INFO.")", "DEFAULT NULL"],
+    ["notes"        , "VARCHAR(".SQL_LEN_ENTRY_NOTES.")", "DEFAULT NULL"],
     ["flags"        , "INT", "DEFAULT 0"],
     ["evalue"       , "INT", "DEFAULT 0"],
     ["file_id"      , "INT", "DEFAULT 0"], // uploaded file id from "files" table
@@ -186,8 +186,8 @@
 
   "files" => [
     ["id"           , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
-    ["filename"     , "VARCHAR(".SET_LEN_ENTRY_FILENAME.")", "DEFAULT NULL"], // stored filename
-    ["origname"     , "VARCHAR(".SET_LEN_ENTRY_FILENAME.")", "DEFAULT NULL"], // original uploaded filename
+    ["filename"     , "VARCHAR(".SQL_LEN_ENTRY_FILENAME.")", "DEFAULT NULL"], // stored filename
+    ["origname"     , "VARCHAR(".SQL_LEN_ENTRY_FILENAME.")", "DEFAULT NULL"], // original uploaded filename
     ["filetype"     , "VARCHAR(32)", "DEFAULT NULL"], // type of the file, if any, as key from $fileTypeData
     ["uploadtype"   , "VARCHAR(32)", "DEFAULT NULL"], // "preview", "entry"
     ["filesize"     , "INT", "DEFAULT 0"], // uploaded size
@@ -200,11 +200,11 @@
   "attendees" => [
     ["id"           , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
     ["regtime"      , "INT"],
-    ["name"         , "VARCHAR(".SET_LEN_USERNAME.")"],
-    ["groups"       , "VARCHAR(".SET_LEN_GROUPS.")"],
-    ["oneliner"     , "VARCHAR(".SET_LEN_ONELINER.")"],
-    ["email"        , "VARCHAR(".SET_LEN_EMAIL.")"],
-    ["reghost"      , "VARCHAR(".SET_LEN_REGHOST.")", "DEFAULT NULL"],
+    ["name"         , "VARCHAR(".SQL_LEN_USERNAME.")"],
+    ["groups"       , "VARCHAR(".SQL_LEN_GROUPS.")"],
+    ["oneliner"     , "VARCHAR(".SQL_LEN_ONELINER.")"],
+    ["email"        , "VARCHAR(".SQL_LEN_EMAIL.")"],
+    ["reghost"      , "VARCHAR(".SQL_LEN_REGHOST.")", "DEFAULT NULL"],
     ["key_id"       , "INT", "DEFAULT NULL"],
     ["usr_flags"    , "INT", "DEFAULT 0"],
     ["adm_flags"    , "INT", "DEFAULT 0"],
@@ -212,7 +212,7 @@
 
   "userkeys" => [
     ["id"           , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
-    ["key"          , "VARCHAR(".SET_LEN_USERKEY.")"],
+    ["key"          , "VARCHAR(".SQL_LEN_USERKEY.")"],
     ["active"       , "INT", "DEFAULT 0"],
   ],
 
@@ -237,13 +237,13 @@
 
   "display_slides" => [
     ["id"           , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
-    ["title"        , "VARCHAR(".SET_LEN_DISP_SLIDE_TITLE.")"],
-    ["text"         , "VARCHAR(".SET_LEN_DISP_SLIDE_TEXT.")"],
+    ["title"        , "VARCHAR(".SQL_LEN_DISP_SLIDE_TITLE.")"],
+    ["text"         , "VARCHAR(".SQL_LEN_DISP_SLIDE_TEXT.")"],
   ],
 
   "rot_list_data" => [
     ["id"           , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
-    ["name"         , "VARCHAR(".SET_LEN_ROT_LIST_NAME.")"],
+    ["name"         , "VARCHAR(".SQL_LEN_ROT_LIST_NAME.")"],
   ],
   
   "rot_list_slides" => [
--- a/msite.inc.php	Mon Oct 14 10:31:20 2019 +0300
+++ b/msite.inc.php	Mon Oct 14 10:31:39 2019 +0300
@@ -14,33 +14,33 @@
 
 // Define sizes of database fields, see createdb.php
 // and also the places where input is validated.
-define("SET_LEN_USERNAME", 32);
-define("SET_LEN_GROUPS", 64);
-define("SET_LEN_ONELINER", 64);
-define("SET_LEN_EMAIL", 80);
-define("SET_LEN_REGHOST", 128);
+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("SET_LEN_NEWS_TITLE", 128);
-define("SET_LEN_NEWS_TEXT", 4096);
-define("SET_LEN_NEWS_AUTHOR", 64);
+define("SQL_LEN_NEWS_TITLE", 128);
+define("SQL_LEN_NEWS_TEXT", 4096);
+define("SQL_LEN_NEWS_AUTHOR", 64);
 
-define("SET_LEN_COMPO_NAME", 128);
-define("SET_LEN_COMPO_DESC", 4096);
-define("SET_LEN_COMPO_NOTES", 4096);
-define("SET_LEN_COMPO_PATH", 128);
+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("SET_LEN_ENTRY_NAME", 64);
-define("SET_LEN_ENTRY_AUTHOR", 64);
-define("SET_LEN_ENTRY_FILENAME", 128);
-define("SET_LEN_ENTRY_INFO", 50*4);
-define("SET_LEN_ENTRY_NOTES", 1024);
-define("SET_LEN_ENTRY_PREVIEW_FILE", 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("SET_LEN_DISP_SLIDE_TITLE", 64);
-define("SET_LEN_DISP_SLIDE_TEXT", 4096);
-define("SET_LEN_ROT_LIST_NAME", 128);
+define("SQL_LEN_DISP_SLIDE_TITLE", 64);
+define("SQL_LEN_DISP_SLIDE_TEXT", 4096);
+define("SQL_LEN_ROT_LIST_NAME", 128);
 
-define("SET_LEN_USERKEY", 64);
+define("SQL_LEN_USERKEY", 64);
 
 
 //
@@ -427,16 +427,16 @@
   }
 
   echo
-    stGetTDFormTextInput($edit, 20, SET_LEN_USERNAME, "name", $id, $prefix, $item["name"]).
-    stGetTDFormTextInput($edit, 20, SET_LEN_GROUPS, "groups", $id, $prefix, $item["groups"]).
+    stGetTDFormTextInput($edit, 20, SQL_LEN_USERNAME, "name", $id, $prefix, $item["name"]).
+    stGetTDFormTextInput($edit, 20, SQL_LEN_GROUPS, "groups", $id, $prefix, $item["groups"]).
     "<td class=\"regtime\">".date("d.m. H:i", $item["regtime"])."</td>".
-    stGetTDFormTextInput($edit, 30, SET_LEN_ONELINER, "oneliner", $id, $prefix, $item["oneliner"], "autocomplete=\"off\"");
+    stGetTDFormTextInput($edit, 30, SQL_LEN_ONELINER, "oneliner", $id, $prefix, $item["oneliner"], "autocomplete=\"off\"");
 
   if ($full)
   {
     echo
-      stGetTDFormTextInput($edit, 15, SET_LEN_EMAIL, "email", $id, $prefix, $item["email"], "autocomplete=\"off\"").
-      stGetTDFormTextInput($edit, 15, SET_LEN_REGHOST, "reghost", $id, $prefix, $item["reghost"], "autocomplete=\"off\"");
+      stGetTDFormTextInput($edit, 15, SQL_LEN_EMAIL, "email", $id, $prefix, $item["email"], "autocomplete=\"off\"").
+      stGetTDFormTextInput($edit, 15, SQL_LEN_REGHOST, "reghost", $id, $prefix, $item["reghost"], "autocomplete=\"off\"");
 
     if ($edit)
     {
@@ -622,19 +622,19 @@
 
   if (stChkRequestItem("name", $name,
       array(CHK_ISGT, VT_STR, 0, "Handle / name not given."),
-      array(CHK_LTEQ, VT_STR, SET_LEN_USERNAME, "Handle / name is too long, should be less than ".SET_LEN_USERNAME." characters.")))
+      array(CHK_LTEQ, VT_STR, SQL_LEN_USERNAME, "Handle / name is too long, should be less than ".SQL_LEN_USERNAME." characters.")))
     $chk++;
   else
     $res = FALSE;
 
   if (stChkRequestItem("groups", $groups,
-      array(CHK_LTEQ, VT_STR, SET_LEN_GROUPS, "Groups are too long, should be less than ".SET_LEN_GROUPS." characters.")))
+      array(CHK_LTEQ, VT_STR, SQL_LEN_GROUPS, "Groups are too long, should be less than ".SQL_LEN_GROUPS." characters.")))
     $chk++;
   else
     $res = FALSE;
 
   if (!stChkRequestItem("oneliner", $oneliner,
-      array(CHK_LTEQ, VT_STR, SET_LEN_ONELINER, "Oneliner is too long, should be less than ".SET_LEN_ONELINER." characters.")))
+      array(CHK_LTEQ, VT_STR, SQL_LEN_ONELINER, "Oneliner is too long, should be less than ".SQL_LEN_ONELINER." characters.")))
     $res = FALSE;
 
   $email = stGetRequestItem("email");
@@ -650,9 +650,9 @@
     $res = FALSE;
   }
   else
-  if (strlen($email) > SET_LEN_EMAIL)
+  if (strlen($email) > SQL_LEN_EMAIL)
   {
-    stError("E-mail address too long, max ".SET_LEN_EMAIL." characters.");
+    stError("E-mail address too long, max ".SQL_LEN_EMAIL." characters.");
     $res = FALSE;
   }
   else
--- a/msitegen.inc.php	Mon Oct 14 10:31:20 2019 +0300
+++ b/msitegen.inc.php	Mon Oct 14 10:31:39 2019 +0300
@@ -380,8 +380,8 @@
 //  stChkRequestItem("name", FALSE,
 //    array(CHK_ISGT, VT_STR, 0, "Handle / name not given."),
 //    array(CHK_ISGT, VT_STR, 3, "Handle / name too short, should be 3 characters or more."),
-//    array(CHK_LTEQ, VT_STR, SET_LEN_USERNAME, "Handle / name is too long, should be less than ".SET_LEN_USERNAME." characters."),
-//    array(CHK_RANGE, VT_STR, array(3, SET_LEN_USERNAME), "Ulululu!"),
+//    array(CHK_LTEQ, VT_STR, SQL_LEN_USERNAME, "Handle / name is too long, should be less than ".SQL_LEN_USERNAME." characters."),
+//    array(CHK_RANGE, VT_STR, array(3, SQL_LEN_USERNAME), "Ulululu!"),
 //                             ^- ranges specified as array of MIN and MAX values (inclusive)
 //
 //    array(CHK_CUSTOM, VT_STR, function($value) { return FALSE; }, "Error! Error!"),
--- a/pages/register.inc.php	Mon Oct 14 10:31:20 2019 +0300
+++ b/pages/register.inc.php	Mon Oct 14 10:31:39 2019 +0300
@@ -170,10 +170,10 @@
     " ".stGetFormHiddenInput("mode", "check")."\n".
     " ".stGetFormHiddenInput("hash", $botCheckHash)."\n".
     " <table class=\"register\">\n";
-    stPrintFormTextInput("Handle:", "(who you are)", 20, SET_LEN_USERNAME, "name");
-    stPrintFormTextInput("Group(s):", "(duh)", 30, SET_LEN_GROUPS, "groups");
-    stPrintFormTextInput("E-mail:", stCheckRequireEmail() ? "(required)" : "", 30, SET_LEN_EMAIL, "email");
-    stPrintFormTextInput("Oneliner:", "(leave a message here)", 30, SET_LEN_ONELINER, "oneliner");
+    stPrintFormTextInput("Handle:", "(who you are)", 20, SQL_LEN_USERNAME, "name");
+    stPrintFormTextInput("Group(s):", "(duh)", 30, SQL_LEN_GROUPS, "groups");
+    stPrintFormTextInput("E-mail:", stCheckRequireEmail() ? "(required)" : "", 30, SQL_LEN_EMAIL, "email");
+    stPrintFormTextInput("Oneliner:", "(leave a message here)", 30, SQL_LEN_ONELINER, "oneliner");
     stPrintFormTextInput(hashToCheckStr($botCheckHash)." = ", "(I.Q. / robot check".
     //" [".hashToAnswer($botCheckHash)."]".
     ")", 20, 20, "botcheck", "autocomplete=\"off\"");