Fix business attributes in the XML structure

This commit is contained in:
Romain Neutron
2012-08-29 14:12:59 +02:00
parent 1cca981ac1
commit 7262de6b5d
2 changed files with 3 additions and 1 deletions

View File

@@ -393,7 +393,7 @@ class databox extends base
public static function create(appbox &$appbox, connection_pdo &$connection, \SplFileInfo $data_template, registryInterface $registry) public static function create(appbox &$appbox, connection_pdo &$connection, \SplFileInfo $data_template, registryInterface $registry)
{ {
if ( ! file_exists($data_template->getRealPath())) { if ( ! file_exists($data_template->getRealPath())) {
throw new \InvalidArgumentException(); throw new \InvalidArgumentException($data_template->getRealPath() . " does not exist");
} }
$credentials = $connection->get_credentials(); $credentials = $connection->get_credentials();
@@ -866,6 +866,7 @@ class databox extends base
->set_indexable(isset($field['index']) ? $field['index'] : '1') ->set_indexable(isset($field['index']) ? $field['index'] : '1')
->set_separator(isset($field['separator']) ? $field['separator'] : '') ->set_separator(isset($field['separator']) ? $field['separator'] : '')
->set_required((isset($field['required']) && $field['required'] == 1)) ->set_required((isset($field['required']) && $field['required'] == 1))
->set_business((isset($field['business']) && $field['business'] == 1))
->set_type($type) ->set_type($type)
->set_tbranch(isset($field['tbranch']) ? $field['tbranch'] : '') ->set_tbranch(isset($field['tbranch']) ? $field['tbranch'] : '')
->set_thumbtitle(isset($field['thumbtitle']) ? $field['thumbtitle'] : (isset($field['thumbTitle']) ? $field['thumbTitle'] : '0')) ->set_thumbtitle(isset($field['thumbtitle']) ? $field['thumbtitle'] : (isset($field['thumbTitle']) ? $field['thumbTitle'] : '0'))

View File

@@ -392,6 +392,7 @@ class databox_field implements cache_cacheableInterface
$meta->setAttribute('required', $this->required ? '1' : '0'); $meta->setAttribute('required', $this->required ? '1' : '0');
$meta->setAttribute('multi', $this->multi ? '1' : '0'); $meta->setAttribute('multi', $this->multi ? '1' : '0');
$meta->setAttribute('report', $this->report ? '1' : '0'); $meta->setAttribute('report', $this->report ? '1' : '0');
$meta->setAttribute('business', $this->Business ? '1' : '0');
$meta->setAttribute('type', $this->type); $meta->setAttribute('type', $this->type);
$meta->setAttribute('tbranch', $this->tbranch); $meta->setAttribute('tbranch', $this->tbranch);
if ($this->multi) { if ($this->multi) {