diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php
index f067b27b3d4..ded3dec120e 100644
--- a/htdocs/adherents/stats/byproperties.php
+++ b/htdocs/adherents/stats/byproperties.php
@@ -101,7 +101,7 @@ else
$head = member_stats_prepare_head($adh);
-dol_fiche_head($head, 'statsbyproperties', $langs->trans("Statistics"), 0, 'user');
+dol_fiche_head($head, 'statsbyproperties', $langs->trans("Statistics"), -1, 'user');
// Print title
diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php
index 1f9ff189068..1c6944c2a0a 100644
--- a/htdocs/adherents/stats/geo.php
+++ b/htdocs/adherents/stats/geo.php
@@ -198,7 +198,7 @@ if ($mode)
$head = member_stats_prepare_head($adh);
-dol_fiche_head($head, $tab, $langs->trans("Statistics"), 0, 'user');
+dol_fiche_head($head, $tab, $langs->trans("Statistics"), -1, 'user');
// Print title
diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php
index 1895eb5b15d..99742b19f57 100644
--- a/htdocs/admin/agenda_xcal.php
+++ b/htdocs/admin/agenda_xcal.php
@@ -174,8 +174,8 @@ $message.='
';
print $message;
$message=$langs->trans("AgendaUrlOptions1",$user->login,$user->login).'
';
-//$message.=$langs->trans("AgendaUrlOptions2",$user->login,$user->login).'
';
$message.=$langs->trans("AgendaUrlOptions3",$user->login,$user->login).'
';
+$message.=$langs->trans("AgendaUrlOptionsNotAdmin",$user->login,$user->login).'
';
$message.=$langs->trans("AgendaUrlOptions4",$user->login,$user->login).'
';
$message.=$langs->trans("AgendaUrlOptionsProject",$user->login,$user->login);
diff --git a/htdocs/admin/websites.php b/htdocs/admin/websites.php
index 4dbd154096f..0336a2533c0 100644
--- a/htdocs/admin/websites.php
+++ b/htdocs/admin/websites.php
@@ -25,8 +25,10 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
+require_once DOL_DOCUMENT_ROOT.'/websites/class/website.class.php';
$langs->load("errors");
$langs->load("admin");
@@ -35,7 +37,6 @@ $langs->load("website");
$action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
$confirm=GETPOST('confirm','alpha');
-$id=GETPOST('id','int');
$rowid=GETPOST('rowid','alpha');
$id=1;
@@ -135,7 +136,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
}
}
-
+
// Si verif ok et action add, on ajoute la ligne
if ($ok && GETPOST('actionadd'))
{
@@ -185,7 +186,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($result) // Add is ok
{
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
- $_POST=array('id'=>$id); // Clean $_POST array, we keep only
+ unset($_POST); // Clean $_POST array, we keep only
}
else
{
@@ -204,6 +205,10 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
+ $website=new Website($db);
+ $rowid=GETPOST('rowid','int');
+ $website->fetch($rowid);
+
// Modify entry
$sql = "UPDATE ".$tabname[$id]." SET ";
// Modifie valeur des champs
@@ -229,7 +234,17 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
dol_syslog("actionmodify", LOG_DEBUG);
//print $sql;
$resql = $db->query($sql);
- if (! $resql)
+ if ($resql)
+ {
+ $newname = dol_sanitizeFileName(GETPOST('ref','aZ09'));
+ if ($newname != $website->ref)
+ {
+ $srcfile=DOL_DATA_ROOT.'/websites/'.$website->ref;
+ $destfile=DOL_DATA_ROOT.'/websites/'.$newname;
+ @rename($srcfile, $destfile);
+ }
+ }
+ else
{
setEventMessages($db->error(), null, 'errors');
}
@@ -249,7 +264,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete
$sql = "DELETE from ".MAIN_DB_PREFIX."website_pages WHERE fk_website ='".$rowid."'";
$result = $db->query($sql);
-
+
$sql = "DELETE from ".MAIN_DB_PREFIX."website WHERE rowid ='".$rowid."'";
$result = $db->query($sql);
if (! $result)
@@ -321,7 +336,7 @@ print "
\n";
// Confirmation de la suppression de la ligne
if ($action == 'delete')
{
- print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1);
+ print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1);
}
//var_dump($elementList);
@@ -355,7 +370,7 @@ if ($id)
$fieldlist=explode(',',$tabfield[$id]);
- print '