diff --git a/_define.php b/_define.php index 07210e5..e840311 100644 --- a/_define.php +++ b/_define.php @@ -18,13 +18,13 @@ $this->registerModule( 'dcLog', 'Displays Dotclear logs', 'Tomtom (http://blog.zenstyle.fr) and Contributors', - '1.1', + '1.1.1', [ 'requires' => [['core', '2.24']], 'permissions' => null, 'type' => 'plugin', - 'support' => 'https://github.com/JcDenis/dcLog', - 'details' => 'https://plugins.dotaddict.org/dc2/details/dcLog', - 'repository' => 'https://raw.githubusercontent.com/JcDenis/dcLog/master/dcstore.xml', + 'support' => 'https://github.com/JcDenis/' . basename(__DIR__), + 'details' => 'https://plugins.dotaddict.org/dc2/details/' . basename(__DIR__), + 'repository' => 'https://raw.githubusercontent.com/JcDenis/' . basename(__DIR__) . '/master/dcstore.xml', ] ); diff --git a/index.php b/index.php index 46f5976..9641c7c 100644 --- a/index.php +++ b/index.php @@ -30,7 +30,7 @@ if (isset($_POST['del_logs']) || isset($_POST['del_all_logs'])) { __('All logs have been successfully deleted') : __('Selected logs have been successfully deleted') ); - dcCore::app()->adminurl->redirect('admin.plugin.dcLog'); + dcCore::app()->adminurl->redirect('admin.plugin.' . basename(__DIR__)); } catch (Exception $e) { dcCore::app()->error->add($e->getMessage()); } @@ -58,12 +58,12 @@ dcPage::jsJson('dclog_list', [ 'confirm_delete_selected_log' => __('Are you sure you want to delete selected logs?'), 'confirm_delete_all_log' => __('Are you sure you want to delete all logs?'), ]) . -$filter->js(dcCore::app()->adminurl->get('admin.plugin.dcLog')) . -dcPage::jsLoad(dcPage::getPF('dcLog/js/dclog.js')) . +$filter->js(dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__))) . +dcPage::jsLoad(dcPage::getPF(basename(__DIR__) . '/js/dclog.js')) . '
' . dcPage::breadcrumb([ __('System') => '', - __('Log') => dcCore::app()->adminurl->get('admin.plugin.dcLog'), + __('Log') => dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__)), ]) . dcPage::notices(); @@ -72,13 +72,13 @@ if (isset($logs) && isset($logs_list)) { echo '' . __('There are no logs') . '
'; } else { $filter->display( - 'admin.plugin.dcLog', - form::hidden('p', 'dcLog') + 'admin.plugin.' . basename(__DIR__), + form::hidden('p', basename(__DIR__)) ); $logs_list->display( $filter->__get('page'), $filter->__get('nb'), - '',