mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Merge branch 4.0
This commit is contained in:
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user