diff --git a/lib/classes/databox/field.class.php b/lib/classes/databox/field.class.php
index f8573210ec..5ceeb4824e 100644
--- a/lib/classes/databox/field.class.php
+++ b/lib/classes/databox/field.class.php
@@ -98,6 +98,11 @@ class databox_field implements cache_cacheableInterface
*/
protected $thumbtitle;
+ /**
+ *
+ * @var boolean
+ */
+ protected $Business;
protected $renamed = false;
/**
@@ -157,7 +162,7 @@ class databox_field implements cache_cacheableInterface
$sql = "SELECT `thumbtitle`, `separator`
, `dces_element`, `tbranch`, `type`, `report`, `multi`, `required`
- , `readonly`, `indexable`, `name`, `src`
+ , `readonly`, `indexable`, `name`, `src`, `business`
, `VocabularyControlType`, `RestrictToVocabularyControl`
FROM metadatas_structure WHERE id=:id";
@@ -173,6 +178,7 @@ class databox_field implements cache_cacheableInterface
$this->readonly = !!$row['readonly'];
$this->required = !!$row['required'];
$this->multi = !!$row['multi'];
+ $this->Business = !!$row['business'];
$this->report = !!$row['report'];
$this->type = $row['type'] ? : self::TYPE_STRING;
$this->tbranch = $row['tbranch'];
@@ -229,6 +235,15 @@ class databox_field implements cache_cacheableInterface
return $this->VocabularyRestriction;
}
+ /**
+ *
+ * @return boolean
+ */
+ public function isBusiness()
+ {
+ return $this->Business;
+ }
+
/**
*
* @param databox $databox
@@ -327,6 +342,7 @@ class databox_field implements cache_cacheableInterface
`required` = :required,
`separator` = :separator,
`multi` = :multi,
+ `business` = :business,
`report` = :report,
`type` = :type,
`tbranch` = :tbranch,
@@ -343,6 +359,7 @@ class databox_field implements cache_cacheableInterface
':required' => $this->required ? '1' : '0',
':separator' => $this->separator,
':multi' => $this->multi ? '1' : '0',
+ ':business' => $this->Business ? '1' : '0',
':report' => $this->report ? '1' : '0',
':type' => $this->type,
':tbranch' => $this->tbranch,
@@ -535,6 +552,18 @@ class databox_field implements cache_cacheableInterface
return $this;
}
+ /**
+ *
+ * @param boolean $boolean
+ * @return databox_field
+ */
+ public function set_business($boolean)
+ {
+ $this->Business = !!$boolean;
+
+ return $this;
+ }
+
/**
*
* @param boolean $bool
@@ -811,11 +840,11 @@ class databox_field implements cache_cacheableInterface
$sql = "INSERT INTO metadatas_structure
(`id`, `name`, `src`, `readonly`, `indexable`, `type`, `tbranch`,
- `thumbtitle`, `multi`,
+ `thumbtitle`, `multi`, `business`,
`report`, `sorter`)
VALUES (null, :name, '', 0, 1, 'text', '',
null, 0,
- 1, :sorter)";
+ 0, 1, :sorter)";
$stmt = $databox->get_connection()->prepare($sql);
$stmt->execute(array(':name' => self::generateName($name), ':sorter' => $sorter));
diff --git a/lib/conf.d/bases_structure.xml b/lib/conf.d/bases_structure.xml
index e9876c89b8..80ca5b4c6e 100644
--- a/lib/conf.d/bases_structure.xml
+++ b/lib/conf.d/bases_structure.xml
@@ -5111,6 +5111,14 @@
+
+ business
+ int(1) unsigned
+
+
+
+
+
indexable
int(1) unsigned