diff --git a/htdocs/admin/export.php b/htdocs/admin/export.php
index ca160a7dfda..c61cf4f81a2 100644
--- a/htdocs/admin/export.php
+++ b/htdocs/admin/export.php
@@ -51,48 +51,52 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
* View
*/
+$form=new Form($db);
+
$page_name = "ExportSetup";
llxHeader('', $langs->trans($page_name));
// Subheader
-$linkback = ''
- . $langs->trans("BackToModuleList") . '';
+$linkback = '' . $langs->trans("BackToModuleList") . '';
+
print load_fiche_titre($langs->trans($page_name), $linkback);
-// Configuration header
+//$head = export_admin_prepare_head();
+$h=0;
+$head = array();
+$head[$h][0] = DOL_URL_ROOT.'/admin/export.php';
+$head[$h][1] = $langs->trans("Setup");
+$head[$h][2] = 'setup';
+$h++;
-dol_fiche_head(
- $head,
- 'settings',
- $langs->trans("ExportsArea"),
- 0,
- "exports"
-);
+dol_fiche_head($head, 'setup', $langs->trans("ExportsArea"), -1, "exports");
-// Setup page goes here
-$form=new Form($db);
print '
';
print '';
-print '| '.$langs->trans("ExportModel").' | '."\n";
+print ''.$langs->trans("Parameters").' | '."\n";
print ' | ';
print ' | '."\n";
// Example with a yes / no select
print '
';
-print '| '.$langs->trans("set_EXPORTS_SHARE_MODELS").' | ';
+print ''.$langs->trans("EXPORTS_SHARE_MODELS").' | ';
print ' | ';
print '';
+
print '';
+
print ' |
';
print '
';
+dol_fiche_end();
+
// End of page
llxFooter();
$db->close();
diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php
index 922e25f7ecf..3957e44daf5 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -63,8 +63,8 @@ class FormOther
* @param string $selected Id modele pre-selectionne
* @param string $htmlname Nom de la zone select
* @param string $type Type des modeles recherches
- * @param int $useempty Affiche valeur vide dans liste
- * @param int $fk_user Utilisateur créant le modèle
+ * @param int $useempty Show an empty value in list
+ * @param int $fk_user User that has created the template (this is set to null to get all export model when EXPORTS_SHARE_MODELS is on)
* @return void
*/
public function select_export_model($selected = '', $htmlname = 'exportmodelid', $type = '', $useempty = 0, $fk_user = null)
@@ -73,7 +73,7 @@ class FormOther
$sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."export_model";
$sql.= " WHERE type = '".$type."'";
- if (!empty($fk_user)) $sql.=" AND fk_user=".$fk_user;
+ if (!empty($fk_user)) $sql.=" AND fk_user IN (0, ".$fk_user.")"; // An export model
$sql.= " ORDER BY rowid";
$result = $this->db->query($sql);
if ($result)
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 6719b35f795..9f7553901f4 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1848,7 +1848,6 @@ ECMAutoTree=Show automatic ECM tree
OperationParamDesc=Define values to use for action, or how to extract values. For example:
VALUE:abc
REGEX:SUBJECT:([^\s]*)
REGEX:BODY:My company name is\s([^\s]*)
OpeningHours=Opening hours
OpeningHoursDesc=Enter here the regular opening hours of your company.
-##### Resource ####
ResourceSetup=Configuration of Resource module
UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list).
DisabledResourceLinkUser=Disable feature to link a resource to users
@@ -1871,4 +1870,6 @@ LogsLinesNumber=Number of lines to show on logs tab
UseDebugBar=Use the debug bar
DEBUGBAR_LOGS_LINES_NUMBER=Number of last log lines to keep in console
WarningValueHigherSlowsDramaticalyOutput=Warning, higher values slows dramaticaly output
-DebugBarModuleActivated=Module debugbar is activated and slows dramaticaly the interface
\ No newline at end of file
+DebugBarModuleActivated=Module debugbar is activated and slows dramaticaly the interface
+EXPORTS_SHARE_MODELS=Export models are share with everybody
+ExportSetup=Setup of module Export
\ No newline at end of file
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index 02bf2679b1b..5786b390a09 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -378,7 +378,7 @@ class Project extends CommonObject
if (file_exists($olddir))
{
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
- $res=dol_move($olddir, $newdir);
+ $res=@rename($olddir, $newdir);
if (! $res)
{
$langs->load("errors");