diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 1938b34a368..df0b95e47b4 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -528,7 +528,9 @@ class Form $filelib=eregi_replace('\.php$','',$file); $prefix=''; if (eregi('^eldy',$file)) $prefix='0'; // Recommanded + else if (eregi('^auguria',$file)) $prefix='2'; // Other else if (eregi('^default',$file)) $prefix='2'; // Other + else if (eregi('^rodolphe',$file)) $prefix='2'; // Other else if (eregi('^empty',$file)) $prefix='2'; // Other else $prefix='1'; // Experimental diff --git a/htdocs/includes/menus/barre_left/default.php b/htdocs/includes/menus/barre_left/rodolphe.php similarity index 100% rename from htdocs/includes/menus/barre_left/default.php rename to htdocs/includes/menus/barre_left/rodolphe.php diff --git a/htdocs/includes/menus/barre_top/default.php b/htdocs/includes/menus/barre_top/rodolphe.php similarity index 100% rename from htdocs/includes/menus/barre_top/default.php rename to htdocs/includes/menus/barre_top/rodolphe.php diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 423ea0a8255..c44f17e138f 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -168,8 +168,6 @@ if (isset($_POST['action']) && $_POST['action'] == 'upgrade') migrate_paiementfourn_facturefourn($db,$langs,$conf); - migrate_delete_old_files($db,$langs,$conf); - // Script pour V2.1 -> V2.2 migrate_paiements_orphelins_1($db,$langs,$conf); @@ -177,6 +175,8 @@ if (isset($_POST['action']) && $_POST['action'] == 'upgrade') migrate_links_transfert($db,$langs,$conf); + migrate_delete_old_files($db,$langs,$conf); + // On commit dans tous les cas. // La procédure etant conçue pour pouvoir passer plusieurs fois quelquesoit la situation. $db->commit(); // FIXME @@ -1414,17 +1414,26 @@ function migrate_delete_old_files($db,$langs,$conf) { $result=true; - $filetodelete=DOL_DOCUMENT_ROOT.'/includes/triggers/interface_demo.class.php'; - //print ''.$filetodelete."
\n"; - if (file_exists($filetodelete)) + // List of files to delete + $filetodeletearray=array( + DOL_DOCUMENT_ROOT.'/includes/triggers/interface_demo.class.php', + DOL_DOCUMENT_ROOT.'/includes/menus/barre_left/default.php', + DOL_DOCUMENT_ROOT.'/includes/menus/barre_top/default.php' + ); + + foreach ($filetodeletearray as $filetodelete) { - $result=dol_delete_file($filetodelete); - } - if (! $result) - { - $langs->load("errors"); - print '
'.$langs->trans("Error").': '.$langs->trans("ErrorFailToDeleteFile",$filetodelete); - print ' '.$langs->trans("RemoveItManuallyAndPressF5ToContinue").'
'; + //print ''.$filetodelete."
\n"; + if (file_exists($filetodelete)) + { + $result=dol_delete_file($filetodelete); + } + if (! $result) + { + $langs->load("errors"); + print '
'.$langs->trans("Error").': '.$langs->trans("ErrorFailToDeleteFile",$filetodelete); + print ' '.$langs->trans("RemoveItManuallyAndPressF5ToContinue").'
'; + } } return $result; } diff --git a/mysql/migration/2.1.0-2.2.0.sql b/mysql/migration/2.1.0-2.2.0.sql index 99a8c32632a..1b28285d349 100644 --- a/mysql/migration/2.1.0-2.2.0.sql +++ b/mysql/migration/2.1.0-2.2.0.sql @@ -59,6 +59,11 @@ update llx_const set name='MAIN_MAIL_EMAIL_FROM' where name='NOTIFICATION_EMAIL_ update llx_const set visible=0 where name in ('MAIN_UPLOAD_DOC','MAIN_MAIL_SMTP_SERVER','MAIN_MAIL_SMTP_PORT','MAIN_MAIL_EMAIL_FROM'); +update llx_const set value='rodolphe.php' where name='MAIN_MENU_BARRELEFT' and value='default.php'; +update llx_const set value='rodolphe.php' where name='MAIN_MENU_BARRETOP' and value='default.php'; +update llx_const set value='rodolphe.php' where name='MAIN_MENUFRONT_BARRELEFT' and value='default.php'; +update llx_const set value='rodolphe.php' where name='MAIN_MENUFRONT_BARRETOP' and value='default.php'; + delete from llx_adherent_type where libelle IS NULL; alter table llx_adherent_type modify libelle varchar(50) NOT NULL;