Skip to content
Permalink
Browse files

Update objects.class.php

SOURCE field length fix
  • Loading branch information...
sergejey committed Mar 27, 2019
1 parent 042fc1f commit 93fb82efbfd0d45e56d5490a999eda97bec55a98
Showing with 11 additions and 4 deletions.
  1. +11 −4 modules/objects/objects.class.php
@@ -719,6 +719,9 @@ function setProperty($property, $value, $no_linked=0, $source='') {
if (!$source && $_SERVER['REQUEST_URI']) {
$source = $_SERVER['REQUEST_URI'];
}
if (strlen($source)>250) {
$source=substr($source,0,250).'...';
}
if (defined('TRACK_DATA_CHANGES') && TRACK_DATA_CHANGES==1) {
$save=1;
@@ -1070,15 +1073,15 @@ function dbInstall($data) {
pvalues: OBJECT_ID int(10) NOT NULL DEFAULT '0'
pvalues: VALUE text
pvalues: UPDATED datetime
pvalues: SOURCE varchar(20) NOT NULL DEFAULT ''
pvalues: SOURCE varchar(255) NOT NULL DEFAULT ''
pvalues: LINKED_MODULES varchar(255) NOT NULL DEFAULT ''
pvalues: INDEX (PROPERTY_ID)
pvalues: INDEX (OBJECT_ID)
pvalues: INDEX (PROPERTY_NAME)
phistory: ID int(10) unsigned NOT NULL auto_increment
phistory: VALUE_ID int(10) unsigned NOT NULL DEFAULT '0'
phistory: SOURCE varchar(20) NOT NULL DEFAULT ''
phistory: SOURCE varchar(255) NOT NULL DEFAULT ''
phistory: ADDED datetime
phistory: INDEX (VALUE_ID)
@@ -1087,12 +1090,16 @@ function dbInstall($data) {
phistory_queue: VALUE text
phistory_queue: OLD_VALUE text
phistory_queue: KEEP_HISTORY int(10) unsigned NOT NULL DEFAULT '0'
phistory_queue: SOURCE varchar(20) NOT NULL DEFAULT ''
phistory_queue: SOURCE varchar(255) NOT NULL DEFAULT ''
phistory_queue: ADDED datetime
EOD;
parent::dbInstall($data);
SQLExec("ALTER TABLE `pvalues` CHANGE `SOURCE` `SOURCE` varchar(255) NOT NULL DEFAULT ''");
SQLExec("ALTER TABLE `phistory` CHANGE `SOURCE` `SOURCE` varchar(255) NOT NULL DEFAULT ''");
SQLExec("ALTER TABLE `phistory_queue` CHANGE `SOURCE` `SOURCE` varchar(255) NOT NULL DEFAULT ''");
}
// --------------------------------------------------------------------
}

0 comments on commit 93fb82e

Please sign in to comment.
You can’t perform that action at this time.