mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Use fill()+save() instead of save()
This commit is contained in:
parent
6c6c7b9e1f
commit
f4efcb455e
@ -1,6 +1,7 @@
|
||||
* **Build 27x** (2015-06-xx)
|
||||
- List columns now support specifying a `default` option used when the value would otherwise be null.
|
||||
- Implement a custom autoloader for plugins that use composer. Now only one instance of composer is used, all packages are now added to a global pool to prevent double loading and the load order is respected.
|
||||
- The method signature of `Model::save()` has been fixed to match Eloquent.
|
||||
|
||||
* **Build 272** (2015-06-27)
|
||||
- Protected images and their thumbnails are now supported in the back-end.
|
||||
|
@ -915,7 +915,8 @@ class RelationController extends ControllerBehavior
|
||||
|
||||
if ($this->viewMode == 'multi') {
|
||||
$model = $this->relationModel->find($this->manageId);
|
||||
$model->save($saveData, $this->manageWidget->getSessionKey());
|
||||
$model->fill($saveData);
|
||||
$model->save(null, $this->manageWidget->getSessionKey());
|
||||
}
|
||||
elseif ($this->viewMode == 'single') {
|
||||
$this->viewWidget->setFormValues($saveData);
|
||||
|
@ -125,7 +125,8 @@ class SettingsModel extends ModelBehavior
|
||||
{
|
||||
$data = is_array($key) ? $key : [$key => $value];
|
||||
$obj = self::instance();
|
||||
return $obj->save($data);
|
||||
$obj->fill($data);
|
||||
return $obj->save();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,5 @@
|
||||
<?php namespace System\Classes;
|
||||
|
||||
use Composer\Autoload\ClassLoader as ComposerLoader;
|
||||
|
||||
/**
|
||||
* Composer manager
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user