Fix: Bad return url
This commit is contained in:
parent
71b61fc1f5
commit
73e3ef3a82
@ -759,7 +759,9 @@ if (empty($action) || $action == 'show_month') // View by month
|
|||||||
$newparam=preg_replace('/day=[0-9]+&?/i','',$newparam);
|
$newparam=preg_replace('/day=[0-9]+&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/month=[0-9]+&?/i','',$newparam);
|
$newparam=preg_replace('/month=[0-9]+&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
|
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/viewcal=[0-9]+&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter
|
$newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter
|
||||||
|
$newparam.='&viewcal=1';
|
||||||
echo '<table width="100%" class="nocellnopadd cal_month">';
|
echo '<table width="100%" class="nocellnopadd cal_month">';
|
||||||
echo ' <tr class="liste_titre">';
|
echo ' <tr class="liste_titre">';
|
||||||
$i=0;
|
$i=0;
|
||||||
@ -830,7 +832,9 @@ elseif ($action == 'show_week') // View by week
|
|||||||
$newparam=preg_replace('/day=[0-9]+&?/i','',$newparam);
|
$newparam=preg_replace('/day=[0-9]+&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/month=[0-9]+&?/i','',$newparam);
|
$newparam=preg_replace('/month=[0-9]+&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
|
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/viewweek=[0-9]+&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter
|
$newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter
|
||||||
|
$newparam.='&viewweek=1';
|
||||||
echo '<table width="100%" class="nocellnopadd cal_month">';
|
echo '<table width="100%" class="nocellnopadd cal_month">';
|
||||||
echo ' <tr class="liste_titre">';
|
echo ' <tr class="liste_titre">';
|
||||||
$i=0;
|
$i=0;
|
||||||
@ -884,6 +888,8 @@ else // View by day
|
|||||||
$newparam=$param; // newparam is for birthday links
|
$newparam=$param; // newparam is for birthday links
|
||||||
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
|
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
|
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/viewday=[0-9]+&?/i','',$newparam);
|
||||||
|
$newparam.='&viewday=1';
|
||||||
// Code to show just one day
|
// Code to show just one day
|
||||||
$style='cal_current_month';
|
$style='cal_current_month';
|
||||||
$today=0;
|
$today=0;
|
||||||
@ -950,6 +956,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
global $theme_datacolor;
|
global $theme_datacolor;
|
||||||
global $cachethirdparties, $cachecontacts, $colorindexused;
|
global $cachethirdparties, $cachecontacts, $colorindexused;
|
||||||
|
|
||||||
|
|
||||||
print '<div id="dayevent_'.sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day).'" class="dayevent">'."\n";
|
print '<div id="dayevent_'.sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day).'" class="dayevent">'."\n";
|
||||||
$curtime = dol_mktime(0, 0, 0, $month, $day, $year);
|
$curtime = dol_mktime(0, 0, 0, $month, $day, $year);
|
||||||
print '<table class="nobordernopadding" width="100%">';
|
print '<table class="nobordernopadding" width="100%">';
|
||||||
@ -957,7 +964,6 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?';
|
print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?';
|
||||||
print 'action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year;
|
print 'action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year;
|
||||||
print $newparam;
|
print $newparam;
|
||||||
//.'&month='.$month.'&year='.$year;
|
|
||||||
print '">';
|
print '">';
|
||||||
if ($showinfo) print dol_print_date($curtime,'daytext');
|
if ($showinfo) print dol_print_date($curtime,'daytext');
|
||||||
else print dol_print_date($curtime,'%d');
|
else print dol_print_date($curtime,'%d');
|
||||||
@ -965,6 +971,8 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
print '</td><td align="right" class="nowrap">';
|
print '</td><td align="right" class="nowrap">';
|
||||||
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create)
|
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create)
|
||||||
{
|
{
|
||||||
|
$newparam.='&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year;
|
||||||
|
|
||||||
//$param='month='.$monthshown.'&year='.$year;
|
//$param='month='.$monthshown.'&year='.$year;
|
||||||
$hourminsec='100000';
|
$hourminsec='100000';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&datep='.sprintf("%04d%02d%02d",$year,$month,$day).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')).'">';
|
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&datep='.sprintf("%04d%02d%02d",$year,$month,$day).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')).'">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user