Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/comm/action/list.php htdocs/filefunc.inc.php
This commit is contained in:
commit
b66155de4b
@ -75,8 +75,13 @@ if ($complete == 'na' || $complete == -2) {
|
||||
$complete = -1;
|
||||
}
|
||||
|
||||
$datep = dol_mktime($fulldayevent ? '00' : $aphour, $fulldayevent ? '00' : $apmin, 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'));
|
||||
$datef = dol_mktime($fulldayevent ? '23' : $p2hour, $fulldayevent ? '59' : $p2min, $fulldayevent ? '59' : '0', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'));
|
||||
if ($fulldayevent) {
|
||||
$datep = dol_mktime('00', '00', 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'));
|
||||
$datef = dol_mktime('23', '59', '59', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'));
|
||||
} else {
|
||||
$datep = dol_mktime($aphour, $apmin, 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'));
|
||||
$datef = dol_mktime($p2hour, $p2min, '59', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'));
|
||||
}
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
|
||||
@ -490,7 +490,7 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
$viewmode = '';
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"');
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||
|
||||
|
||||
@ -625,22 +625,6 @@ print $nav;
|
||||
//print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
|
||||
//print dol_get_fiche_end();
|
||||
|
||||
// Add link to show birthdays
|
||||
/*
|
||||
$link = '';
|
||||
if (empty($conf->use_javascript_ajax))
|
||||
{
|
||||
$newparam=$param; // newparam is for birthday links
|
||||
$newparam=preg_replace('/showbirthday=[0-1]/i','showbirthday='.(empty($showbirthday)?1:0),$newparam);
|
||||
if (! preg_match('/showbirthday=/i',$newparam)) $newparam.='&showbirthday=1';
|
||||
$link='<a href="'.$_SERVER['PHP_SELF'];
|
||||
$link.='?'.$newparam;
|
||||
$link.='">';
|
||||
if (empty($showbirthday)) $link.=$langs->trans("AgendaShowBirthdayEvents");
|
||||
else $link.=$langs->trans("AgendaHideBirthdayEvents");
|
||||
$link.='</a>';
|
||||
}
|
||||
*/
|
||||
|
||||
$s = $newtitle;
|
||||
|
||||
@ -656,7 +640,7 @@ if (empty($reshook)) {
|
||||
$viewmode = '';
|
||||
$viewmode .= '<a class="btnTitle btnTitleSelected reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"');
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||
|
||||
|
||||
@ -416,7 +416,7 @@ $massactionbutton = '';
|
||||
$viewmode = '';
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"');
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||
|
||||
|
||||
@ -426,7 +426,7 @@ $massactionbutton = '';
|
||||
$viewmode = '';
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"');
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||
|
||||
|
||||
@ -1071,7 +1071,7 @@ function dol_size($size, $type = '')
|
||||
|
||||
/**
|
||||
* Clean a string to use it as a file name.
|
||||
* Replace also '--' and ' -' strings, they are used for parameters separation.
|
||||
* Replace also '--' and ' -' strings, they are used for parameters separation (Note: ' - ' is allowed).
|
||||
*
|
||||
* @param string $str String to clean
|
||||
* @param string $newstr String to replace bad chars with.
|
||||
@ -1089,13 +1089,13 @@ function dol_sanitizeFileName($str, $newstr = '_', $unaccent = 1)
|
||||
$filesystem_forbidden_chars = array('<', '>', '/', '\\', '?', '*', '|', '"', ':', '°', '$', ';');
|
||||
$tmp = dol_string_nospecial($unaccent ? dol_string_unaccent($str) : $str, $newstr, $filesystem_forbidden_chars);
|
||||
$tmp = preg_replace('/\-\-+/', '_', $tmp);
|
||||
$tmp = preg_replace('/\s+\-/', ' _', $tmp);
|
||||
$tmp = preg_replace('/\s+\-([^\s])/', ' _$1', $tmp);
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean a string to use it as a path name.
|
||||
* Replace also '--' and ' -' strings, they are used for parameters separation.
|
||||
* Replace also '--' and ' -' strings, they are used for parameters separation (Note: ' - ' is allowed).
|
||||
*
|
||||
* @param string $str String to clean
|
||||
* @param string $newstr String to replace bad chars with
|
||||
@ -1112,7 +1112,7 @@ function dol_sanitizePathName($str, $newstr = '_', $unaccent = 1)
|
||||
$filesystem_forbidden_chars = array('<', '>', '?', '*', '|', '"', '°', '$', ';');
|
||||
$tmp = dol_string_nospecial($unaccent ? dol_string_unaccent($str) : $str, $newstr, $filesystem_forbidden_chars);
|
||||
$tmp = preg_replace('/\-\-+/', '_', $tmp);
|
||||
$tmp = preg_replace('/\s+\-/', ' _', $tmp);
|
||||
$tmp = preg_replace('/\s+\-([^\s])/', ' _$1', $tmp);
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
@ -2305,8 +2305,17 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs =
|
||||
} elseif ($tzoutput == 'tzuser' || $tzoutput == 'tzuserrel') {
|
||||
$to_gmt = true;
|
||||
$offsettzstring = (empty($_SESSION['dol_tz_string']) ? 'UTC' : $_SESSION['dol_tz_string']); // Example 'Europe/Berlin' or 'Indian/Reunion'
|
||||
$offsettz = (empty($_SESSION['dol_tz']) ? 0 : $_SESSION['dol_tz']) * 60 * 60; // Will not be used anymore
|
||||
$offsetdst = (empty($_SESSION['dol_dst']) ? 0 : $_SESSION['dol_dst']) * 60 * 60; // Will not be used anymore
|
||||
|
||||
if (class_exists('DateTimeZone')) {
|
||||
$user_date_tz = new DateTimeZone($offsettzstring);
|
||||
$user_dt = new DateTime();
|
||||
$user_dt->setTimezone($user_date_tz);
|
||||
$user_dt->setTimestamp($tzoutput == 'tzuser' ? dol_now() : $time);
|
||||
$offsettz = $user_dt->getOffset();
|
||||
} else { // old method (The 'tzuser' was processed like the 'tzuserrel')
|
||||
$offsettz = (empty($_SESSION['dol_tz']) ? 0 : $_SESSION['dol_tz']) * 60 * 60; // Will not be used anymore
|
||||
$offsetdst = (empty($_SESSION['dol_dst']) ? 0 : $_SESSION['dol_dst']) * 60 * 60; // Will not be used anymore
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ if (!$section) {
|
||||
dol_print_error('', 'Error, section parameter missing');
|
||||
exit;
|
||||
}
|
||||
$urlfile = (string) dol_sanitizePathName(GETPOST("urlfile"));
|
||||
$urlfile = (string) dol_sanitizePathName(GETPOST("urlfile"), '_', 0);
|
||||
if (!$urlfile) {
|
||||
dol_print_error('', "ErrorParamNotDefined");
|
||||
exit;
|
||||
@ -131,7 +131,7 @@ if ($action == 'update' && $permtoadd) {
|
||||
$error = 0;
|
||||
|
||||
$oldlabel = GETPOST('urlfile', 'alpha');
|
||||
$newlabel = dol_sanitizeFileName(GETPOST('label', 'alpha'));
|
||||
$newlabel = dol_sanitizeFileName(GETPOST('label', 'alpha'), '_', 0);
|
||||
$shareenabled = GETPOST('shareenabled', 'alpha');
|
||||
|
||||
//$db->begin();
|
||||
|
||||
@ -641,13 +641,19 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
|
||||
print '<td class="right">';
|
||||
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) {
|
||||
print price($objp->multicurrency_am);
|
||||
print price($sign * $multicurrency_payment);
|
||||
if ($multicurrency_creditnotes) {
|
||||
print '+'.price($multicurrency_creditnotes);
|
||||
}
|
||||
if ($multicurrency_deposits) {
|
||||
print '+'.price($multicurrency_deposits);
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td class="right">';
|
||||
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) {
|
||||
print price($objp->multicurrency_total_ttc - $objp->multicurrency_am);
|
||||
print price($sign * $multicurrency_remaintopay);
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user