|
@@ -210,9 +210,15 @@ Action::register('dashboard_widget_configure_form',function(&$response){
|
|
|
if(!$widget) throw new Exception('Widget introuvable');
|
|
|
$model = DashboardWidget::model($widget->model);
|
|
|
|
|
|
- $widget->meta = json_decode($widget->meta,true);
|
|
|
- if(!is_array($widget->meta)) $widget->meta = array();
|
|
|
+ if(!is_array($widget->meta)){
|
|
|
+ $widget->meta = json_decode($widget->meta,true);
|
|
|
+ if(!is_array($widget->meta)) $widget->meta = array();
|
|
|
+ }
|
|
|
|
|
|
+ if(!isset($model->configure)) $model->configure = function($widget){
|
|
|
+ echo 'Aucune configuration disponible';
|
|
|
+ return;
|
|
|
+ };
|
|
|
$configure = $model->configure;
|
|
|
$configure($widget);
|
|
|
exit();
|