Merge branch 'develop' of github.com:Dolibarr/dolibarr into new_convert_setup_to_new_setup

This commit is contained in:
John BOTELLA 2021-12-28 11:29:26 +01:00
commit 50801edb84
97 changed files with 910 additions and 16077 deletions

View File

@ -134,6 +134,7 @@ NEW: Use lang selector when using a field key 'lang' in modulebuilder
NEW: we need to be able to put more filters on deleteByParentField() function
NEW: make it easier to set the `keyword`, `keywords` and `description` attributes of an ecm file object
NEW: Experimental feature to manage user sessions in database
NEW: Hidden option API_DISABLE_COMPRESSION is now visible in API setup page.
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:

View File

@ -915,7 +915,7 @@ class AccountancyExport
print "Montantdevise".$separator;
print "Idevise".$separator;
print "DateLimitReglmt".$separator;
print "NumFacture".$separator;
print "NumFacture";
print $end_line;
foreach ($objectLines as $line) {
@ -997,13 +997,13 @@ class AccountancyExport
print $line->multicurrency_amount . $separator;
// FEC:Idevise
print $line->multicurrency_code.$separator;
print $line->multicurrency_code . $separator;
// FEC_suppl:DateLimitReglmt
print $date_limit_payment;
print $date_limit_payment . $separator;
// FEC_suppl:NumFacture
print dol_trunc(self::toAnsi($refInvoice), 17, 'right', 'UTF-8', 1) . $separator;
print dol_trunc(self::toAnsi($refInvoice), 17, 'right', 'UTF-8', 1);
print $end_line;
}
@ -1042,7 +1042,7 @@ class AccountancyExport
print "Montantdevise".$separator;
print "Idevise".$separator;
print "DateLimitReglmt".$separator;
print "NumFacture".$separator;
print "NumFacture";
print $end_line;
foreach ($objectLines as $line) {
@ -1127,10 +1127,10 @@ class AccountancyExport
print $line->multicurrency_code . $separator;
// FEC_suppl:DateLimitReglmt
print $date_limit_payment;
print $date_limit_payment . $separator;
// FEC_suppl:NumFacture
print dol_trunc(self::toAnsi($refInvoice), 17, 'right', 'UTF-8', 1) . $separator;
print dol_trunc(self::toAnsi($refInvoice), 17, 'right', 'UTF-8', 1);
print $end_line;

View File

@ -136,7 +136,11 @@ if ($object->id > 0) {
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'rowid', $linkback);
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/adherents/vcard.php?id='.$object->id.'" class="refid">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= '</a>';
dol_banner_tab($object, 'rowid', $linkback, 1, 'rowid', 'ref', $morehtmlref);
print '<div class="fichecenter">';

View File

@ -918,12 +918,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// When used in standard mode
// -----------------------------------------
// Create mode
if ($action == 'create') {
/* ************************************************************************** */
/* */
/* Creation mode */
/* */
/* ************************************************************************** */
$object->canvas = $canvas;
$object->state_id = GETPOST('state_id', 'int');
@ -1145,13 +1141,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print "</form>\n";
}
// Edit mode
if ($action == 'edit') {
/********************************************
*
* Edition mode
*
********************************************/
$res = $object->fetch($id);
if ($res < 0) {
dol_print_error($db, $object->error); exit;
@ -1412,13 +1403,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '</form>';
}
// View
if ($id > 0 && $action != 'edit') {
/* ************************************************************************** */
/* */
/* View mode */
/* */
/* ************************************************************************** */
$res = $object->fetch($id);
if ($res < 0) {
dol_print_error($db, $object->error); exit;
@ -1707,7 +1693,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'rowid', $linkback);
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/adherents/vcard.php?id='.$object->id.'" class="refid">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= '</a>';
dol_banner_tab($object, 'rowid', $linkback, 1, 'rowid', 'ref', $morehtmlref);
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
@ -1862,13 +1853,16 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '</td></tr>';
// VCard
/*
print '<tr><td>';
print $langs->trans("VCard").'</td><td colspan="3">';
print '<a href="'.DOL_URL_ROOT.'/adherents/vcard.php?id='.$object->id.'">';
print img_picto($langs->trans("Download"), 'vcard.png', 'class="paddingrightonly"');
print img_picto($langs->trans("Download").' vcard', 'vcard.png', 'class="paddingrightonly"');
print $langs->trans("Download");
print img_picto($langs->trans("Download").' vcard', 'download', 'class="paddingleft"');
print '</a>';
print '</td></tr>';
*/
print "</table>\n";

View File

@ -237,8 +237,9 @@ class Members extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -102,8 +102,9 @@ class MembersTypes extends DolibarrApi
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -100,8 +100,9 @@ class Subscriptions extends DolibarrApi
$sql .= ' WHERE 1 = 1';
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -138,7 +138,11 @@ if ($id > 0) {
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'rowid', $linkback);
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/adherents/vcard.php?id='.$object->id.'" class="refid">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= '</a>';
dol_banner_tab($object, 'rowid', $linkback, 1, 'rowid', 'ref', $morehtmlref);
print '<div class="fichecenter">';

View File

@ -107,7 +107,11 @@ if ($id) {
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'id', $linkback);
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/adherents/vcard.php?id='.$object->id.'" class="refid">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= '</a>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref);
print '<div class="fichecenter">';

View File

@ -485,7 +485,11 @@ if ($rowid > 0) {
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'rowid', $linkback);
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/adherents/vcard.php?id='.$object->id.'" class="refid">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= '</a>';
dol_banner_tab($object, 'rowid', $linkback, 1, 'rowid', 'ref', $morehtmlref);
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';

View File

@ -292,7 +292,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
$membertype->amount = $objp->amount;
print '<tr class="oddeven">';
print '<td>';
print '<td class="nowraponall">';
print $membertype->getNomUrl(1);
//<a href="'.$_SERVER["PHP_SELF"].'?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowType"),'group').' '.$objp->rowid.'</a>
print '</td>';
@ -340,12 +340,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
}
}
/* ************************************************************************** */
/* */
/* Creation mode */
/* */
/* ************************************************************************** */
// Creation
if ($action == 'create') {
$object = new AdherentType($db);
@ -416,11 +411,7 @@ if ($action == 'create') {
print "</form>\n";
}
/* ************************************************************************** */
/* */
/* View mode */
/* */
/* ************************************************************************** */
// View
if ($rowid > 0) {
if ($action != 'edit') {
$object = new AdherentType($db);
@ -455,8 +446,9 @@ if ($rowid > 0) {
print yn($object->subscription);
print '</tr>';
// Amount
print '<tr><td class="titlefield">'.$langs->trans("Amount").'</td><td>';
print ((is_null($object->amount) || $object->amount === '') ? '' : price($object->amount));
print ((is_null($object->amount) || $object->amount === '') ? '' : '<span class="amount">'.price($object->amount).'</span>');
print '</tr>';
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';

View File

@ -204,6 +204,18 @@ if (!empty($conf->global->NOTIFICATION_EMAIL_FROM) && !isValidEmail($conf->globa
print '</td>';
print '</tr>';
print '<tr class="oddeven"><td>';
print $langs->trans("NotificationDisableConfirmMessageContact").'</td>';
print '<td>';
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_CONTACT');
} else {
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
print $form->selectarray("NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_CONTACT", $arrval, $conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_CONTACT);
}
print '</td>';
print '</tr>';
print '<tr class="oddeven"><td>';
print $langs->trans("NotificationDisableConfirmMessageUser").'</td>';
print '<td>';
@ -215,6 +227,7 @@ if ($conf->use_javascript_ajax) {
}
print '</td>';
print '</tr>';
print '<tr class="oddeven"><td>';
print $langs->trans("NotificationDisableConfirmMessageFix").'</td>';
print '<td>';
@ -241,79 +254,68 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="settemplates">';
// Notification per contacts
$title = $langs->trans("ListOfNotificationsPerUser");
if (!empty($conf->societe->enabled)) {
$title = $langs->trans("ListOfNotificationsPerUserOrContact");
}
print load_fiche_titre($title, '', '');
$title = $langs->trans("TemplatesForNotifications");
print load_fiche_titre($title, '', 'email');
// Load array of available notifications
$notificationtrigger = new InterfaceNotification($db);
$listofnotifiedevents = $notificationtrigger->getListOfManagedEvents();
// Editing global variables not related to a specific theme
$constantes = array();
foreach ($listofnotifiedevents as $notifiedevent) {
$label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
$elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
// Editing global variables not related to a specific theme
$constantes = array();
foreach ($listofnotifiedevents as $notifiedevent) {
$label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
$elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
if ($notifiedevent['elementtype'] == 'order_supplier') {
$elementLabel = $langs->trans('SupplierOrder');
} elseif ($notifiedevent['elementtype'] == 'propal') {
$elementLabel = $langs->trans('Proposal');
} elseif ($notifiedevent['elementtype'] == 'facture') {
$elementLabel = $langs->trans('Bill');
} elseif ($notifiedevent['elementtype'] == 'commande') {
$elementLabel = $langs->trans('Order');
} elseif ($notifiedevent['elementtype'] == 'ficheinter') {
$elementLabel = $langs->trans('Intervention');
} elseif ($notifiedevent['elementtype'] == 'shipping') {
$elementLabel = $langs->trans('Shipping');
} elseif ($notifiedevent['elementtype'] == 'expensereport' || $notifiedevent['elementtype'] == 'expense_report') {
$elementLabel = $langs->trans('ExpenseReport');
}
if ($notifiedevent['elementtype'] == 'propal') {
$model = 'propal_send';
} elseif ($notifiedevent['elementtype'] == 'commande') {
$model = 'order_send';
} elseif ($notifiedevent['elementtype'] == 'facture') {
$model = 'facture_send';
} elseif ($notifiedevent['elementtype'] == 'shipping') {
$model = 'shipping_send';
} elseif ($notifiedevent['elementtype'] == 'ficheinter') {
$model = 'fichinter_send';
} elseif ($notifiedevent['elementtype'] == 'expensereport') {
$model = 'expensereport_send';
} elseif ($notifiedevent['elementtype'] == 'order_supplier') {
$model = 'order_supplier_send';
// } elseif ($notifiedevent['elementtype'] == 'invoice_supplier') $model = 'invoice_supplier_send';
} elseif ($notifiedevent['elementtype'] == 'member') {
$model = 'member';
}
$constantes[$notifiedevent['code'].'_TEMPLATE'] = array('type'=>'emailtemplate:'.$model, 'label'=>$label);
if ($notifiedevent['elementtype'] == 'order_supplier') {
$elementLabel = $langs->trans('SupplierOrder');
} elseif ($notifiedevent['elementtype'] == 'propal') {
$elementLabel = $langs->trans('Proposal');
} elseif ($notifiedevent['elementtype'] == 'facture') {
$elementLabel = $langs->trans('Bill');
} elseif ($notifiedevent['elementtype'] == 'commande') {
$elementLabel = $langs->trans('Order');
} elseif ($notifiedevent['elementtype'] == 'ficheinter') {
$elementLabel = $langs->trans('Intervention');
} elseif ($notifiedevent['elementtype'] == 'shipping') {
$elementLabel = $langs->trans('Shipping');
} elseif ($notifiedevent['elementtype'] == 'expensereport' || $notifiedevent['elementtype'] == 'expense_report') {
$elementLabel = $langs->trans('ExpenseReport');
}
$helptext = '';
form_constantes($constantes, 3, $helptext, 'EmailTemplate');
print '<div class="opacitymedium">';
print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
if (!empty($conf->societe->enabled)) {
print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
if ($notifiedevent['elementtype'] == 'propal') {
$model = 'propal_send';
} elseif ($notifiedevent['elementtype'] == 'commande') {
$model = 'order_send';
} elseif ($notifiedevent['elementtype'] == 'facture') {
$model = 'facture_send';
} elseif ($notifiedevent['elementtype'] == 'shipping') {
$model = 'shipping_send';
} elseif ($notifiedevent['elementtype'] == 'ficheinter') {
$model = 'fichinter_send';
} elseif ($notifiedevent['elementtype'] == 'expensereport') {
$model = 'expensereport_send';
} elseif ($notifiedevent['elementtype'] == 'order_supplier') {
$model = 'order_supplier_send';
// } elseif ($notifiedevent['elementtype'] == 'invoice_supplier') $model = 'invoice_supplier_send';
} elseif ($notifiedevent['elementtype'] == 'member') {
$model = 'member';
}
print '</div>';
print $form->buttonsSaveCancel("Save", '');
$constantes[$notifiedevent['code'].'_TEMPLATE'] = array('type'=>'emailtemplate:'.$model, 'label'=>$label);
}
$helptext = '';
form_constantes($constantes, 3, $helptext, 'EmailTemplate');
print $form->buttonsSaveCancel("Save", '');
/*
} else {
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Label").'</td>';
/*print '<td>'.$langs->trans("Code").'</td>';
print '<td>'.$langs->trans("Label").'</td>';*/
//print '<td class="right">'.$langs->trans("NbOfTargetedContacts").'</td>';
print "</tr>\n";
@ -359,6 +361,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
}
print '</div>';
}
*/
print '</form>';
@ -371,7 +374,15 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="setfixednotif">';
print '<input type="hidden" name="page_y" value="">';
print load_fiche_titre($langs->trans("ListOfFixedNotifications"), '', '');
print load_fiche_titre($langs->trans("ListOfFixedNotifications"), '', 'email');
print '<div class="info">';
print $langs->trans("Note").':<br>';
print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
if (!empty($conf->societe->enabled)) {
print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
}
print '</div>';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
@ -488,8 +499,6 @@ foreach ($listofnotifiedevents as $notifiedevent) {
}
print '</table>';
print '<br>';
print $form->buttonsSaveCancel("Save", '');
print '</form>';

View File

@ -38,7 +38,7 @@ if (!$user->admin) {
$action = GETPOST('action', 'aZ09');
//Activate ProfId
// Activate Production mode
if ($action == 'setproductionmode') {
$status = GETPOST('status', 'alpha');
@ -69,6 +69,18 @@ if ($action == 'setproductionmode') {
}
}
// Disable compression mode
if ($action == 'setdisablecomprssion') {
$status = GETPOST('status', 'alpha');
if (dolibarr_set_const($db, 'API_DISABLE_COMPRESSION', $status, 'chaine', 0, '', 0) > 0) {
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
} else {
dol_print_error($db);
}
}
if ($action == 'save') {
dolibarr_set_const($db, 'API_RESTRICT_ON_IP', GETPOST('API_RESTRICT_ON_IP', 'alpha'));
}
@ -116,6 +128,21 @@ if ($production_mode) {
print '<td>&nbsp;</td>';
print '</tr>';
print '<tr class="oddeven">';
print '<td>'.$langs->trans("API_DISABLE_COMPRESSION").'</td>';
$disable_compression = (empty($conf->global->API_DISABLE_COMPRESSION) ?false:true);
if ($disable_compression) {
print '<td><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setdisablecomprssion&token='.newToken().'&value='.($i + 1).'&status=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setdisablecomprssion&token='.newToken().'&value='.($i + 1).'&status=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '<td>&nbsp;</td>';
print '</tr>';
print '<tr class="oddeven">';
print '<td>'.$langs->trans("RESTRICT_ON_IP");
print ' '.$langs->trans("Example").': '.$langs->trans("IPListExample");

View File

@ -294,17 +294,26 @@ class DolibarrApi
/**
* Return if a $sqlfilters parameter is valid
*
* @param string $sqlfilters sqlfilter string
* @return boolean True if valid, False if not valid
* @param string $sqlfilters sqlfilter string
* @param string $error Error message
* @return boolean|string True if valid, False if not valid
*/
protected function _checkFilters($sqlfilters)
protected function _checkFilters($sqlfilters, &$error = '')
{
// phpcs:enable
//$regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
//$tmp=preg_replace_all('/'.$regexstring.'/', '', $sqlfilters);
$tmp = $sqlfilters;
$ok = 0;
$tmp = trim($sqlfilters);
$i = 0; $nb = strlen($tmp);
if ($nb > 0 && $tmp[0] != '(') {
$error = "Bad sqlfilters (first and last characters must be open and closing parenthesis) = ".$sqlfilters;
dol_syslog($error, LOG_WARNING);
return false;
}
$counter = 0;
while ($i < $nb) {
if ($tmp[$i] == '(') {

View File

@ -76,8 +76,9 @@ class Setup extends DolibarrApi
$sql .= " WHERE t.active = ".((int) $active);
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(400, 'error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(400, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -139,8 +140,9 @@ class Setup extends DolibarrApi
$sql .= " WHERE t.active = ".((int) $active);
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(400, 'error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(400, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -203,8 +205,9 @@ class Setup extends DolibarrApi
$sql .= " AND t.active = ".((int) $active);
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(400, 'error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(400, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -267,8 +270,9 @@ class Setup extends DolibarrApi
$sql .= " WHERE 1 = 1";
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -367,8 +371,9 @@ class Setup extends DolibarrApi
$sql .= " WHERE 1 = 1";
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -542,10 +547,11 @@ class Setup extends DolibarrApi
$sql .= " WHERE t.active = ".((int) $active);
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(400, 'error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(400, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
}
@ -657,8 +663,9 @@ class Setup extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -720,8 +727,9 @@ class Setup extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -787,8 +795,9 @@ class Setup extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -849,8 +858,9 @@ class Setup extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -921,8 +931,9 @@ class Setup extends DolibarrApi
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -991,8 +1002,9 @@ class Setup extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -1064,8 +1076,9 @@ class Setup extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -1128,8 +1141,9 @@ class Setup extends DolibarrApi
$sql .= " AND t.active = ".((int) $active);
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(400, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(400, 'error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -1186,8 +1200,9 @@ class Setup extends DolibarrApi
$sql .= " AND t.active = ".((int) $active);
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(400, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(400, 'error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -1244,8 +1259,9 @@ class Setup extends DolibarrApi
$sql .= " WHERE t.active = ".((int) $active);
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -1306,8 +1322,9 @@ class Setup extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -1364,8 +1381,9 @@ class Setup extends DolibarrApi
$sql .= " WHERE t.active = ".((int) $active);
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -1429,8 +1447,9 @@ class Setup extends DolibarrApi
$sql .= " AND t.active = ".((int) $active);
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -1487,8 +1506,9 @@ class Setup extends DolibarrApi
$sql .= " WHERE t.active = ".((int) $active);
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -1545,8 +1565,9 @@ class Setup extends DolibarrApi
$sql .= " WHERE t.active = ".((int) $active);
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -1605,8 +1626,9 @@ class Setup extends DolibarrApi
// if ($module) $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'";
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -346,17 +346,19 @@ if (!empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' &&
// If API_DISABLE_COMPRESSION is set, returnResponse is false => It use default handling so output result directly.
$usecompression = (empty($conf->global->API_DISABLE_COMPRESSION) && !empty($_SERVER['HTTP_ACCEPT_ENCODING']));
$foundonealgorithm = 0;
if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'br') !== false && is_callable('brotli_compress')) {
$foundonealgorithm++;
}
if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'bz') !== false && is_callable('bzcompress')) {
$foundonealgorithm++;
}
if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false && is_callable('gzencode')) {
$foundonealgorithm++;
}
if (!$foundonealgorithm) {
$usecompression = false;
if ($usecompression) {
if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'br') !== false && is_callable('brotli_compress')) {
$foundonealgorithm++;
}
if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'bz') !== false && is_callable('bzcompress')) {
$foundonealgorithm++;
}
if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false && is_callable('gzencode')) {
$foundonealgorithm++;
}
if (!$foundonealgorithm) {
$usecompression = false;
}
}
//dol_syslog('We found some compression algoithm: '.$foundonealgorithm.' -> usecompression='.$usecompression, LOG_DEBUG);

View File

@ -796,7 +796,7 @@ class BlockedLog
{
$res = $this->db->query("UPDATE ".MAIN_DB_PREFIX."blockedlog SET certified=1 WHERE rowid=".((int) $this->id));
if ($res === false) {
if (!$res) {
return false;
}

View File

@ -148,8 +148,9 @@ class Boms extends DolibarrApi
$sql .= " AND sc.fk_user = ".((int) $search_sale);
}
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -66,7 +66,7 @@ function printDropdownBookmarksList()
// Url to list bookmark
$listbtn = '<a class="top-menu-dropdown-link" title="'.$langs->trans('AddThisPageToBookmarks').'" href="'.DOL_URL_ROOT.'/bookmarks/list.php" >';
$listbtn = '<a class="top-menu-dropdown-link" title="'.$langs->trans('Bookmarks').'" href="'.DOL_URL_ROOT.'/bookmarks/list.php" >';
$listbtn .= img_picto('', 'bookmark', 'class="paddingright"').$langs->trans('Bookmarks').'</a>';
// Url to go on create new bookmark page

View File

@ -175,7 +175,7 @@ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sort
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
print "<tr class=\"liste_titre\">";
print '<tr class="liste_titre">';
//print "<td>&nbsp;</td>";
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "b.rowid", "", $param, 'align="left"', $sortfield, $sortorder);
print_liste_field_titre("Title", $_SERVER["PHP_SELF"], "b.title", "", $param, 'align="left"', $sortfield, $sortorder);
@ -199,7 +199,7 @@ while ($i < min($num, $limit)) {
print '<tr class="oddeven">';
// Id
print '<td class="left">';
print '<td class="nowraponall">';
print $object->getNomUrl(1);
print '</td>';
@ -268,14 +268,12 @@ while ($i < min($num, $limit)) {
print '<td class="right">'.$obj->position."</td>";
// Actions
print '<td class="nowrap right">';
print '<td class="nowraponall right">';
if ($canedit) {
print '<a class="editfielda" href="'.DOL_URL_ROOT.'/bookmarks/card.php?action=edit&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">'.img_edit()."</a>";
print '<a class="editfielda marginleftonly" href="'.DOL_URL_ROOT.'/bookmarks/card.php?action=edit&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">'.img_edit()."</a>";
}
if ($candelete) {
print '<a class="marginleftonly" href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$obj->rowid.'">'.img_delete().'</a>';
} else {
print "&nbsp;";
}
print "</td>";
print "</tr>\n";

View File

@ -145,8 +145,9 @@ class Categories extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -158,8 +158,9 @@ class AgendaEvents extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
@ -817,7 +817,7 @@ if (empty($reshook)) {
}
}
}
} elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('vatforalllines', 'alpha') !== '') {
} elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('vatforalllines', 'alpha') !== '' && $usercancreate) {
// Define vat_rate
$vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0);
$vat_rate = str_replace('*', '', $vat_rate);
@ -835,7 +835,7 @@ if (empty($reshook)) {
$prod_entry_mode = GETPOST('prod_entry_mode');
if ($prod_entry_mode == 'free') {
$idprod = 0;
$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);
$tva_tx = (GETPOST('tva_tx') ? price2num(GETPOST('tva_tx')) : 0);
} else {
$idprod = GETPOST('idprod', 'int');
$tva_tx = '';
@ -2680,7 +2680,7 @@ if ($action == 'create') {
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, $compatibleImportElementsList);
// Show online signature link
$useonlinesignature = 1; // Replace this with 1 when feature to make online signature is ok
$useonlinesignature = 1;
if ($object->statut != Propal::STATUS_DRAFT && $useonlinesignature) {
print '<br><!-- Link to sign -->';

View File

@ -196,8 +196,9 @@ class Proposals extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -199,8 +199,9 @@ class Orders extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -132,11 +132,19 @@ class Account extends CommonObject
public $bic;
/**
* IBAN number (International Bank Account Number). Stored into iban_prefix field into database
* IBAN number (International Bank Account Number). Stored into iban_prefix field into database (TODO Rename field in database)
* @var string
*/
public $iban;
/**
* IBAN number
*
* @var string
* @deprecated see $iban
*/
public $iban_prefix;
/**
* Name of account holder
* @var string

View File

@ -81,8 +81,9 @@ class BankAccounts extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -438,8 +439,9 @@ class BankAccounts extends DolibarrApi
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -257,10 +257,14 @@ $form = new Form($db);
llxHeader('', $langs->trans("BankTransaction"));
$arrayselected = array();
$c = new Categorie($db);
$cats = $c->containing($rowid, Categorie::TYPE_BANK_LINE);
foreach ($cats as $cat) {
$arrayselected[] = $cat->id;
if (is_array($cats)) {
foreach ($cats as $cat) {
$arrayselected[] = $cat->id;
}
}
$head = bankline_prepare_head($rowid);
@ -570,11 +574,15 @@ if ($result) {
// Bank line
print '<tr><td class="toptd">'.$form->editfieldkey('RubriquesTransactions', 'custcats', '', $object, 0).'</td><td>';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_BANK_LINE, null, 'parent', null, null, 1);
$arrayselected = array();
$c = new Categorie($db);
$cats = $c->containing($bankline->id, Categorie::TYPE_BANK_LINE);
foreach ($cats as $cat) {
$arrayselected[] = $cat->id;
if (is_array($cats)) {
foreach ($cats as $cat) {
$arrayselected[] = $cat->id;
}
}
print img_picto('', 'category', 'class="paddingright"').$form->multiselectarray('custcats', $cate_arbo, $arrayselected, null, null, null, null, "90%");
print "</td></tr>";

View File

@ -221,8 +221,9 @@ class Invoices extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -1977,7 +1977,7 @@ class FactureLigneRec extends CommonInvoiceLine
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.' WHERE rowid='.((int) $this->id);
$res = $this->db->query($sql);
if ($res === false) {
if (!$res) {
$error++;
$this->errors[] = $this->db->lasterror();
}

View File

@ -212,7 +212,7 @@ if ($result) {
print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>\n";
print '<td class="right">';
print $bon->LibStatut($obj->statut, 3);
print $bon->LibStatut($obj->statut, 5);
print '</td>';
print '<td class="right"></td>'."\n";

View File

@ -147,8 +147,9 @@ class Contracts extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -51,11 +51,27 @@ if (!defined('NOBROWSERNOTIF')) {
include '../../main.inc.php';
$action = GETPOST('action', 'aZ09');
$signature = GETPOST('signaturebase64');
$ref = GETPOST('ref', 'aZ09');
$mode = GETPOST('mode', 'aZ09');
$SECUREKEY = GETPOST("securekey"); // Secure key
$error = 0;
$response = "";
// Check securitykey
$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
$type = $mode;
$calculatedsecuritykey = dol_hash($securekeyseed.$type.$ref, '0');
if ($calculatedsecuritykey != $SECUREKEY) {
http_response_code(403);
print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref);
exit(-1);
}
/*
* Actions
*/
@ -71,62 +87,76 @@ if ($action == "importSignature") {
if (!empty($signature) && $signature[0] == "image/png;base64") {
$signature = $signature[1];
$data = base64_decode($signature);
$upload_dir = DOL_DATA_ROOT."/".$mode."/".$ref."/";
$date = dol_print_date(dol_now(), "%Y%m%d%H%M%S");
$filename = "signatures/".$date."_signature.png";
if (!is_dir($upload_dir."signatures/")) {
if (!mkdir($upload_dir."signatures/")) {
$response ="error mkdir";
$error++;
if ($mode == "propale" || $mode == 'proposal') {
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
$object = new Propal($db);
$object->fetch(0, $ref);
$upload_dir = !empty($conf->propal->multidir_output[$object->entity])?$conf->propal->multidir_output[$object->entity]:$conf->propal->dir_output;
$upload_dir .= '/'.dol_sanitizeFileName($object->ref).'/';
$date = dol_print_date(dol_now(), "%Y%m%d%H%M%S");
$filename = "signatures/".$date."_signature.png";
if (!is_dir($upload_dir."signatures/")) {
if (!dol_mkdir($upload_dir."signatures/")) {
$response ="Error mkdir. Failed to create dir ".$upload_dir."signatures/";
$error++;
}
}
}
if (!$error) {
$return = file_put_contents($upload_dir.$filename, $data);
if ($return == false) {
$response = 'error file_put_content';
} else {
if ($mode == "propale") {
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
$object = new Propal($db);
$object->fetch(0, $ref);
$pdf = pdf_getInstance();
$pdf->Open();
$pdf->AddPage();
$pagecount = $pdf->setSourceFile($upload_dir.$ref.".pdf");
if (!$error) {
$return = file_put_contents($upload_dir.$filename, $data);
if ($return == false) {
$error++;
$response = 'error file_put_content';
}
}
$tppl = $pdf->importPage(1);
$pdf->useTemplate($tppl);
$pdf->Image($upload_dir.$filename, 129, 239.6, 60, 15);
$pdf->Close();
$pdf->Output($upload_dir.$ref."_signed-".$date.".pdf", "F");
if (!$error) {
$pdf = pdf_getInstance();
$pdf->Open();
$pdf->AddPage();
$pagecount = $pdf->setSourceFile($upload_dir.$ref.".pdf");
$sql = "UPDATE ".MAIN_DB_PREFIX."propal";
$sql .= " SET fk_statut = ".((int) $object::STATUS_SIGNED).", note_private = '".$object->note_private."', date_signature='".$db->idate(dol_now())."'";
$sql .= " WHERE rowid = ".((int) $object->id);
$tppl = $pdf->importPage(1);
$pdf->useTemplate($tppl);
$pdf->Image($upload_dir.$filename, 129, 239.6, 60, 15);
$pdf->Close();
$pdf->Output($upload_dir.$ref."_signed-".$date.".pdf", "F");
dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $db->query($sql);
if (!$resql) {
$error++;
} else {
$num = $db->affected_rows($resql);
}
$sql = "UPDATE ".MAIN_DB_PREFIX."propal";
$sql .= " SET fk_statut = ".((int) $object::STATUS_SIGNED).", note_private = '".$object->note_private."', date_signature='".$db->idate(dol_now())."'";
$sql .= " WHERE rowid = ".((int) $object->id);
if (!$error) {
$db->commit();
$response = "success";
setEventMessage("PropalSigned");
} else {
$db->rollback();
$response = "error sql";
}
dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $db->query($sql);
if (!$resql) {
$error++;
} else {
$num = $db->affected_rows($resql);
}
if (!$error) {
$db->commit();
$response = "success";
setEventMessages("PropalSigned", null, 'warnings');
} else {
$db->rollback();
$error++;
$response = "error sql";
}
}
}
} else {
$error++;
$response = 'error signature_not_found';
}
}
if ($error) {
http_response_code(501);
}
echo $response;

View File

@ -111,12 +111,20 @@ if (empty($conf->bookmark->enabled)) {
if ($i == 0) {
$bookmarkList .= '<br><span class="opacitymedium">'.$langs->trans("NoBookmarks").'</span>';
$bookmarkList .= '<br><br>';
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create&backtopage='.urlencode(DOL_URL_ROOT.'/bookmarks/list.php'), '', !empty($user->rights->bookmark->creer));
$bookmarkList .= '<center>'.$newcardbutton.'</center>';
}
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create&backtopage='.urlencode(DOL_URL_ROOT.'/bookmarks/list.php'), '', !empty($user->rights->bookmark->creer));
// Url to list bookmark
$bookmarkList .= '<br>';
$bookmarkList .= '<a class="top-menu-dropdown-link" title="'.$langs->trans('Bookmarks').'" href="'.DOL_URL_ROOT.'/bookmarks/list.php" >';
$bookmarkList .= img_picto('', 'bookmark', 'class="paddingright"').$langs->trans('Bookmarks').'</a>';
$bookmarkList .= '<br>';
$bookmarkList .= '<br>';
$bookmarkList .= '<center>'.$newcardbutton.'</center>';
$bookmarkList .= '</div>';

View File

@ -1273,7 +1273,7 @@ abstract class CommonObject
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople t on ec.fk_socpeople = t.rowid";
}
$sql .= " WHERE ec.element_id = ".((int) $this->id);
$sql .= " AND ec.fk_c_type_contact=tc.rowid";
$sql .= " AND ec.fk_c_type_contact = tc.rowid";
$sql .= " AND tc.element = '".$this->db->escape($this->element)."'";
if ($code) {
$sql .= " AND tc.code = '".$this->db->escape($code)."'";
@ -1662,8 +1662,8 @@ abstract class CommonObject
* Looks for an object with ref matching the wildcard provided
* It does only work when $this->table_ref_field is set
*
* @param string $ref Wildcard
* @return int >1 = OK, 0 = Not found or table_ref_field not defined, <0 = KO
* @param string $ref Wildcard
* @return int >1 = OK, 0 = Not found or table_ref_field not defined, <0 = KO
*/
public function fetchOneLike($ref)
{
@ -8740,7 +8740,7 @@ abstract class CommonObject
$sql .= " VALUES (".implode(", ", $values).")"; // $values can contains 'abc' or 123
$res = $this->db->query($sql);
if ($res === false) {
if (!$res) {
$error++;
if ($this->db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
$this->errors[] = "ErrorRefAlreadyExists";
@ -8992,7 +8992,7 @@ abstract class CommonObject
$this->db->begin();
if (!$error) {
$res = $this->db->query($sql);
if ($res === false) {
if (!$res) {
$error++;
$this->errors[] = $this->db->lasterror();
}

View File

@ -221,6 +221,7 @@ class dolReceiptPrinter extends Printer
'dol_value_mysoc_idprof6' => 'ProfId6',
'dol_value_mysoc_tva_intra' => 'VATIntra',
'dol_value_mysoc_capital' => 'Capital',
'dol_value_mysoc_url' => 'Web',
'dol_value_vendor_lastname' => 'VendorLastname',
'dol_value_vendor_firstname' => 'VendorFirstname',
'dol_value_vendor_mail' => 'VendorEmail',
@ -607,6 +608,7 @@ class dolReceiptPrinter extends Printer
$this->template = str_replace('{dol_value_mysoc_idprof6}', $mysoc->idprof6, $this->template);
$this->template = str_replace('{dol_value_mysoc_tva_intra}', $mysoc->tva_intra, $this->template);
$this->template = str_replace('{dol_value_mysoc_capital}', $mysoc->capital, $this->template);
$this->template = str_replace('{dol_value_mysoc_url}', $mysoc->url, $this->template);
$this->template = str_replace('{dol_value_vendor_firstname}', $user->firstname, $this->template);
$this->template = str_replace('{dol_value_vendor_lastname}', $user->lastname, $this->template);
@ -672,9 +674,9 @@ class dolReceiptPrinter extends Printer
$vatarray[$line->tva_tx] += $line->total_tva;
}
foreach ($vatarray as $vatkey => $vatvalue) {
$spacestoadd = $nbcharactbyline - strlen($vatkey) - 12;
$spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0);
$this->printer->text($spaces.$vatkey.'% '.str_pad(price($vatvalue), 10, ' ', STR_PAD_LEFT)."\n");
$spacestoadd = $nbcharactbyline - strlen($vatkey) - 12;
$spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0);
$this->printer->text($spaces.$vatkey.'% '.str_pad(price($vatvalue), 10, ' ', STR_PAD_LEFT)."\n");
}
break;
case 'DOL_PRINT_OBJECT_TAX1':

View File

@ -347,8 +347,7 @@ class EmailSenderProfile extends CommonObject
*/
public function info($id)
{
$sql = 'SELECT rowid, date_creation as datec, tms as datem,';
$sql .= ' fk_user_creat, fk_user_modif';
$sql = 'SELECT rowid, date_creation as datec, tms as datem';
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
$sql .= ' WHERE t.rowid = '.((int) $id);
$result = $this->db->query($sql);
@ -356,27 +355,9 @@ class EmailSenderProfile extends CommonObject
if ($this->db->num_rows($result)) {
$obj = $this->db->fetch_object($result);
$this->id = $obj->rowid;
if ($obj->fk_user_author) {
$cuser = new User($this->db);
$cuser->fetch($obj->fk_user_author);
$this->user_creation = $cuser;
}
if ($obj->fk_user_valid) {
$vuser = new User($this->db);
$vuser->fetch($obj->fk_user_valid);
$this->user_validation = $vuser;
}
if ($obj->fk_user_cloture) {
$cluser = new User($this->db);
$cluser->fetch($obj->fk_user_cloture);
$this->user_cloture = $cluser;
}
$this->date_creation = $this->db->jdate($obj->datec);
$this->date_modification = $this->db->jdate($obj->datem);
$this->date_validation = $this->db->jdate($obj->datev);
}
$this->db->free($result);

View File

@ -925,6 +925,7 @@ class ExtraFields
// Old usage
$label = $this->attribute_label[$key];
$type = $this->attribute_type[$key];
$list = $this->attribute_list[$key];
$hidden = (empty($list) ? 1 : 0); // If empty, we are sure it is hidden, otherwise we show. If it depends on mode (view/create/edit form or list, this must be filtered by caller)
}

View File

@ -75,7 +75,7 @@ class FormAdmin
// If the language to select is not inside the list of available language and empty value is not available, we must find
// an alternative as the language code to pre-select (to avoid to have first element in list pre-selected).
if ($selected && !isset($langs_available[$selected]) && empty($showempty)) {
if ($selected && !array_key_exists($selected, $langs_available) && empty($showempty)) {
$tmparray = explode('_', $selected);
if (!empty($tmparray[1])) {
$selected = getLanguageCodeFromCountryCode($tmparray[1]);

View File

@ -761,7 +761,7 @@ class FormFile
$arraykeys = array_keys($modellist);
$modelselected = $arraykeys[0];
}
$morecss = 'maxwidth200';
$morecss = 'minwidth75 maxwidth200';
if ($conf->browser->layout == 'phone') {
$morecss = 'maxwidth100';
}
@ -1646,6 +1646,7 @@ class FormFile
print '</tr>'."\n";
// To show ref or specific information according to view to show (defined by $module)
$object_instance = null;
if ($modulepart == 'company') {
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
$object_instance = new Societe($this->db);
@ -1813,21 +1814,26 @@ class FormFile
if (!$id && !$ref) {
continue;
}
$found = 0;
if (!empty($this->cache_objects[$modulepart.'_'.$id.'_'.$ref])) {
$found = 1;
} else {
//print 'Fetch '.$id." - ".$ref.' class='.get_class($object_instance).'<br>';
if ($id) {
$result = $object_instance->fetch($id);
} else {
//fetchOneLike looks for objects with wildcards in its reference.
//It is useful for those masks who get underscores instead of their actual symbols
//fetchOneLike requires some info in the object. If it doesn't have it, then 0 is returned
//that's why we look only into fetchOneLike when fetch returns 0
if (!$result = $object_instance->fetch('', $ref)) {
$result = $object_instance->fetchOneLike($ref);
$result = 0;
if (is_object($object_instance)) {
if ($id) {
$result = $object_instance->fetch($id);
} else {
if (!($result = $object_instance->fetch('', $ref))) {
//fetchOneLike looks for objects with wildcards in its reference.
//It is useful for those masks who get underscores instead of their actual symbols (because the _ had replaced a forbiddn char)
//fetchOneLike requires some info in the object. If it doesn't have it, then 0 is returned
//that's why we look only into fetchOneLike when fetch returns 0
// TODO Remove this part ?
$result = $object_instance->fetchOneLike($ref);
}
}
}

View File

@ -105,8 +105,9 @@ class FormSetup
/**
* Generate an attributes string form an input array
* @param array $attributes an array of attributes keys and values,
* @return string
*
* @param array $attributes an array of attributes keys and values,
* @return string attribute string
*/
static public function generateAttributesStringFromArray($attributes)
{
@ -125,8 +126,10 @@ class FormSetup
/**
* @param bool $editMode true will display output on edit mod
* @return string
* generateOutput
*
* @param bool $editMode true will display output on edit mod
* @return string html output
*/
public function generateOutput($editMode = false)
{
@ -188,8 +191,10 @@ class FormSetup
}
/**
* @param bool $editMode true will display output on edit mod
* @return string
* generateTableOutput
*
* @param bool $editMode true will display output on edit mod
* @return string html output
*/
public function generateTableOutput($editMode = false)
{
@ -230,12 +235,13 @@ class FormSetup
}
/**
* @param bool $noMessageInUpdate display event message on errors and success
* @return void|null
* saveConfFromPost
*
* @param bool $noMessageInUpdate display event message on errors and success
* @return void|null
*/
public function saveConfFromPost($noMessageInUpdate = false)
{
if (empty($this->items)) {
return null;
}
@ -266,9 +272,11 @@ class FormSetup
}
/**
* @param FormSetupItem $item the setup item
* @param bool $editMode Display as edit mod
* @return string the html output for an setup item
* generateLineOutput
*
* @param FormSetupItem $item the setup item
* @param bool $editMode Display as edit mod
* @return string the html output for an setup item
*/
public function generateLineOutput($item, $editMode = false)
{
@ -306,8 +314,9 @@ class FormSetup
/**
* @param array $params an array of arrays of params from old modulBuilder params
* @deprecated was used to test module builder convertion to this form usage
* Method used to test module builder convertion to this form usage
*
* @param array $params an array of arrays of params from old modulBuilder params
* @return null
*/
public function addItemsFromParamsArray($params)
@ -321,10 +330,11 @@ class FormSetup
/**
* From old
* @param string $confKey the conf name to store
* @param array $params an array of params from old modulBuilder params
* @deprecated was used to test module builder convertion to this form usage
* @return bool
* Method was used to test module builder convertion to this form usage.
*
* @param string $confKey the conf name to store
* @param array $params an array of params from old modulBuilder params
* @return bool
*/
public function addItemFromParams($confKey, $params)
{
@ -359,9 +369,10 @@ class FormSetup
}
/**
* used to export param array for /core/actions_setmoduleoptions.inc.php template
* Used to export param array for /core/actions_setmoduleoptions.inc.php template
* Method exists only for manage setup convertion
*
* @return array $arrayofparameters for /core/actions_setmoduleoptions.inc.php
* @deprecated yes this method came deprecated because it exists only for manage setup convertion
*/
public function exportItemsAsParamsArray()
{
@ -379,6 +390,7 @@ class FormSetup
/**
* Reload for each item default conf
* note: this will override custom configuration
*
* @return bool
*/
public function reloadConfs()
@ -396,9 +408,10 @@ class FormSetup
/**
* Create a new item
* the tagret is useful with hooks : that allow externals modules to add setup items on good place
* @param $confKey the conf key used in database
* @param string $targetItemKey target item used to place the new item beside
* @param bool $insertAfterTarget insert before or after target item ?
*
* @param string $confKey the conf key used in database
* @param string $targetItemKey target item used to place the new item beside
* @param bool $insertAfterTarget insert before or after target item ?
* @return FormSetupItem the new setup item created
*/
public function newItem($confKey, $targetItemKey = false, $insertAfterTarget = false)
@ -436,6 +449,7 @@ class FormSetup
/**
* Sort items according to rank
*
* @return bool
*/
public function sortingItems()
@ -445,6 +459,8 @@ class FormSetup
}
/**
* getCurentItemMaxRank
*
* @param bool $cache To use cache or not
* @return int
*/
@ -469,8 +485,9 @@ class FormSetup
/**
* set new max rank if needed
* @param int $rank the item rank
* @return int|void
*
* @param int $rank the item rank
* @return int|void new max rank
*/
public function setItemMaxRank($rank)
{
@ -479,10 +496,10 @@ class FormSetup
/**
* get item position rank from item key
* get item position rank from item key
*
* @param string $itemKey the item key
* @return int rank on success and -1 on error
* @param string $itemKey the item key
* @return int rank on success and -1 on error
*/
public function getLineRank($itemKey)
{
@ -498,7 +515,7 @@ class FormSetup
*
* @param FormSetupItem $a formSetup item
* @param FormSetupItem $b formSetup item
* @return int Return compare result
* @return int Return compare result
*/
public function itemSort(FormSetupItem $a, FormSetupItem $b)
{

View File

@ -108,7 +108,9 @@ class Notify
global $conf, $langs;
$langs->load("mails");
// Get full list of all notifications subscribed for $action, $socid and $object
$listofnotiftodo = $this->getNotificationsArray($action, $socid, $object, 0);
if (!empty($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER)) {
foreach ($listofnotiftodo as $val) {
if ($val['type'] == 'touser') {
@ -117,6 +119,14 @@ class Notify
}
}
}
if (!empty($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_CONTACT)) {
foreach ($listofnotiftodo as $val) {
if ($val['type'] == 'tocontact') {
unset($listofnotiftodo[$val['email']]);
//$listofnotiftodo = array_merge($listofnotiftodo);
}
}
}
if (!empty($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX)) {
foreach ($listofnotiftodo as $val) {
if ($val['type'] == 'tofixedemail') {

View File

@ -227,7 +227,7 @@ interface Database
* Note that with Mysql, this parameter is not used as Myssql can already commit a transaction even if one request is in error, without using savepoints.
* @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...)
* @param int $result_mode Result mode
* @return resource Resultset of answer
* @return bool|resource Resultset of answer or false
*/
public function query($query, $usesavepoint = 0, $type = 'auto', $result_mode = 0);

View File

@ -495,7 +495,7 @@ class DoliDBPgsql extends DoliDB
* @param int $usesavepoint 0=Default mode, 1=Run a savepoint before and a rollback to savepoint if error (this allow to have some request with errors inside global transactions).
* @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...)
* @param int $result_mode Result mode (not used with pgsql)
* @return false|resource Resultset of answer
* @return bool|resource Resultset of answer
*/
public function query($query, $usesavepoint = 0, $type = 'auto', $result_mode = 0)
{

View File

@ -394,7 +394,7 @@ class DoliDBSqlite3 extends DoliDB
* Note that with Mysql, this parameter is not used as Myssql can already commit a transaction even if one request is in error, without using savepoints.
* @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...)
* @param int $result_mode Result mode (not used with sqlite)
* @return SQLite3Result Resultset of answer
* @return bool|SQLite3Result Resultset of answer
*/
public function query($query, $usesavepoint = 0, $type = 'auto', $result_mode = 0)
{
@ -407,6 +407,7 @@ class DoliDBSqlite3 extends DoliDB
$this->error = '';
// Convert MySQL syntax to SQLite syntax
$reg = array();
if (preg_match('/ALTER\s+TABLE\s*(.*)\s*ADD\s+CONSTRAINT\s+(.*)\s*FOREIGN\s+KEY\s*\(([\w,\s]+)\)\s*REFERENCES\s+(\w+)\s*\(([\w,\s]+)\)/i', $query, $reg)) {
// Ajout d'une clef étrangère à la table
// procédure de remplacement de la table pour ajouter la contrainte

View File

@ -269,9 +269,6 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
if ($features == 'product') {
$features = 'produit';
}
if ($features == 'banque') {
$parentfortableentity = 'fk_account@bank_account';
}
// Get more permissions checks from hooks

View File

@ -18,7 +18,7 @@
*/
/**
* Return string with full Url
* Return string with full online Url to accept and sign a quote
*
* @param string $type Type of URL ('proposal', ...)
* @param string $ref Ref of object
@ -58,13 +58,27 @@ function showOnlineSignatureUrl($type, $ref)
*/
function getOnlineSignatureUrl($mode, $type, $ref = '')
{
global $conf, $db, $langs;
global $conf, $db, $langs, $dolibarr_main_url_root;
$ref = str_replace(' ', '', $ref);
$out = '';
// Define $urlwithroot
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
$localorexternal = 1; // external
$urltouse = DOL_MAIN_URL_ROOT;
if ($localorexternal) {
$urltouse = $urlwithroot;
}
$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
if ($type == 'proposal') {
$out = DOL_MAIN_URL_ROOT.'/public/onlinesign/newonlinesign.php?source=proposal&ref='.($mode ? '<span style="color: #666666">' : '');
$out = $urltouse.'/public/onlinesign/newonlinesign.php?source=proposal&ref='.($mode ? '<span style="color: #666666">' : '');
if ($mode == 1) {
$out .= 'proposal_ref';
}
@ -72,6 +86,12 @@ function getOnlineSignatureUrl($mode, $type, $ref = '')
$out .= urlencode($ref);
}
$out .= ($mode ? '</span>' : '');
if ($mode == 1) {
$out .= "hash('".$securekeyseed."' + '".$type."' + proposal_ref)";
} else {
$out .= '&securekey='.dol_hash($securekeyseed.$type.$ref, '0');
}
/*
if ($mode == 1) {
$out .= '&hashp=<span style="color: #666666">hash_of_file</span>';
} else {
@ -94,13 +114,15 @@ function getOnlineSignatureUrl($mode, $type, $ref = '')
} else {
$out .= '&hashp='.$hashp;
}
}
}*/
}
// For multicompany
/*
if (!empty($out)) {
$out .= "&entity=".$conf->entity; // Check the entity because He may be the same reference in several entities
}
*/
return $out;
}

View File

@ -283,6 +283,8 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)', __HANDLER__, 'left', 2420__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_expensereport', 2400__+MAX_llx_menu__, '/accountancy/expensereport/index.php?mainmenu=accountancy&amp;leftmenu=accountancy_dispatch_expensereport', 'ExpenseReportsVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 5, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS) && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2421__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS) && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2422__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__);
-- Export accounting documents
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2436__+MAX_llx_menu__, 'accountancy', 'accountancy_files', 2400__+MAX_llx_menu__, '/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files', 'AccountantFiles', 1, 'accountancy', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__);
-- Journals
--insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2705__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '', 'Journalization', 1, 'main', '$user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
--insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2707__+MAX_llx_menu__, 'accountancy', '', 2705__+MAX_llx_menu__, '/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3', 'BankJournal', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
@ -295,8 +297,6 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2432__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&leftmenu=accountancy_bookeeping', 'Bookkeeping', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 12, __ENTITY__);
-- Journals
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2434__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_bookeeping', 'Journals', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 15, __ENTITY__);
-- Export accounting documents
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2436__+MAX_llx_menu__, 'accountancy', 'accountancy_files', 2400__+MAX_llx_menu__, '/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files', 'AccountantFiles', 1, 'accountancy', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__);
-- Closure
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2437__+MAX_llx_menu__, 'accountancy', 'accountancy_closure', 2400__+MAX_llx_menu__, '/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure', 'MenuAccountancyClosure', 1, 'accountancy', '$user->rights->accounting->fiscalyear->write', '', 0, 17, __ENTITY__);
-- Reports

View File

@ -1348,6 +1348,12 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$db->free($resql);
}
// Files
if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU)) {
$newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&amp;leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->rights->accounting->mouvements->lire);
}
// Accounting
$newmenu->add("/accountancy/index.php?leftmenu=accountancy_accountancy", $langs->trans("MenuAccountancy"), 0, $user->rights->accounting->mouvements->lire || $user->rights->accounting->comptarapport->lire, '', $mainmenu, 'accountancy', 1, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"'));
@ -1360,11 +1366,6 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
// Account Balance
$newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&amp;leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->rights->accounting->mouvements->lire);
// Files
if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU)) {
$newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&amp;leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->rights->accounting->mouvements->lire);
}
// Closure
$newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&amp;leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->rights->accounting->fiscalyear->write, '', $mainmenu, 'closure');

View File

@ -1,4 +1,6 @@
<?php
use Stripe\BankAccount;
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2020 Josep Lluís Amador <joseplluis@lliuretic.cat>
*
@ -236,8 +238,15 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$posY = $pdf->GetY();
$posY += 2;
$pdf->SetXY($this->marge_gauche, $posY);
$ics = '';
if (!empty($conf->global->PRELEVEMENT_ICS)) {
$idbankfordirectdebit = getDolGlobalInt('PRELEVEMENT_ID_BANKACCOUNT');
if ($idbankfordirectdebit > 0) {
$tmpbankfordirectdebit = new Account($this->db);
$tmpbankfordirectdebit->fetch($idbankfordirectdebit);
$ics = $tmpbankfordirectdebit->ics; // ICS for direct debit
}
if (empty($ics) && !empty($conf->global->PRELEVEMENT_ICS)) {
$ics = $conf->global->PRELEVEMENT_ICS;
}
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorIdentifier").' ('.$outputlangs->transnoentitiesnoconv("ICS").') : '.$ics, 0, 'L');
@ -251,7 +260,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$posY += 1;
$pdf->SetXY($this->marge_gauche, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("Address").' : ', 0, 'L');
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $mysoc->getFullAddress(), 0, 'L');
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $mysoc->getFullAddress(1), 0, 'L');
$posY = $pdf->GetY();
$posY += 3;
@ -304,7 +313,10 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$address = '______________________________________________';
if ($thirdparty->id > 0) {
$address = $thirdparty->getFullAddress();
$tmpaddresswithoutcountry = $thirdparty->getFullAddress(); // we test on address without country
if ($tmpaddresswithoutcountry) {
$address = $thirdparty->getFullAddress(1); // full address
}
}
$posY = $pdf->GetY();
$posY += 1;
@ -490,7 +502,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->MultiCell(100, 6, $mysoc->name, 0, 'L', 0);
$pdf->MultiCell(100, 6, $outputlangs->convToOutputCharset($mysoc->getFullAddress()), 0, 'L', 0);
$pdf->MultiCell(100, 6, $outputlangs->convToOutputCharset($mysoc->getFullAddress(1)), 0, 'L', 0);
$posy = $pdf->GetY() + 2;
return $posy;

View File

@ -814,7 +814,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L');
// Show default IBAN account
$sql = "SELECT iban_prefix";
$sql = "SELECT iban_prefix as iban";
$sql .= " FROM ".MAIN_DB_PREFIX."societe_rib as rib";
$sql .= " WHERE fk_soc = ".($object->thirdparty->id);
$sql .= " AND rib.default_rib = 1";
@ -823,7 +823,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
$resql = $this->db->query($sql);
if ($resql) {
$obj = $this->db->fetch_object($resql);
$iban = $obj->iban_prefix;
$iban = $obj->iban;
}
if (!empty($iban)) {

View File

@ -128,8 +128,9 @@ class Donations extends DolibarrApi
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -144,8 +144,9 @@ class Shipments extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -2096,6 +2096,7 @@ if ($action == 'create') {
$titlealt = '';
if (!empty($conf->accounting->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
$accountingaccount = new AccountingAccount($db);
$resaccountingaccount = $accountingaccount->fetch(0, $line->type_fees_accountancy_code, 1);
//$titlealt .= '<span class="opacitymedium">';

View File

@ -117,8 +117,9 @@ class ExpenseReports extends DolibarrApi
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -151,8 +151,9 @@ class Interventions extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -34,7 +34,7 @@ if (!defined('DOL_APPLICATION_TITLE')) {
define('DOL_APPLICATION_TITLE', 'Dolibarr');
}
if (!defined('DOL_VERSION')) {
define('DOL_VERSION', '15.0.0-alpha'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
define('DOL_VERSION', '15.0.0-beta'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
}
if (!defined('EURO')) {

View File

@ -159,8 +159,9 @@ class SupplierInvoices extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -175,8 +175,9 @@ class SupplierOrders extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -1,863 +0,0 @@
2007-08-20 00:48 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_AlArabiya.sfd: Diagonal marks
2007-08-20 00:25 Khaled Hosny <khaledhosny@eglug.org>
* README: Added Release notes, preparing for 2.0 release.
2007-08-19 23:19 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_AlArabiya.sfd: Stack diacritics definition
2007-08-19 22:56 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Tholoth.sfd:
* Added 'rlg' lookup table and subtable and registered stacked
diacritic ligatures.
* kasrah and kasratan were too close to the base glyph, fixed.
2007-08-19 22:28 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_AlHor.sfd, ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd,
ae_AlYarmook.sfd, ae_Arab.sfd, ae_Cortoba.sfd, ae_Furat.sfd,
ae_Graph.sfd, ae_Kayrawan.sfd, ae_Khalid.sfd, ae_Mashq-Bold.sfd,
ae_Mashq.sfd, ae_Metal.sfd, ae_Nada.sfd, ae_Nagham.sfd,
ae_Ostorah.sfd, ae_Ouhod-Bold.sfd, ae_Petra.sfd,
ae_Rasheeq-Bold.sfd, ae_Rehan.sfd, ae_Salem.sfd, ae_Shado.sfd,
ae_Sharjah.sfd, ae_Sindbad.sfd, ae_Tarablus.sfd: Scaled up
diacritic glyphs, this makes them more readable.
2007-08-19 22:03 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_AlArabiya.sfd: New sukun, removed wrong anchors from
kasrah
2007-08-19 20:26 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlMothnna-Bold.sfd: Added 'rlg' lookup table and subtable
and registered stacked diacritic ligatures.
2007-08-19 18:28 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_AlMothnna-Bold.sfd: Fixed shaddas
2007-08-19 18:01 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_AlMothnna-Bold.sfd: Stacked diacrititcs
2007-08-19 14:49 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlArabiya.sfd: Removed mark2mark anchors, now we use
ligature substitution for stacked diacritics instead of anchors.
Added 'rlg' lookup table and subtable and registered stacked
diacritic ligatures.
2007-08-19 02:30 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_AlArabiya.sfd: Stacked diacritics added
2007-08-19 01:53 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ArabicReesha.sfd:
* Added to new ligatures; <fathatan><alef isolated> and
<fathatan><alef final>.
* Small fixes to Jeem isolated width.
2007-08-18 21:30 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_AlMothnna-Bold.sfd: Diacritics fixed except allahisolated
ligature
2007-08-18 20:13 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlMothnna-Bold.sfd: Removed old, buggy, anchors and auto
added new ones, needs manual editing.
2007-08-18 19:11 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_AlMothnna-Bold.sfd: New shadda, modified sukun to meet the
other marks
2007-08-18 17:20 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_AlArabiya.sfd: New diacritics for ae_AlArabiya.sfd
2007-08-17 23:19 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Tholoth.sfd: ae_Tholoth.sfd: Added glyphs U+FC5E - U+FC62.
2007-08-16 14:56 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlMohanad.sfd: AlMohanad: Fixed U+FEDA (kaf final) to take
the shape of ordinary final kaf rather than the long variant.
2007-08-15 14:25 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ArabicReesha.sfd: ArabicReesha.sfd: Fixed a bug that caused
some isolated glyphs to have more space to the right.
2007-08-15 12:02 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd, ae_AlYarmook.sfd,
ae_Electron.sfd, ae_Hani.sfd, ae_Haramain.sfd, ae_Khalid.sfd,
ae_Rasheeq-Bold.sfd, ae_Rehan.sfd, ae_Sharjah.sfd,
ae_Tarablus.sfd, ae_Tholoth.sfd: Add new 'liga' table without
"Ignore Combining Marks" flag, allahisolated ligature belong to that
table now, so when allahisolated has a tashkil on it, the ligature
will be ignored and will use normal glyphs instead.
2007-08-15 11:05 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Granada.sfd, ae_Graph.sfd, ae_Haramain.sfd,
ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd, ae_Sindbad.sfd,
ae_Tarablus.sfd: Added "Ignore Combining Marks flag" to 'liga'
table.
2007-08-15 10:35 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ArabicReesha.sfd: ArabicReesha: New font based on SIL's
Scheherazade, first version.
2007-08-15 00:23 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlArabiya.sfd: Shadda was missing mark2mark below anchor.
2007-08-14 23:28 Mohammed Adnene Trojette <adn@diwi.org>
* Makefile: GPL has been removed
2007-08-14 23:21 Mohammed Adnene Trojette <adn@diwi.org>
* COPYING, README: Copyright informations
2007-08-14 23:05 Khaled Hosny <khaledhosny@eglug.org>
* COPYING: Updated to refer to FreeFonts project.
2007-08-14 22:56 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Salem.sfd: Updated the copyright statement, to mention GPL
font exception and FreeFonts project, again
2007-08-14 22:43 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Salem.sfd: Revert to 1.7 and added Allah anchors(again).
2007-08-14 21:35 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Tholoth.sfd: Minor positioning fix
2007-08-14 21:12 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Tholoth.sfd: Added missed U+0647.
2007-08-14 18:37 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_AlArabiya.sfd, ae_AlBattar.sfd, ae_AlHor.sfd,
ae_AlManzomah.sfd, ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd,
ae_AlMothnna-Bold.sfd, ae_AlYarmook.sfd, ae_Arab.sfd,
ae_Cortoba.sfd, ae_Dimnah.sfd, ae_Electron.sfd, ae_Furat.sfd,
ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd, ae_Haramain.sfd,
ae_Hor.sfd, ae_Japan.sfd, ae_Jet.sfd, ae_Kayrawan.sfd,
ae_Khalid.sfd, ae_Mashq-Bold.sfd, ae_Mashq.sfd, ae_Metal.sfd,
ae_Nada.sfd, ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd,
ae_Ouhod-Bold.sfd, ae_Petra.sfd, ae_Rasheeq-Bold.sfd,
ae_Rehan.sfd, ae_Salem.sfd, ae_Shado.sfd, ae_Sharjah.sfd,
ae_Sindbad.sfd, ae_Tarablus.sfd, ae_Tholoth.sfd: Updated the
copyright statement, to mention GPL font exception and FreeFonts
project.
2007-08-13 22:18 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_AlArabiya.sfd, ae_AlBattar.sfd, ae_AlManzomah.sfd,
ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd, ae_AlMothnna-Bold.sfd,
ae_Arab.sfd, ae_Cortoba.sfd, ae_Electron.sfd, ae_Furat.sfd,
ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd, ae_Haramain.sfd,
ae_Hor.sfd, ae_Jet.sfd, ae_Kayrawan.sfd, ae_Mashq-Bold.sfd,
ae_Mashq.sfd, ae_Nada.sfd, ae_Nagham.sfd, ae_Nice.sfd,
ae_Ostorah.sfd, ae_Ouhod-Bold.sfd, ae_Petra.sfd,
ae_Rasheeq-Bold.sfd, ae_Rehan.sfd, ae_Salem.sfd, ae_Shado.sfd,
ae_Sharjah.sfd, ae_Sindbad.sfd, ae_Tarablus.sfd, ae_Tholoth.sfd:
* Add missed mark2mark anchors in the affected files, though we
aren't going to use this on the long run, but I'll leave that task
for 2.1 .
* Reencoded all files to unicode glyph map.
2007-08-13 14:47 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Petra.sfd, ae_Shado.sfd: ae_Petra.sfd, ae_Shado.sfd:
Full support for diacritics positioning by Osama Khalid.
2007-08-13 10:38 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Hor.sfd, ae_Sharjah.sfd:
* ae_Hor: Full support for diacritics positioning by Fahd.
* ae_Sharjah: Full support for diacritics positioning by Fahd.
2007-08-13 05:34 Youssef Chahibi <chahibi@gmail.com>
* sfd/: ae_Nice.sfd, ae_Tarablus.sfd: Full diacritics supports,
needs a check
2007-08-13 05:24 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_Nagham.sfd: Full diacritics supports, needs a check
2007-08-13 05:08 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_Haramain.sfd: Full diacritics supports, needs a check
2007-08-13 04:42 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_Graph.sfd: Full diacritics supports, needs a check
2007-08-13 04:38 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_Granada.sfd: Full diacritics supports, needs a check
2007-08-13 03:28 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Ostorah.sfd: ae_Ostorah.sfd: Full support for diacritic
positioning.
2007-08-13 02:13 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_Haramain.sfd: Done: replaced ugly marks, repositioned
below marks
2007-08-13 01:31 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_Graph.sfd: Done, needs to be checked
2007-08-13 01:16 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_Granada.sfd: Done, needs to be checked
2007-08-12 23:05 Youssef Chahibi <chahibi@gmail.com>
* sfd/: ae_Tarablus.sfd: First steps
2007-08-12 18:24 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Electron.sfd: ae_Electron.sfd: Full support for diacritic
positioning.
2007-08-12 16:06 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Hani.sfd: ae_Hani.sfd: Full support for diacritic
positioning by Osama Khaled
2007-08-11 23:33 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Ouhod-Bold.sfd: ae_Ouhod-Bold.sfd: Full support for
diacritic positioning.
2007-08-11 21:28 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Rasheeq-Bold.sfd: ae_Rasheeq-Bold.sfd: Full diacritic
support.
2007-08-11 15:09 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Hor.sfd: some fixes
2007-08-11 14:55 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Electron.sfd, ae_Granada.sfd, ae_Graph.sfd,
ae_Haramain.sfd, ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd,
ae_Ouhod-Bold.sfd, ae_Rasheeq-Bold.sfd, ae_Shado.sfd,
ae_Sharjah.sfd, ae_Tarablus.sfd: More tweaking, it is ready for
manual editing now (I hope so).
2007-08-11 11:08 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Hor.sfd: Fahd: I updated the anchor points, please use
this instead of the old version.
2007-08-11 10:45 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Electron.sfd, ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd,
ae_Haramain.sfd, ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd,
ae_Ouhod-Bold.sfd, ae_Petra.sfd, ae_Rasheeq-Bold.sfd,
ae_Shado.sfd, ae_Sharjah.sfd, ae_Tarablus.sfd: Replaced old
anchor points with new ones and better automatic positioning using
the improved addanchors.pe script. Please update your local copy
before doing any further work, this will make our life easier.
2007-08-11 10:25 Khaled Hosny <khaledhosny@eglug.org>
* tools/addanchors.pe: Now X and Y values are computed to produce a
far better result, the needed manual tweaking is very little now.
2007-08-10 01:27 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Nada.sfd: ae_Nada.sfd: Full support for diacritic
positioning by Fahd AlSaidi.
2007-08-07 23:47 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlYarmook.sfd:
* ae_AlYarmook.sfd: Changed font name and other related feilds from
AlYermook to AlYarmook
* ae_AlYarmook.sfd: Full support for diacritic positioning.
2007-08-07 00:22 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Mashq-Bold.sfd: sfd/ae_Mashq-Bold.sfd: Full support for
diacritic positioning.
2007-08-06 02:58 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Rehan.sfd: Mark to mark ligatures were too close, fixed.
2007-08-04 20:14 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Rehan.sfd: ae_Rehan.sfd: Full support for diacritic
positioning.
2007-08-04 01:22 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Mashq.sfd: ae_Mashq.sfd: Full support for diacritic
positioning.
2007-08-04 01:19 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Khalid.sfd: Reencoded the file to Unicode.
2007-08-04 01:16 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Kayrawan.sfd: Fixed ArabicMark2MarkBelow anchor point.
Reencoded the file to Unicode.
2007-08-03 06:12 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_Kayrawan.sfd: Fixed two letters ligatures diacritics
2007-08-03 05:55 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_Kayrawan.sfd: Added لله ligature diacritics
2007-08-03 05:01 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_Kayrawan.sfd: Ignore combining marks set
2007-08-03 04:51 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_Kayrawan.sfd: Full diacritics support -
ArabicMark2MarkBelow need to be checked
2007-08-03 02:40 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Salem.sfd: Added and positioned anchors for Allah glyph.
2007-08-03 02:32 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Dimnah.sfd: ae_Dimnah.sfd: Full support for diacritic
positioning.
2007-08-03 01:26 Youssef Chahibi <chahibi@gmail.com>
* sfd/ae_Kayrawan.sfd: First steps in font editing
2007-08-03 00:10 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Salem.sfd: ae_Salem.sfd: Full diacritic support.
2007-08-02 04:50 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Arab.sfd: Fixed ligatures anchor points.
2007-08-02 02:15 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Arab.sfd: Support for diacritic positioning by Osama
Khalid.
2007-08-01 23:09 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlManzomah.sfd: ae_AlManzomah.sfd: Full support for
diacritic positioning.
2007-08-01 01:56 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Khalid.sfd: ae_Khalid.sfd: Full support for diacritic
positioning.
2007-07-28 11:43 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlMateen-Bold.sfd: ae_AlMateen-Bold.sfd: Full support for
diacritic positioning.
2007-07-27 22:16 Afief Halumi <afief.h@gmail.com>
* Makefile: New make targets as requested by KhaledHosney.
2007-07-27 21:04 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlHor.sfd: ae_AlHor.sfd: Full diacritic support
2007-07-26 10:14 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Jet.sfd: ./sfd/ae_Jet.sfd: Full diacritic support.
2007-07-26 01:38 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Japan.sfd: Aeif, you forgot the ligatures and letter beh
isolated, fixed
2007-07-25 14:41 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Metal.sfd: Add anchor points for لله ligature
2007-07-25 12:52 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Metal.sfd: ae_Metal: Full diacritic support.
2007-07-25 01:36 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Japan.sfd: ae_Japan: Full diacritic support.
2007-07-25 01:28 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Cortoba.sfd: minor fix
2007-07-25 00:24 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Cortoba.sfd:
----------------------------------------------------------------------ae_Cortoba.sfd: Full support for diacritic positioning.
2007-07-24 18:34 Khaled Hosny <khaledhosny@eglug.org>
* tools/generate.sh: not needed any more, use 'make' instead
2007-07-24 18:31 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Sindbad.sfd: Add anchor points for لله ligature
2007-07-24 18:04 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlArabiya.sfd: Fixed ligatures anchor points
2007-07-24 17:55 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Furat.sfd: Add anchor points for لله ligature
2007-07-23 23:16 Khaled Hosny <khaledhosny@eglug.org>
* README, README.cvs:
- new readme file to explain how to build ttf onts from our cvs
tree.
2007-07-23 23:01 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlBattar.sfd: few fixes in the diacritic positions
2007-07-23 13:56 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlBattar.sfd: ae_AlBattar.sfd, full support for diacritic
positioning.
2007-07-23 05:28 Afief Halumi <afief.h@gmail.com>
* Makefile: Now doesn't rebuild untouched fonts, should save some
server cycles.
2007-07-23 04:00 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Sindbad.sfd: Unchecked 'compact' option
2007-07-23 00:16 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Sindbad.sfd:
- Add the missed "Ignore Combining Marks" feature to Arabic liga
lookuptable, Afief please remember this.
- Few changes in ArabicBelow anchor points placement.
2007-07-22 14:42 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlBattar.sfd: Diacritic support, for isolated glyphs only.
2007-07-22 00:43 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Sindbad.sfd: Full support for diacritic positioning.
2007-07-21 21:38 Khaled Hosny <khaledhosny@eglug.org>
* Makefile: fixed "clean" to remove the bzipped archive.
2007-07-21 21:34 Khaled Hosny <khaledhosny@eglug.org>
* Makefile:
- All files are under ae_fonts dir now.
- The archive is bzipped.
2007-07-21 20:05 Afief Halumi <afief.h@gmail.com>
* Makefile: Commited the Makefile. Hope you like it.
2007-07-21 19:11 Khaled Hosny <khaledhosny@eglug.org>
* tools/generate.pe: Add a usage note.
2007-07-21 19:09 Khaled Hosny <khaledhosny@eglug.org>
* tools/generate.pe: Now accepts a 2nd argument for the .ttf file
name.
2007-07-21 18:52 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Tholoth.sfd: A few fixes in positioning.
2007-07-21 16:48 Afief Halumi <afief.h@gmail.com>
* sfd/ae_Tholoth.sfd: Finished work on ae_Tholoth.sfd; Added a few
better glyphs and full support for diacritic positioning.
2007-07-21 00:04 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Tholoth.sfd:
Diacritics work by afief
2007-07-19 23:49 Khaled Hosny <khaledhosny@eglug.org>
* tools/addanchors.pe: Add support for mark2glyph anchor points,
thanks George Williams for fixing fontforge's bug.
2007-07-19 23:16 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_AlBattar.sfd, ae_AlHor.sfd, ae_AlManzomah.sfd,
ae_AlMateen-Bold.sfd, ae_AlYarmook.sfd, ae_Arab.sfd,
ae_Cortoba.sfd, ae_Dimnah.sfd, ae_Electron.sfd, ae_Granada.sfd,
ae_Graph.sfd, ae_Hani.sfd, ae_Haramain.sfd, ae_Hor.sfd,
ae_Japan.sfd, ae_Jet.sfd, ae_Kayrawan.sfd, ae_Khalid.sfd,
ae_Mashq-Bold.sfd, ae_Mashq.sfd, ae_Metal.sfd, ae_Nada.sfd,
ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd, ae_Ouhod-Bold.sfd,
ae_Petra.sfd, ae_Rasheeq-Bold.sfd, ae_Rehan.sfd, ae_Salem.sfd,
ae_Shado.sfd, ae_Sharjah.sfd, ae_Sindbad.sfd, ae_Tarablus.sfd,
ae_Tholoth.sfd:
- Removed Cyrillic and Greek glyphs, this makes the font more
lighter.
- Add all needed anchor points, still needs to be manually adjusted.
2007-07-19 23:15 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_AlMohanad.sfd, ae_AlMothnna-Bold.sfd, ae_Furat.sfd:
Removed Cyrillic and Greek glyphs, this makes the font more lighter.
2007-07-19 23:12 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlArabiya.sfd: full support for diacritic positioning
2007-07-18 14:57 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlArabiya.sfd:
Full mark2base and mark2mark anchor points
2007-07-16 20:53 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Nada.sfd:
Removed obsolete reference to Btstream copyright, we don't include
any Bitstream copyrighted glyphs anymore.
2007-07-16 20:03 Khaled Hosny <khaledhosny@eglug.org>
* tools/: addanchors.pe, addlookups.pe, cp.pe, generate.pe:
use "#!/usr/bin/env fontforge" instead of "#!/usr/bin/fontforge"
2007-07-16 13:47 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlMohanad.sfd:
Full support for proper diacritics positioning
2007-07-16 00:16 Khaled Hosny <khaledhosny@eglug.org>
* tools/: addanchors.pe, addlookups.pe, cp.pe, generate.pe: Now the
scripts require Fotforge 20070501 or newer, older versions use older
SFD formate which we don't suport.
2007-07-16 00:09 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlArabiya.sfd: Add support for proper diacritic
positioning by Afief Halumi, still in progress
2007-07-15 23:48 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Furat.sfd: full support for diacritic positioning
2007-07-15 20:08 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_AlBattar.sfd, ae_AlHor.sfd, ae_AlManzomah.sfd,
ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd, ae_AlYarmook.sfd,
ae_Arab.sfd, ae_Cortoba.sfd, ae_Dimnah.sfd, ae_Electron.sfd,
ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd, ae_Haramain.sfd,
ae_Hor.sfd, ae_Japan.sfd, ae_Jet.sfd, ae_Kayrawan.sfd,
ae_Khalid.sfd, ae_Mashq-Bold.sfd, ae_Mashq.sfd, ae_Metal.sfd,
ae_Nada.sfd, ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd,
ae_Ouhod-Bold.sfd, ae_Petra.sfd, ae_Rasheeq-Bold.sfd,
ae_Rehan.sfd, ae_Salem.sfd, ae_Shado.sfd, ae_Sharjah.sfd,
ae_Sindbad.sfd, ae_Tarablus.sfd, ae_Tholoth.sfd: removed traces
of ae_ prefix
2007-07-15 19:44 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlArabiya.sfd: removed traces of ae_ prefix
2007-07-13 20:14 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlMothnna-Bold.sfd:
- Removed traces of ae_ prefix.
- Full support for proper Arabic diacritics positioning.
2007-07-13 19:38 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Furat.sfd:
- Removed traces of ae_ prefix.
- add anchor points for Arabic diacritics, needs manual tuning.
2007-07-13 19:09 Khaled Hosny <khaledhosny@eglug.org>
* tools/: addanchors.pe, addlookups.pe: scripts to assist adding
lookup tables and anchor points needed for proper diacritics
(harakat) support.
2007-07-01 03:31 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_AlArabiya.sfd, ae_AlBattar.sfd, ae_AlHor.sfd,
ae_AlManzomah.sfd, ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd,
ae_AlMothnna-Bold.sfd, ae_AlYarmook.sfd, ae_Arab.sfd,
ae_Cortoba.sfd, ae_Dimnah.sfd, ae_Electron.sfd, ae_Furat.sfd,
ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd, ae_Haramain.sfd,
ae_Hor.sfd, ae_Japan.sfd, ae_Jet.sfd, ae_Kayrawan.sfd,
ae_Khalid.sfd, ae_Mashq-Bold.sfd, ae_Mashq.sfd, ae_Metal.sfd,
ae_Nada.sfd, ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd,
ae_Ouhod-Bold.sfd, ae_Petra.sfd, ae_Rasheeq-Bold.sfd,
ae_Rehan.sfd, ae_Salem.sfd, ae_Shado.sfd, ae_Sharjah.sfd,
ae_Sindbad.sfd, ae_Tarablus.sfd, ae_Tholoth.sfd: Removed ae_
prefix from all fonts, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=361965
2007-06-30 22:02 Khaled Hosny <khaledhosny@eglug.org>
* README: Initial README file
2007-06-30 20:20 Khaled Hosny <khaledhosny@eglug.org>
* tools/: generate.pe, generate.sh: Scripts to generate TTF files
from SFD ones.
2007-06-30 19:58 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Tarablus.sfd: add the missed U+F6BE that caused bug in 'j'
glyph, CVS_SILENT
2007-06-30 19:48 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Sindbad.sfd:
add the missed U+F6BE that caused bug in 'j' glyph, CVS_SILENT
2007-06-23 22:29 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Shado.sfd, ae_Sharjah.sfd: add the missed U+F6BE that
caused bug in 'j' glyph
2007-06-23 22:26 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Rasheeq-Bold.sfd, ae_Rehan.sfd, ae_Salem.sfd: add the
missed U+F6BE that caused bug in 'j' glyph
2007-06-23 22:22 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Nice.sfd, ae_Ostorah.sfd, ae_Ouhod-Bold.sfd,
ae_Petra.sfd: add the missed U+F6BE that caused bug in 'j' glyph
2007-06-23 22:19 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Metal.sfd, ae_Nada.sfd, ae_Nagham.sfd: add the missed
U+F6BE that caused bug in 'j' glyph
2007-06-23 22:16 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Kayrawan.sfd, ae_Khalid.sfd, ae_Mashq-Bold.sfd,
ae_Mashq.sfd: add the missed U+F6BE that caused bug in 'j' glyph
2007-06-23 22:12 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Haramain.sfd, ae_Hor.sfd, ae_Japan.sfd, ae_Jet.sfd: add
the missed U+F6BE that caused bug in 'j' glyph
2007-06-23 22:09 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd: add the missed
U+F6BE that caused bug in 'j' glyph
2007-06-23 22:05 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Electron.sfd, ae_Furat.sfd: add the missed U+F6BE that
caused bug in 'j' glyph
2007-06-23 22:02 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Cortoba.sfd, ae_Dimnah.sfd: add the missed U+F6BE that
caused bug in 'j' glyph
2007-06-23 21:59 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_AlYarmook.sfd, ae_Arab.sfd: add the missed U+F6BE that
caused bug in 'j' glyph
2007-06-23 21:19 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_AlArabiya.sfd, ae_AlBattar.sfd, ae_AlHor.sfd,
ae_AlManzomah.sfd, ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd,
ae_AlMothnna-Bold.sfd: Added the missed U+U+F6BE glyphs which
caused a bug in "j" glyph
2007-06-23 18:30 Khaled Hosny <khaledhosny@eglug.org>
* COPYING: -Moved GPL to a separate file. -Added GPL font
exception to COPYING.
2007-06-23 18:12 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_Tholoth.sfd:
- New glyphs (covering every thing outside Arabic block) based on
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
- Arabic diacritic marks (harakat) are set to have zero advance
width and OT class as 'mark' nstead of 'base glyph'
2007-06-23 18:07 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Shado.sfd, ae_Sharjah.sfd, ae_Sindbad.sfd,
ae_Tarablus.sfd:
- New glyphs (covering every thing outside Arabic block) based on
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
- Arabic diacritic marks (harakat) are set to have zero advance
width and OT class as 'mark' nstead of 'base glyph'
2007-06-23 18:04 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Petra.sfd, ae_Rasheeq-Bold.sfd, ae_Rehan.sfd,
ae_Salem.sfd:
- New glyphs (covering every thing outside Arabic block) based on
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
- Arabic diacritic marks (harakat) are set to have zero advance
width and OT class as 'mark' nstead of 'base glyph'
2007-06-23 18:01 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd,
ae_Ouhod-Bold.sfd:
- New glyphs (covering every thing outside Arabic block) based on
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
- Arabic diacritic marks (harakat) are set to have zero advance
width and OT class as 'mark' nstead of 'base glyph'
2007-06-23 17:57 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Metal.sfd, ae_Nada.sfd:
- New glyphs (covering every thing outside Arabic block) based on
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
- Arabic diacritic marks (harakat) are set to have zero advance
width and OT class as 'mark' nstead of 'base glyph'
2007-06-23 17:54 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Kayrawan.sfd, ae_Khalid.sfd, ae_Mashq-Bold.sfd,
ae_Mashq.sfd:
- New glyphs (covering every thing outside Arabic block) based on
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
- Arabic diacritic marks (harakat) are set to have zero advance
width and OT class as 'mark' nstead of 'base glyph'
2007-06-23 17:51 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Haramain.sfd, ae_Hor.sfd, ae_Japan.sfd, ae_Jet.sfd:
- New glyphs (covering every thing outside Arabic block) based on
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
- Arabic diacritic marks (harakat) are set to have zero advance
width and OT class as 'mark' nstead of 'base glyph'
2007-06-23 17:47 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Furat.sfd, ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd:
- New glyphs (covering every thing outside Arabic block) based on
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
- Arabic diacritic marks (harakat) are set to have zero advance
width and OT class as 'mark' nstead of 'base glyph'
2007-06-23 17:43 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_Arab.sfd, ae_Cortoba.sfd, ae_Dimnah.sfd,
ae_Electron.sfd:
- New glyphs (covering every thing outside Arabic block) based on
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
- Arabic diacritic marks (harakat) are set to have zero advance
width and OT class as 'mark' nstead of 'base glyph'
2007-06-23 17:40 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd,
ae_AlMothnna-Bold.sfd, ae_AlYarmook.sfd:
- New glyphs (covering every thing outside Arabic block) based on
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
- Arabic diacritic marks (harakat) are set to have zero advance
width and OT class as 'mark' nstead of 'base glyph'
2007-06-23 17:37 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_AlArabiya.sfd, ae_AlBattar.sfd, ae_AlHor.sfd,
ae_AlManzomah.sfd:
- New glyphs (covering every thing outside Arabic block) based on
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
- Arabic diacritic marks (harakat) are set to have zero advance
width and OT class as 'mark' nstead of 'base glyph'
2007-06-21 05:57 Khaled Hosny <khaledhosny@eglug.org>
* tools/cp.pe: Simple ff script to copy a specific range of glyphs
from on font to another.
2007-06-16 01:54 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlMothnna-Bold.sfd:
- Identical glyphs (or parts of glyphs) are referenced to one common
glyph instead of copying the same shape each time.
- Add few missed Arabic glyphs, DOTLESS QAF, DOTLESS BEH, HAMZA
ABOVE, HAMZA BELOW and EXTENDED ARABIC-INDIC DIGIT ZERO, ONE, TWO,
THREE, SEVEN, EIGHT, NINE.
2007-06-15 07:10 Khaled Hosny <khaledhosny@eglug.org>
* sfd/: ae_AlArabiya.sfd, ae_AlBattar.sfd, ae_AlHor.sfd,
ae_AlManzomah.sfd, ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd,
ae_AlMothnna-Bold.sfd, ae_AlYarmook.sfd, ae_Arab.sfd,
ae_Cortoba.sfd, ae_Dimnah.sfd, ae_Electron.sfd, ae_Furat.sfd,
ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd, ae_Haramain.sfd,
ae_Hor.sfd, ae_Japan.sfd, ae_Jet.sfd, ae_Kayrawan.sfd,
ae_Khalid.sfd, ae_Mashq-Bold.sfd, ae_Mashq.sfd, ae_Metal.sfd,
ae_Nada.sfd, ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd,
ae_Ouhod-Bold.sfd, ae_Petra.sfd, ae_Rasheeq-Bold.sfd,
ae_Rehan.sfd, ae_Salem.sfd, ae_Shado.sfd, ae_Sharjah.sfd,
ae_Sindbad.sfd, ae_Tarablus.sfd, ae_Tholoth.sfd: Preparing to
work
2007-06-02 21:25 Khaled Hosny <khaledhosny@eglug.org>
* sfd/ae_AlMothnna-Bold.sfd:
- A modified version of "AlMothnna", partially fixes the vowel marks
issues.
- This is fontforg's sfd file.
2004-07-10 09:48 nadim
* COPYING: + Minor mods to the GPL license mention (their address
changed) + Added disclaimer + Renamed file from license.txt for
consistency

View File

@ -40,6 +40,10 @@
display: inline-block;
}
.no-bottom {
padding-bottom: 0;
}
.small {
font-size: 0.9em;
}

View File

@ -155,8 +155,9 @@ class KnowledgeManagement extends DolibarrApi
$sql .= " AND sc.fk_user = ".((int) $search_sale);
}
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -116,7 +116,7 @@ class KnowledgeRecord extends CommonObject
'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,),
//'url' => array('type'=>'varchar(255)', 'label'=>'URL', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1, 'csslist'=>'tdoverflow200', 'help'=>'UrlForInfoPage'),
'fk_c_ticket_category' => array('type'=>'integer:CTicketCategory:ticket/class/cticketcategory.class.php:0::pos', 'label'=>'SuggestedForTicketsInGroup', 'enabled'=>'$conf->ticket->enabled', 'position'=>512, 'notnull'=>0, 'visible'=>-1, 'help'=>'YouCanLinkArticleToATicketCategory', 'csslist'=>'minwidth200 tdoverflowmax250'),
'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated'),),
'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>5, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated'),),
);
public $rowid;
public $ref;

View File

@ -48,7 +48,7 @@ CountriesNotInEEC=Countries not in EEC
CountriesInEECExceptMe=Countries in EEC except %s
CountriesExceptMe=All countries except %s
AccountantFiles=Export source documents
ExportAccountingSourceDocHelp=With this tool, you can export the source events (list in CSV and PDFs) that were used to generate your accountancy.
ExportAccountingSourceDocHelp=With this tool, you can export the source events (list in CSV and PDFs) that are used to generate your accountancy.
ExportAccountingSourceDocHelp2=To export your journals, use the menu entry %s - %s.
VueByAccountAccounting=View by accounting account
VueBySubAccountAccounting=View by accounting subaccount

View File

@ -1712,8 +1712,9 @@ MailingDelay=Seconds to wait after sending next message
NotificationSetup=Email Notification module setup
NotificationEMailFrom=Sender email (From) for emails sent by the Notifications module
FixedEmailTarget=Recipient
NotificationDisableConfirmMessageFix=Disable the information about targets into the confirmation message before sending the notifications to the global emails
NotificationDisableConfirmMessageUser=Disable the information about targets into the confirmation message before sending the notifications to the user emails
NotificationDisableConfirmMessageContact=Hide the list of recipients (subscribed as contact) of notifications into the confirmation message
NotificationDisableConfirmMessageUser=Hide the list of recipients (subscribed as user) of notifications into the confirmation message
NotificationDisableConfirmMessageFix=Hide the list of recipients (subscribed as global email) of notifications into the confirmation message
##### Sendings #####
SendingsSetup=Shipping module setup
SendingsReceiptModel=Sending receipt model
@ -1905,6 +1906,7 @@ ExpenseReportsRulesSetup=Setup of module Expense Reports - Rules
ExpenseReportNumberingModules=Expense reports numbering module
NoModueToManageStockIncrease=No module able to manage automatic stock increase has been activated. Stock increase will be done on manual input only.
YouMayFindNotificationsFeaturesIntoModuleNotification=You may find options for email notifications by enabling and configuring the module "Notification".
TemplatesForNotifications=Templates for notifications
ListOfNotificationsPerUser=List of automatic notifications per user*
ListOfNotificationsPerUserOrContact=List of possible automatic notifications (on business event) available per user* or per contact**
ListOfFixedNotifications=List of automatic fixed notifications
@ -2215,4 +2217,5 @@ IfYouUseAThirdTaxYouMustSetYouUseTheMainTax=If you want to use a third tax, you
PDF_USE_1A=Generate PDF with PDF/A-1b format
MissingTranslationForConfKey = Missing translation for %s
NativeModules=Native modules
NoDeployedModulesFoundWithThisSearchCriteria=No modules found for these search criteria
NoDeployedModulesFoundWithThisSearchCriteria=No modules found for these search criteria
API_DISABLE_COMPRESSION=Disable compression of API responses

View File

@ -88,7 +88,7 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C
NbOfEntries=No. of entries
GoToWikiHelpPage=Read online help (Internet access needed)
GoToHelpPage=Read help
DedicatedPageAvailable=There is a dedicated help page related to your current screen
DedicatedPageAvailable=Dedicated help page related to your current screen
HomePage=Home Page
RecordSaved=Record saved
RecordDeleted=Record deleted

View File

@ -268,4 +268,6 @@ SaveQtyFirst=Save the real inventoried quantities first, before asking creation
InventoryStartedShort=Started
ErrorOnElementsInventory=Operation canceled for the following reason:
ErrorCantFindCodeInInventory=Can't find the following code in inventory
QtyWasAddedToTheScannedBarcode=Success !! The quantity was added to all the requested barcode. You can close the Scanner tool.
QtyWasAddedToTheScannedBarcode=Success !! The quantity was added to all the requested barcode. You can close the Scanner tool.
StockChangeDisabled=Change on stock disabled
NoWarehouseDefinedForTerminal=No warehouse defined for terminal

View File

@ -115,7 +115,7 @@ WithdrawRequestErrorNilAmount=Unable to create direct debit request for empty am
SepaMandate=SEPA Direct Debit Mandate
SepaMandateShort=SEPA Mandate
PleaseReturnMandate=Please return this mandate form by email to %s or by mail to
SEPALegalText=By signing this mandate form, you authorize (A) %s to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with the instructions from %s. As part of your rights, you are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited. Your rights regarding the above mandate are explained in a statement that you can obtain from your bank.
SEPALegalText=By signing this mandate form, you authorize (A) %s to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with the instructions from %s. As part of your rights, you are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. Your rights regarding the above mandate are explained in a statement that you can obtain from your bank.
CreditorIdentifier=Creditor Identifier
CreditorName=Creditor Name
SEPAFillForm=(B) Please complete all the fields marked *

View File

@ -1932,9 +1932,9 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
// Link to help pages
if ($helpbaseurl && $helppage) {
$text = '';
$title = $langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage' : 'GoToHelpPage').'...';
$title = $langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage' : 'GoToHelpPage').', ';
if ($mode == 'wiki') {
$title .= '<br>'.$langs->trans("PageWiki").' '.dol_escape_htmltag('"'.strtr($helppage, '_', ' ').'"');
$title .= '<br>'.img_picto('', 'globe', 'class="pictofixedwidth"').$langs->trans("PageWiki").' '.dol_escape_htmltag('"'.strtr($helppage, '_', ' ').'"');
if ($helppresent) {
$title .= ' <span class="opacitymedium">('.$langs->trans("DedicatedPageAvailable").')</span>';
} else {
@ -1949,7 +1949,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
}
$text .= '">';
$text .= '<span class="fa fa-question-circle atoplogin valignmiddle'.($helppresent ? ' '.$helppresent : '').'"></span>';
$text .= '<span class="fa fa-circle helppresentcircle'.($helppresent ? '' : ' unvisible').'"></span>';
$text .= '<span class="fa fa-long-arrow-alt-up helppresentcircle'.($helppresent ? '' : ' unvisible').'"></span>';
$text .= '</a>';
$toprightmenu .= $form->textwithtooltip('', $title, 2, 1, $text, 'login_block_elem', 2);
}

View File

@ -155,8 +155,9 @@ class MyModuleApi extends DolibarrApi
$sql .= " AND sc.fk_user = ".((int) $search_sale);
}
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -147,8 +147,9 @@ class Mos extends DolibarrApi
$sql .= " AND sc.fk_user = ".((int) $search_sale);
}
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -39,6 +39,13 @@ class ActionsCardService
public $field_list = array();
public $list_datas = array();
public $id;
public $ref;
public $description;
public $note;
public $price;
public $price_min;
/**
* Constructor
@ -196,6 +203,7 @@ class ActionsCardService
}
// Duration
$dur = array();
if ($this->object->duration_value > 1) {
$dur = array("h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years"));
} elseif ($this->object->duration_value > 0) {
@ -286,6 +294,7 @@ class ActionsCardService
if ($search_categ) {
$sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp";
}
$fourn_id = 0;
if (GETPOST("fourn_id", 'int') > 0) {
$fourn_id = GETPOST("fourn_id", 'int');
$sql .= ", ".MAIN_DB_PREFIX."product_fournisseur_price as pfp";

View File

@ -219,8 +219,9 @@ class Products extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
//var_dump($sqlfilters);exit;
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)'; // We must accept datc:<:2020-01-01 10:10:10
@ -889,8 +890,9 @@ class Products extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -1016,8 +1018,9 @@ class Products extends DolibarrApi
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -109,8 +109,9 @@ class StockMovements extends DolibarrApi
$sql .= ' WHERE 1 = 1';
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -116,8 +116,9 @@ class Warehouses extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -150,8 +150,9 @@ class Projects extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -150,8 +150,9 @@ class Tasks extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006-2020 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2021 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
@ -108,11 +108,20 @@ $extrafields = new ExtraFields($db);
$extrafields->fetch_name_optionals_label($projectstatic->table_element);
$extrafields->fetch_name_optionals_label($object->table_element);
// Load task
if ($id > 0 || $ref) {
$object->fetch($id, $ref);
}
restrictedArea($user, 'projet', $object->fk_project, 'projet&project');
if ($object->fk_project > 0) {
restrictedArea($user, 'projet', $object->fk_project, 'projet&project');
} else {
restrictedArea($user, 'projet', null, 'projet&project');
// We check user has permission to see all taks of all users
if (empty($projectid) && !$user->hasRight('projet', 'all', 'lire')) {
$search_user = $user->id;
}
}
@ -335,6 +344,10 @@ if (GETPOST('projectid', 'int') > 0) {
$object->fetch($id);
$result = $projectstatic->fetch($object->fk_project);
}
// If not task selected and no project selected
if ($id <= 0 && $projectidforalltimes == 0) {
$allprojectforuser = $user->id;
}
if ($action == 'confirm_generateinvoice') {
if (!empty($projectstatic->socid)) {
@ -678,7 +691,7 @@ $formother = new FormOther($db);
$formproject = new FormProjets($db);
$userstatic = new User($db);
if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser > 0) {
/*
* Fiche projet en mode visu
*/
@ -720,6 +733,15 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'));
$param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : '');
if ($search_user) {
$param .= '&search_user='.((int) $search_user);
}
if ($search_month) {
$param .= '&search_month='.((int) $search_month);
}
if ($search_year) {
$param .= '&search_year='.((int) $search_year);
}
// Project card
@ -740,7 +762,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
}
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
@ -888,7 +910,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
// Show section with information of task. If id of task is not defined and project id defined, then $projectidforalltimes is not empty.
if (empty($projectidforalltimes)) {
if (empty($projectidforalltimes) && empty($allprojectforuser)) {
$head = task_prepare_head($object);
print dol_get_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition');
@ -990,7 +1012,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
}
if ($projectstatic->id > 0) {
if ($projectstatic->id > 0 || $allprojectforuser > 0) {
if ($action == 'deleteline' && !empty($projectidforalltimes)) {
print $form->formconfirm($_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOST('lineid', 'int').($withproject ? '&withproject=1' : ''), $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_delete", '', '', 1);
}
@ -1216,7 +1238,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
$tasks = array();
$sql = "SELECT t.rowid, t.fk_task, t.task_date, t.task_datehour, t.task_date_withhour, t.task_duration, t.fk_user, t.note, t.thm,";
$sql .= " pt.ref, pt.label,";
$sql .= " pt.ref, pt.label, pt.fk_projet,";
$sql .= " u.lastname, u.firstname, u.login, u.photo, u.statut as user_status,";
$sql .= " il.fk_facture as invoice_id, inv.fk_statut";
$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t";
@ -1225,11 +1247,20 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
$sql .= " ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."user as u";
$sql .= " WHERE t.fk_user = u.rowid AND t.fk_task = pt.rowid";
if (empty($projectidforalltimes)) {
if (empty($projectidforalltimes) && empty($allprojectforuser)) {
// Limit on one task
$sql .= " AND t.fk_task =".((int) $object->id);
} else {
} elseif (!empty($projectidforalltimes)) {
// Limit on one project
$sql .= " AND pt.fk_projet IN (".$db->sanitize($projectidforalltimes).")";
} elseif (!empty($allprojectforuser)) {
// Limit on on user
if (empty($search_user)) {
$search_user = $user->id;
}
$sql .= " AND t.fk_user = ".((int) $search_user);
}
if ($search_note) {
$sql .= natural_search('t.note', $search_note);
}
@ -1290,7 +1321,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1);
} else {
print '<!-- List of time spent for project -->'."\n";
print '<!-- List of time spent -->'."\n";
$title = $langs->trans("ListTaskTimeForTask");
@ -1322,6 +1353,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Date").'</td>';
if (!empty($allprojectforuser)) {
print '<td>'.$langs->trans("Project").'</td>';
}
if (empty($id)) {
print '<td>'.$langs->trans("Task").'</td>';
}
@ -1343,6 +1377,12 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
print $form->selectDate($newdate, 'time', ($conf->browser->layout == 'phone' ? 2 : 1), 1, 2, "timespent_date", 1, 0);
print '</td>';
if (!empty($allprojectforuser)) {
print '<td>';
// Add project selector
print '</td>';
}
// Task
$nboftasks = 0;
if (empty($id)) {
@ -1445,6 +1485,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
$formother->select_year($search_year, 'search_year', 1, 20, 5);
print '</td>';
}
if (!empty($allprojectforuser)) {
print '<td></td>';
}
// Task
if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task
if (!empty($arrayfields['t.task_ref']['checked'])) {
print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_task_ref" value="'.dol_escape_htmltag($search_task_ref).'"></td>';
@ -1493,6 +1537,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
if (!empty($arrayfields['t.task_date']['checked'])) {
print_liste_field_titre($arrayfields['t.task_date']['label'], $_SERVER['PHP_SELF'], 't.task_date,t.task_datehour,t.rowid', '', $param, '', $sortfield, $sortorder);
}
if (!empty($allprojectforuser)) {
print_liste_field_titre("Project", $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder);
}
if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task
if (!empty($arrayfields['t.task_ref']['checked'])) {
print_liste_field_titre($arrayfields['t.task_ref']['label'], $_SERVER['PHP_SELF'], 'pt.ref', '', $param, '', $sortfield, $sortorder);
@ -1565,6 +1612,23 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
}
}
// Project ref
if (!empty($allprojectforuser)) {
print '<td class="nowraponall">';
if (empty($conf->cache['project'][$task_time->fk_projet])) {
$tmpproject = new Project($db);
$tmpproject->fetch($task_time->fk_projet);
$conf->cache['project'][$task_time->fk_projet] = $tmpproject;
} else {
$tmpproject = $conf->cache['project'][$task_time->fk_projet];
}
print $tmpproject->getNomUrl(1);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Task ref
if (!empty($arrayfields['t.task_ref']['checked'])) {
if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task
@ -1788,6 +1852,14 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
print '</td>';
}
// Project ref
if (!empty($allprojectforuser)) {
if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task
print '<td class="nowrap">';
print '</td>';
}
}
// Task ref
if (!empty($arrayfields['t.task_ref']['checked'])) {
if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task
@ -1916,6 +1988,14 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
print '</td>';
}
// Project ref
if (!empty($allprojectforuser)) {
if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task
print '<td class="nowrap">';
print '</td>';
}
}
// Task ref
if (!empty($arrayfields['t.task_ref']['checked'])) {
if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task

View File

@ -122,6 +122,17 @@ $creditor = $mysoc->name;
$object = new Propal($db);
$object->fetch(0, $ref);
// Check securitykey
$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
$type = $source;
$calculatedsecuritykey = dol_hash($securekeyseed.$type.$ref, '0');
if ($calculatedsecuritykey != $SECUREKEY) {
http_response_code(403);
print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref);
exit(-1);
}
/*
* Actions
@ -144,7 +155,7 @@ if ($action == 'confirm_refusepropal') {
$db->commit();
$message = 'refused';
setEventMessages("PropalRefused", null, 'warning');
setEventMessages("PropalRefused", null, 'warnings');
} else {
$db->rollback();
}
@ -170,7 +181,7 @@ $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>';
llxHeader($head, $langs->trans("OnlineSignature"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1);
if ($action == 'refusepropal') {
print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.$ref, $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1);
print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&securekey='.urlencode($SECUREKEY), $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1);
}
// Check link validity for param 'source'
@ -195,7 +206,7 @@ print '<input type="hidden" name="entity" value="'.$entity.'" />';
print "\n";
print '<!-- Form to sign -->'."\n";
print '<table id="dolpaymenttable" summary="Payment form" class="center">'."\n";
print '<table id="dolpublictable" summary="Payment form" class="center">'."\n";
// Show logo (search order: logo defined by ONLINE_SIGN_LOGO_suffix, then ONLINE_SIGN_LOGO_, then small company logo, large company logo, theme logo, common logo)
// Define logo and logosmall
@ -295,6 +306,13 @@ if ($source == 'proposal') {
print '<b>'.$proposal->thirdparty->name.'</b>';
print '</td></tr>'."\n";
// Amount
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount");
print '</td><td class="CTableRow2">';
print '<b>'.price($proposal->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).'</b>';
print '</td></tr>'."\n";
// Object
$text = '<b>'.$langs->trans("SignatureProposalRef", $proposal->ref).'</b>';
@ -308,7 +326,7 @@ if ($source == 'proposal') {
print $langs->trans("DownloadDocument").'</a>';
}
} else {
/* TODO If proposal signed newer than proposal ref, get link of proposal signed
/* TODO If the file of proposal signed is newer than the default proposal file, get link of proposal signed
*/
}
@ -358,7 +376,7 @@ if ($action == "dosign" && empty($cancel)) {
print '<script language="JavaScript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jSignature/jSignature.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#signature").jSignature({ color:"#000", lineWidth:4, height: 180});
$("#signature").jSignature({ color:"#000", lineWidth:4, '.(empty($conf->dol_optimize_smallscreen) ? '' : 'width: 280, ' ).'height: 180});
$("#signature").on("change",function(){
$("#clearsignature").css("display","");
@ -373,13 +391,14 @@ if ($action == "dosign" && empty($cancel)) {
data: {
"action" : "importSignature",
"signaturebase64" : signature,
"ref" : "'.dol_escape_js($REF).'",
"mode" : "propale",
"ref" : \''.dol_escape_js($REF).'\',
"securekey" : \''.dol_escape_js($SECUREKEY).'\',
"mode" : \''.dol_escape_htmltag($source).'\',
},
success: function(response) {
if(response == "success"){
console.log("Success on saving signature");
window.location.replace("'.$_SERVER["SELF"].'?ref='.urlencode($ref).'&message=signed");
window.location.replace("'.$_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&message=signed&securekey='.urlencode($SECUREKEY).'");
}else{
console.error(response);
}

View File

@ -926,7 +926,8 @@ print '<!-- urlok = '.$urlok.' -->'."\n";
print '<!-- urlko = '.$urlko.' -->'."\n";
print "\n";
print '<table id="dolpaymenttable" summary="Payment form" class="center">'."\n";
// Section with payment informationsummary
print '<table id="dolpublictable" summary="Payment form" class="center">'."\n";
// Output introduction text
$text = '';
@ -1524,10 +1525,13 @@ if ($source == 'member' || $source == 'membersubscription') {
// Debitor
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Member");
print '</td><td class="CTableRow2"><b>';
if ($member->morphy == 'mor' && !empty($member->societe)) {
print $member->societe;
print '</td><td class="CTableRow2">';
print '<b>';
if ($member->morphy == 'mor' && !empty($member->company)) {
print img_picto('', 'company', 'class="pictofixedwidth"');
print $member->company;
} else {
print img_picto('', 'member', 'class="pictofixedwidth"');
print $member->getFullName($langs);
}
print '</b>';

View File

@ -49,9 +49,24 @@ This is a form to test if a CSRF exists into a Dolibarr page.<br>
print 'urltosendrequest = '.$urltosendrequest.'<br><br>';
?>
Test post
<form method="POST" action="<?php echo $urltosendrequest; ?>" target="_blank">
<!-- <input type="hidden" name="token" value="123456789"> -->
<input type="text" name="action" value="add">
<input type="text" name="nom" value="New group test">
<input type="submit" name="submit" value="Submit">
</form>
</form>
Test logout
<html>
<body>
<script>history.pushState('', '', '/')</script>
<form action="http://localhostgit/dolibarr_dev/htdocs/user/logout.php">
<input type="submit" value="Submit request" />
</form>
<script>
document.forms[0].submit();
</script>
</body>
</html>

View File

@ -116,9 +116,6 @@ if ($id > 0 || !empty($ref)) {
$morehtmlref = '<div class="refidno">';
// Ref customer
$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
// Thirdparty
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1);

View File

@ -216,8 +216,9 @@ class Contacts extends DolibarrApi
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -202,8 +202,9 @@ class Thirdparties extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -1228,7 +1228,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
if ($nbremote == 0 && $nblocal == 0) {
$colspan = (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD) ? 10 : 9);
print '<tr><td colspan="'.$colspan.'"<span class="opacitymedium">>'.$langs->trans("None").'</span></td></tr>';
print '<tr><td colspan="'.$colspan.'"<span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
}
print "</table>";
print "</div>";

View File

@ -139,8 +139,9 @@ class Supplierproposals extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -668,7 +668,7 @@ div#moreinfo, div#infowarehouse {
}
.row1withhead{
height: calc(45% - 100px);
height: unset;
}
div#moreinfo, div#infowarehouse {

View File

@ -856,35 +856,43 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
<div class="header">
<div class="topnav">
<div class="topnav-left">
<div class="inline-block valignmiddle">
<a class="topnav-terminalhour" onclick="ModalBox('ModalTerminal');">
<span class="fa fa-cash-register"></span>
<span class="hideonsmartphone">
<?php echo $langs->trans("Terminal"); ?>
</span>
<?php echo " ";
if ($_SESSION["takeposterminal"] == "") {
echo "1";
} else {
echo $_SESSION["takeposterminal"];
}
echo '<span class="hideonsmartphone"> - '.dol_print_date(dol_now(), "day").'</span>';
?>
</a>
<?php
if (!empty($conf->multicurrency->enabled)) {
print '<a class="valignmiddle tdoverflowmax100" id="multicurrency" onclick="ModalBox(\'ModalCurrency\');" title=""><span class="fas fa-coins paddingrightonly"></span>';
print '<span class="hideonsmartphone">'.$langs->trans("Currency").'</span>';
print '</a>';
}
?>
</div>
<!-- section for customer and open sales -->
<div class="inline-block valignmiddle" id="customerandsales">
</div>
<!-- More info about customer -->
<div class="inline-block valignmiddle tdoverflowmax150onsmartphone" id="moreinfo"></div>
<div class="inline-block valignmiddle tdoverflowmax150onsmartphone" id="infowarehouse"></div>
<div class="inline-block valignmiddle">
<a class="topnav-terminalhour" onclick="ModalBox('ModalTerminal');">
<span class="fa fa-cash-register"></span>
<span class="hideonsmartphone">
<?php echo $langs->trans("Terminal"); ?>
</span>
<?php echo " ";
if ($_SESSION["takeposterminal"] == "") {
echo "1";
} else {
echo $_SESSION["takeposterminal"];
}
echo '<span class="hideonsmartphone"> - '.dol_print_date(dol_now(), "day").'</span>';
?>
</a>
<?php
if (!empty($conf->multicurrency->enabled)) {
print '<a class="valignmiddle tdoverflowmax100" id="multicurrency" onclick="ModalBox(\'ModalCurrency\');" title=""><span class="fas fa-coins paddingrightonly"></span>';
print '<span class="hideonsmartphone">'.$langs->trans("Currency").'</span>';
print '</a>';
}
?>
</div>
<!-- section for customer -->
<div class="inline-block valignmiddle" id="customerandsales"></div>
<!-- section for shopping carts -->
<div class="inline-block valignmiddle" id="shoppingcart"></div>
<!-- More info about customer -->
<div class="inline-block valignmiddle tdoverflowmax150onsmartphone" id="moreinfo"></div>
<?php
if (!empty($conf->stock->enabled)) {
?>
<!-- More info about warehouse -->
<div class="inline-block valignmiddle tdoverflowmax150onsmartphone" id="infowarehouse"></div>
<?php
}
?>
</div>
<div class="topnav-right">
<div class="login_block_other">

View File

@ -1088,6 +1088,7 @@ $( document ).ready(function() {
?>
$("#customerandsales").html('');
$("#shoppingcart").html('');
$("#customerandsales").append('<a class="valignmiddle tdoverflowmax100 minwidth100" id="customer" onclick="Customer();" title="<?php print dol_escape_js($s); ?>"><span class="fas fa-building paddingrightonly"></span><?php print dol_escape_js($s); ?></a>');
@ -1108,7 +1109,7 @@ $( document ).ready(function() {
if ($resql) {
$max_sale = 0;
while ($obj = $db->fetch_object($resql)) {
echo '$("#customerandsales").append(\'';
echo '$("#shoppingcart").append(\'';
echo '<a class="valignmiddle" title="'.dol_escape_js($langs->trans("SaleStartedAt", dol_print_date($db->jdate($obj->datec), '%H:%M', 'tzuser')).' - '.$obj->ref).'" onclick="place=\\\'';
$num_sale = str_replace(")", "", str_replace("(PROV-POS".$_SESSION["takeposterminal"]."-", "", $obj->ref));
echo $num_sale;
@ -1127,7 +1128,7 @@ $( document ).ready(function() {
}
echo '</a>\');';
}
echo '$("#customerandsales").append(\'<a onclick="place=\\\'0-';
echo '$("#shoppingcart").append(\'<a onclick="place=\\\'0-';
echo $max_sale + 1;
echo '\\\'; invoiceid=0; Refresh();"><div><span class="fa fa-plus" title="'.dol_escape_htmltag($langs->trans("StartAParallelSale")).'"><span class="fa fa-shopping-cart"></span></div></a>\');';
} else {
@ -1136,20 +1137,42 @@ $( document ).ready(function() {
$s = '';
$idwarehouse = 0;
$constantforkey = 'CASHDESK_NO_DECREASE_STOCK'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '');
if (!empty($conf->stock->enabled) && getDolGlobalString("$constantforkey") != "1") {
$s = '<span class="small">';
$constantforkey = 'CASHDESK_ID_WAREHOUSE'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '');
$warehouse = new Entrepot($db);
$warehouse->fetch(getDolGlobalString($constantforkey));
$s .= $langs->trans("Warehouse").'<br>'.$warehouse->ref;
$s .= '</span>';
if (!empty($conf->stock->enabled)) {
if (getDolGlobalString("$constantforkey") != "1") {
$constantforkey = 'CASHDESK_ID_WAREHOUSE'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '');
$idwarehouse = getDolGlobalString($constantforkey);
if ($idwarehouse > 0) {
$s = '<span class="small">';
$warehouse = new Entrepot($db);
$warehouse->fetch($idwarehouse);
$s .= '<span class="hideonsmartphone">'.$langs->trans("Warehouse").'<br></span>'.$warehouse->ref;
if ($warehouse->statut == Entrepot::STATUS_CLOSED) {
$s .= ' ('.$langs->trans("Closed").')';
}
$s .= '</span>';
print "$('#infowarehouse').html('".dol_escape_js($s)."');";
print '$("#infowarehouse").css("display", "inline-block");';
} else {
$s = '<span class="small hideonsmartphone">';
$s .= $langs->trans("StockChangeDisabled").'<br>'.$langs->trans("NoWarehouseDefinedForTerminal");
$s .= '</span>';
print "$('#infowarehouse').html('".dol_escape_js($s)."');";
if (!empty($conf->dol_optimize_smallscreen)) {
print '$("#infowarehouse").css("display", "none");';
}
}
} else {
$s = '<span class="small hideonsmartphone">'.$langs->trans("StockChangeDisabled").'</span>';
print "$('#infowarehouse').html('".dol_escape_js($s)."');";
if (!empty($conf->dol_optimize_smallscreen)) {
print '$("#infowarehouse").css("display", "none");';
}
}
}
?>
$("#infowarehouse").html('<?php print dol_escape_js($s); ?>');
<?php
// Module Adherent
$s = '';
if (!empty($conf->adherent->enabled) && $invoice->socid > 0 && $invoice->socid != $conf->global->$constforcompanyid) {

View File

@ -359,7 +359,7 @@ a.top-menu-dropdown-link {
-webkit-font-smoothing: antialiased;
text-align:center;
text-decoration:none;
margin-right: 5px;
margin-<?php echo $right; ?>: 5px;
display: inline-block;
content: "\f0da";
/* color: rgba(0,0,0,0.3); */

View File

@ -1971,8 +1971,8 @@ div.vmenu, td.vmenu {
div.fiche {
margin-<?php print $left; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : (empty($conf->dol_optimize_smallscreen) ? '34' : '6')); ?>px;
margin-<?php print $right; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : (empty($conf->dol_optimize_smallscreen) ? '30' : '6')); ?>px;
margin-<?php print $left; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : (empty($conf->dol_optimize_smallscreen) ? '40' : '6')); ?>px;
margin-<?php print $right; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : (empty($conf->dol_optimize_smallscreen) ? '36' : '6')); ?>px;
<?php if (!empty($dol_hide_leftmenu)) {
print 'margin-bottom: 12px;'."\n";
} ?>
@ -2932,14 +2932,17 @@ a.help:link, a.help:visited, a.help:hover, a.help:active, span.help {
/* color: #f3e4ac !important; */
}
.helppresentcircle {
/*
color: var(--colorbackhmenu1);
filter: invert(0.8);
margin-<?php echo $left ?>: -7px;
filter: invert(0.5);
*/
color: var(--colortextbackhmenu);
margin-<?php echo $left ?>: -4px;
display: inline-block;
margin-top: -10px;
font-size: x-small;
vertical-align: super;
opacity: 0.95;
transform: rotate(<?php echo ($left == 'left' ? '55deg' : '305deg'); ?>);
}
.vmenu div.blockvmenufirst, .vmenu div.blockvmenulogo, .vmenu div.blockvmenusearchphone, .vmenu div.blockvmenubookmarks
@ -3627,16 +3630,19 @@ div.refidpadding {
}
div.refid {
font-weight: bold;
color: var(--colortexttitlenotab);
font-size: 1.2em;
word-break: break-word;
color: var(--colortexttitlenotab);
font-size: 1.2em;
word-break: break-word;
}
a.refid {
color: var(--colortexttitlenotab) !important;
}
div.refidno {
padding-top: 3px;
font-weight: normal;
color: var(--refidnocolor);
font-size: <?php print is_numeric($fontsize) ? $fontsize.'px' : $fontsize ?>;
line-height: 1.4em;
color: var(--refidnocolor);
font-size: <?php print is_numeric($fontsize) ? $fontsize.'px' : $fontsize ?>;
line-height: 1.4em;
}
div.refidno form {
display: inline-block;
@ -4576,7 +4582,15 @@ div.backgreypublicpayment { background-color: #f0f0f0; padding: 20px; border-bot
color: #222;
opacity: 0.3;
}
#dolpaymenttable { min-width: 320px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */
#dolpublictable {
min-width: 300px; font-size: 16px;
padding: 6px;
}
#dolpaymenttable {
min-width: 320px; font-size: 16px;
} /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */
#tablepublicpayment {
border: 1px solid #CCCCCC !important;
width: 100%;

View File

@ -365,7 +365,7 @@ a.top-menu-dropdown-link {
-webkit-font-smoothing: antialiased;
text-align:center;
text-decoration:none;
margin-right: 5px;
margin-<?php echo $right; ?>: 5px;
display: inline-block;
content: "\f0da";
color: rgba(0,0,0,0.3);

View File

@ -1834,7 +1834,7 @@ td.showDragHandle {
width: 100%;
padding-bottom: 20px;
<?php if (GETPOST('optioncss', 'aZ09') != 'print') { ?>
padding-left: 229px;
padding-<?php print $left; ?>: 229px;
padding-top: 16px;
<?php } ?>
}
@ -1860,13 +1860,13 @@ td.showDragHandle {
display: none;
<?php } else { ?>
background: var(--colorbackvmenu1);
border-right: 1px solid rgba(0,0,0,0.2);
border-<?php echo $right; ?>: 1px solid rgba(0,0,0,0.2);
box-shadow: 3px 0 6px -2px #eee;
bottom: 0;
color: #333;
display: block;
font-family: "RobotoDraft","Roboto",sans-serif;
left: 0;
<?php echo $left; ?>: 0;
<?php
if (in_array($conf->browser->layout, array('phone', 'tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
} else { ?>
@ -1920,12 +1920,13 @@ td.showDragHandle {
}
body.sidebar-collapse .side-nav-vert, body.sidebar-collapse #id-right {
margin-left: 0;padding-left:0
margin-left: 0;
padding-left:0
}
.side-nav-vert {
margin-left: 228px;
margin-<?php echo $left; ?>: 228px;
}
/* body.sidebar-collapse .side-nav, body.sidebar-collapse .login_block_other, body.sidebar-collapse #topmenu-login-dropdown */
@ -1991,7 +1992,7 @@ div.backgroundsemitransparent {
#id-right {
padding-left: 0 ! important;
padding-<?php print $left; ?>: 0 ! important;
}
#id-left {
z-index: 91;
@ -2941,7 +2942,7 @@ form[name="addtime"] img.userphoto {
div.vmenu, td.vmenu {
margin-<?php print $right; ?>: 2px;
position: relative;
float: left;
float: <?php print $left; ?>;
padding: 0px;
padding-bottom: 0px;
padding-top: 0px;
@ -2949,7 +2950,7 @@ div.vmenu, td.vmenu {
}
.vmenu {
margin-left: 4px;
margin-<?php print $left; ?>: 4px;
<?php if (GETPOST('optioncss', 'aZ09') == 'print') { ?>
display: none;
<?php } ?>
@ -2993,14 +2994,17 @@ a.help:link, a.help:visited, a.help:hover, a.help:active, span.help {
}
.helppresentcircle {
/*
color: var(--colorbackhmenu1);
filter: invert(0.5);
margin-left: -7px;
*/
color: var(--colortextbackhmenu);
margin-left: -4px;
display: inline-block;
margin-top: -10px;
font-size: x-small;
vertical-align: super;
opacity: 0.95;
transform: rotate(<?php echo ($left == 'left' ? '55deg' : '305deg'); ?>);
}
div.blockvmenulogo
@ -3658,14 +3662,17 @@ div.refidpadding {
div.refid {
font-weight: bold;
color: rgb(--colortexttitlenotab);
font-size: 160%;
font-size: 160%;
}
a.refid {
color: var(--colortexttitlenotab) !important;
}
div.refidno {
padding-top: 8px;
font-weight: normal;
color: #444;
font-size: <?php print $fontsize ?>px;
line-height: 21px;
color: #444;
font-size: <?php print $fontsize ?>px;
line-height: 21px;
}
div.refidno form {
display: inline-block;
@ -4527,7 +4534,15 @@ div.backgreypublicpayment { background-color: #f0f0f0; padding: 20px; border-bot
span.buttonpaymentsmall {
text-shadow: none;
}
#dolpaymenttable { min-width: 320px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */
#dolpublictable {
min-width: 300px; font-size: 16px;
padding: 6px;
}
#dolpaymenttable {
min-width: 320px; font-size: 16px;
} /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */
#tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; padding: 20px; }
#tablepublicpayment .CTableRow1 { background-color: #F0F0F0 !important; }
#tablepublicpayment tr.liste_total { border-bottom: 1px solid #CCCCCC !important; }

View File

@ -274,8 +274,9 @@ class Tickets extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -99,8 +99,9 @@ class Users extends DolibarrApi
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
@ -542,8 +543,9 @@ class Users extends DolibarrApi
}
// Add sql filters
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";

View File

@ -196,8 +196,9 @@ class ZapierApi extends DolibarrApi
$sql .= " AND sc.fk_user = ".((int) $search_sale);
}
if ($sqlfilters) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
$errormessage = '';
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";