bugfix obj/arr-problem

This commit is contained in:
Gerald Raab
2016-11-04 13:52:55 +01:00
parent 24e63e7024
commit 2d2c236391
+4 -4
View File
@@ -3,16 +3,16 @@
/*
* MimeType widget
*/
class mimetype_widget extends Widget
class mimetype_widget extends Widget
{
public function display($data)
public function display($data)
{
if (is_null($data['mimetype']))
$data['mimetype'] = '';
$this->load->model('system/Vorlage_model');
$res = $this->Vorlage_model->getMimeTypes();
//var_dump($res);
foreach ($res->retval->result() as $obj)
foreach ($res->retval as $obj)
{
$item = array('name' => $obj->mimetype, 'value' => $obj->mimetype);
if (isset($data['mimetype']) && $obj->mimetype == $data['mimetype'])
@@ -23,5 +23,5 @@ class mimetype_widget extends Widget
}
$this->view('widgets/mimetype', $data);
}
}