diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index e844793b601..d406f6918a0 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -121,13 +121,13 @@ if ($dirins && $action == 'initmodule' && $modulename) } } - // Delete some files + // Delete some files related to object (because to previous dolCopyDir has copied everything) dol_delete_file($destdir.'/myobject_card.php'); dol_delete_file($destdir.'/myobject_note.php'); dol_delete_file($destdir.'/myobject_document.php'); dol_delete_file($destdir.'/myobject_agenda.php'); dol_delete_file($destdir.'/myobject_list.php'); - dol_delete_file($destdir.'/lib/myobject.lib.php'); + dol_delete_file($destdir.'/lib/mymodule_myobject.lib.php'); dol_delete_file($destdir.'/test/phpunit/MyObjectTest.php'); dol_delete_file($destdir.'/sql/llx_mymodule_myobject.sql'); dol_delete_file($destdir.'/sql/llx_mymodule_myobject_extrafields.sql'); @@ -279,14 +279,14 @@ if ($dirins && $action == 'initobject' && $module && $objectname) if (! $error) { - // Delete some files + // Copy some files $filetogenerate = array( 'myobject_card.php'=>strtolower($objectname).'_card.php', 'myobject_note.php'=>strtolower($objectname).'_note.php', 'myobject_document.php'=>strtolower($objectname).'_document.php', 'myobject_agenda.php'=>strtolower($objectname).'_agenda.php', 'myobject_list.php'=>strtolower($objectname).'_list.php', - 'lib/myobject.lib.php'=>'lib/'.strtolower($objectname).'.lib.php', + 'lib/mymodule_myobject.lib.php'=>'lib/'.strtolower($module).'_'.strtolower($objectname).'.lib.php', 'test/phpunit/MyObjectTest.php'=>'test/phpunit/'.$objectname.'Test.php', 'sql/llx_mymodule_myobject.sql'=>'sql/llx_'.strtolower($module).'_'.strtolower($objectname).'.sql', 'sql/llx_mymodule_myobject_extrafields.sql'=>'sql/llx_'.strtolower($module).'_'.strtolower($objectname).'_extrafields.sql', @@ -648,7 +648,8 @@ if ($dirins && $action == 'confirm_deleteobject' && $objectname) 'myobject_document.php'=>strtolower($objectname).'_document.php', 'myobject_agenda.php'=>strtolower($objectname).'_agenda.php', 'myobject_list.php'=>strtolower($objectname).'_list.php', - 'lib/myobject.lib.php'=>'lib/'.strtolower($objectname).'.lib.php', + 'lib/mymodule.lib.php'=>'lib/'.strtolower($module).'.lib.php', + 'lib/mymodule_myobject.lib.php'=>'lib/'.strtolower($module).'_'.strtolower($objectname).'.lib.php', 'test/phpunit/MyObjectTest.php'=>'test/phpunit/'.$objectname.'Test.php', 'sql/llx_mymodule_myobject.sql'=>'sql/llx_'.strtolower($module).'_'.strtolower($objectname).'.sql', 'sql/llx_mymodule_myobject_extrafields.sql'=>'sql/llx_'.strtolower($module).'_'.strtolower($objectname).'_extrafields.sql', diff --git a/htdocs/modulebuilder/template/lib/myobject.lib.php b/htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php similarity index 97% rename from htdocs/modulebuilder/template/lib/myobject.lib.php rename to htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php index d3665dff236..dbf049b3827 100644 --- a/htdocs/modulebuilder/template/lib/myobject.lib.php +++ b/htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/modulebuilder/template/lib/myobject.lib.php + * \file htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php * \ingroup mymodule * \brief Library files with common functions for MyObject */ diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php index 5c7303ba6a9..3322fb527d3 100644 --- a/htdocs/modulebuilder/template/myobject_agenda.php +++ b/htdocs/modulebuilder/template/myobject_agenda.php @@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; dol_include_once('/mymodule/class/myobject.class.php'); -dol_include_once('/mymodule/lib/myobject.lib.php'); +dol_include_once('/mymodule/lib/mymodule_myobject.lib.php'); // Load translation files required by the page diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index cfc79b2f232..78a9070eefd 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -60,7 +60,7 @@ if (! $res) die("Include of main fails"); include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'); dol_include_once('/mymodule/class/myobject.class.php'); -dol_include_once('/mymodule/lib/myobject.lib.php'); +dol_include_once('/mymodule/lib/mymodule_myobject.lib.php'); // Load translation files required by the page $langs->loadLangs(array("mymodule@mymodule","other")); diff --git a/htdocs/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php index c08a360835a..dfdc16d69d9 100644 --- a/htdocs/modulebuilder/template/myobject_document.php +++ b/htdocs/modulebuilder/template/myobject_document.php @@ -42,7 +42,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; dol_include_once('/mymodule/class/myobject.class.php'); -dol_include_once('/mymodule/lib/myobject.lib.php'); +dol_include_once('/mymodule/lib/mymodule_myobject.lib.php'); // Load translation files required by the page $langs->loadLangs(array("mymodule@mymodule","companies","other","mails")); diff --git a/htdocs/modulebuilder/template/myobject_note.php b/htdocs/modulebuilder/template/myobject_note.php index 5b438c32a7c..1a26d9abeb4 100644 --- a/htdocs/modulebuilder/template/myobject_note.php +++ b/htdocs/modulebuilder/template/myobject_note.php @@ -38,7 +38,7 @@ if (! $res && file_exists("../../../main.inc.php")) $res=@include("../../../main if (! $res) die("Include of main fails"); dol_include_once('/mymodule/class/myobject.class.php'); -dol_include_once('/mymodule/lib/myobject.lib.php'); +dol_include_once('/mymodule/lib/mymodule_myobject.lib.php'); // Load translation files required by the page $langs->loadLangs(array("mymodule@mymodule","companies"));