Merge branch 4.0

This commit is contained in:
Thibaud Fabre
2016-12-05 15:26:48 +01:00
parent f6700fbe12
commit b5bbb1851f
315 changed files with 6552 additions and 29445 deletions

View File

@@ -564,6 +564,18 @@ class databox_field implements cache_cacheableInterface
return $this;
}
/**
*
* @param boolean $bool
* @return databox_field
*/
public function set_multi($bool)
{
$this->multi = (bool)$bool;
$this->separator = self::checkMultiSeparator($this->separator, $this->multi);
return $this;
}
/**
* Set a vocabulary
*
@@ -892,7 +904,7 @@ class databox_field implements cache_cacheableInterface
*
* @throws \Exception_InvalidArgument
*/
public static function create(Application $app, databox $databox, $name, $multi)
public static function create(Application $app, databox $databox, $name)
{
$sorter = 0;
@@ -911,8 +923,8 @@ class databox_field implements cache_cacheableInterface
`thumbtitle`, `multi`, `business`, `aggregable`,
`report`, `sorter`, `separator`)
VALUES (null, :name, '', 0, 0, 1, 'string', '',
null, :multi,
0, 0, 1, :sorter, '')";
null, 0, 0, 0,
1, :sorter, '')";
$name = self::generateName($name);
@@ -920,10 +932,8 @@ class databox_field implements cache_cacheableInterface
throw new \Exception_InvalidArgument();
}
$multi = $multi ? 1 : 0;
$stmt = $databox->get_connection()->prepare($sql);
$stmt->execute([':name' => $name, ':sorter' => $sorter, ':multi' => $multi]);
$stmt->execute([':name' => $name, ':sorter' => $sorter]);
$id = $databox->get_connection()->lastInsertId();
$stmt->closeCursor();