Skip to content

Commit

Permalink
Merge branch 'develop' of git://github.com/Dolibarr/dolibarr into dev…
Browse files Browse the repository at this point in the history
…elop
  • Loading branch information
grandoc committed Aug 20, 2012
2 parents 158019f + 2ab1a01 commit 33ea1e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions htdocs/comm/action/fiche.php
Expand Up @@ -460,7 +460,7 @@ function setdatefields()
print '<tr><td>'.$langs->trans("Title").'</td><td><input type="text" name="label" size="60" value="'.GETPOST('label').'"></td></tr>';

// Full day
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday')?' checked="checked"':'').'></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("EventOnFullDay").'</td><td><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday')?' checked="checked"':'').'></td></tr>';

// Date start
$datep=$actioncomm->datep;
Expand All @@ -483,7 +483,7 @@ function setdatefields()
print '<tr><td width="10%">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td>';
print '<td>';
$percent=-1;
if (GETPOST('percentage'))
if (isset($_GET['percentage']) || isset($_POST['percentage']))
{
$percent=GETPOST('percentage');
}
Expand Down Expand Up @@ -704,7 +704,7 @@ function setdatefields()
print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3"><input type="text" name="label" size="50" value="'.$act->label.'"></td></tr>';

// Full day event
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($act->fulldayevent?' checked="checked"':'').'></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($act->fulldayevent?' checked="checked"':'').'></td></tr>';

// Date start
print '<tr><td nowrap="nowrap" class="fieldrequired">'.$langs->trans("DateActionStart").'</td><td colspan="3">';
Expand Down
15 changes: 8 additions & 7 deletions htdocs/comm/action/index.php
Expand Up @@ -746,11 +746,13 @@
if (empty($action) || $action == 'show_month') // View by month
{
$newparam=$param; // newparam is for birthday links
$newparam=preg_replace('/showbirthday=/i','showbirthday_=',$newparam); // To avoid replacement when replace day= is done
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam);
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam);
$newparam=preg_replace('/day=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/month=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter
echo '<table width="100%" class="nocellnopadd">';
echo ' <tr class="liste_titre">';
$i=0;
Expand Down Expand Up @@ -812,11 +814,13 @@
elseif ($action == 'show_week') // View by week
{
$newparam=$param; // newparam is for birthday links
$newparam=preg_replace('/showbirthday=/i','showbirthday_=',$newparam); // To avoid replacement when replace day= is done
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam);
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam);
$newparam=preg_replace('/day=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/month=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter
echo '<table width="100%" class="nocellnopadd">';
echo ' <tr class="liste_titre">';
$i=0;
Expand Down Expand Up @@ -868,9 +872,6 @@
$newparam=$param; // newparam is for birthday links
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam);
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam);
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
// Code to show just one day
$style='cal_current_month';
$today=0;
Expand Down

0 comments on commit 33ea1e1

Please sign in to comment.