diff --git a/admin-dev/themes/template/modules/js.tpl b/admin-dev/themes/template/modules/js.tpl index 7635726f0..fd3f8d031 100644 --- a/admin-dev/themes/template/modules/js.tpl +++ b/admin-dev/themes/template/modules/js.tpl @@ -72,7 +72,10 @@ matchContains: true, highlightItem: true, formatItem: function(row, i, max, term) { - return ''+row.displayName+''+((row.author != '') ? ' ' + by + ' ' + truncate_author(row.author) : '') + '
'+ row.desc +'
'+ row.option +'
'; + var image = '../modules/'+row.name+'/logo.gif'; + if (row.image != '') + image = row.image; + return ''+row.displayName+''+((row.author != '') ? ' ' + by + ' ' + truncate_author(row.author) : '') + '
'+ row.desc +'
'+ row.option +'
'; }, formatResult: function(row) { return row.displayName; diff --git a/classes/Module.php b/classes/Module.php index ff0784d70..b8777d231 100644 --- a/classes/Module.php +++ b/classes/Module.php @@ -773,8 +773,6 @@ abstract class ModuleCore $item->need_instance = 0; $item->available_on_addons = 1; $item->active = 0; - if (!isset($modaddons->img) && isset($modaddons->id)) - $modaddons->img = 'http://media.prestastore.com/img/pico/'.(int)$modaddons->id.'.jpg'; if (isset($modaddons->img)) { if (!file_exists('../img/tmp/'.md5($modaddons->name).'.jpg')) diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php index e0d7da8f2..8714e5587 100644 --- a/controllers/admin/AdminModulesController.php +++ b/controllers/admin/AdminModulesController.php @@ -827,6 +827,7 @@ class AdminModulesControllerCore extends AdminController 'desc' => (string)$module->description, 'name' => (string)$module->name, 'author' => (string)$module->author, + 'image' => (isset($module->image) ? (string)$module->image : ''), 'option' => $this->displayModuleOptions($module) )).', '; }