Merge remote-tracking branch 'upstream/develop' into socialnetworks
This commit is contained in:
commit
3b9bf2b06a
@ -44,6 +44,17 @@ $constname=GETPOST('constname', 'alpha');
|
||||
$constvalue=GETPOST('constvalue', 'none'); // We shoul dbe able to send everything here
|
||||
$constnote=GETPOST('constnote', 'alpha');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'alpha');
|
||||
$sortorder = GETPOST('sortorder', 'alpha');
|
||||
$page = GETPOST('page', 'int');
|
||||
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (empty($sortfield)) $sortfield = 'entity,name';
|
||||
if (empty($sortorder)) $sortorder = 'ASC';
|
||||
|
||||
|
||||
/*
|
||||
@ -176,9 +187,11 @@ jQuery(document).ready(function() {
|
||||
|
||||
print load_fiche_titre($langs->trans("OtherSetup"), '', 'title_setup');
|
||||
|
||||
print $langs->trans("ConstDesc")."<br>\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("ConstDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
$param = '';
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" id="action" name="action" value="">';
|
||||
@ -186,16 +199,19 @@ print '<input type="hidden" id="action" name="action" value="">';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '')."\n";
|
||||
print '<td>'.$langs->trans("Value").'</td>';
|
||||
print '<td>'.$langs->trans("Comment").'</td>';
|
||||
if (! empty($conf->multicompany->enabled) && !$user->entity) print '<td>'.$langs->trans("Entity").'</td>';
|
||||
print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center')."\n";
|
||||
if (! empty($conf->multicompany->enabled) && !$user->entity)
|
||||
{
|
||||
print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center')."\n";
|
||||
}
|
||||
print '<td class="center">'.$langs->trans("Action").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
// Line to add new record
|
||||
$var=false;
|
||||
print "\n";
|
||||
|
||||
print '<tr class="oddeven"><td><input type="text" class="flat" size="24" name="constname" value="'.$constname.'"></td>'."\n";
|
||||
@ -204,6 +220,8 @@ print '<input type="text" class="flat" size="30" name="constvalue" value="'.$con
|
||||
print '</td><td>';
|
||||
print '<input type="text" class="flat" size="40" name="constnote" value="'.$constnote.'">';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '</td>';
|
||||
// Limit to superadmin
|
||||
if (! empty($conf->multicompany->enabled) && !$user->entity)
|
||||
{
|
||||
@ -229,13 +247,14 @@ $sql.= ", ".$db->decrypt('name')." as name";
|
||||
$sql.= ", ".$db->decrypt('value')." as value";
|
||||
$sql.= ", type";
|
||||
$sql.= ", note";
|
||||
$sql.= ", tms";
|
||||
$sql.= ", entity";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."const";
|
||||
$sql.= " WHERE entity IN (".$user->entity.",".$conf->entity.")";
|
||||
if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin to debug
|
||||
elseif (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits
|
||||
if (GETPOST('name')) $sql.=natural_search("name", GETPOST('name'));
|
||||
$sql.= " ORDER BY entity, name ASC";
|
||||
$sql.= $db->order($sortfield, $sortorder);
|
||||
|
||||
dol_syslog("Const::listConstant", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
@ -243,13 +262,11 @@ if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
$var=false;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
|
||||
print "\n";
|
||||
|
||||
print '<tr class="oddeven"><td>'.$obj->name.'</td>'."\n";
|
||||
@ -267,6 +284,11 @@ if ($result)
|
||||
print '<input type="text" id="note_'.$i.'" class="flat inputforupdate" size="40" name="const['.$i.'][note]" value="'.htmlspecialchars($obj->note, 1).'">';
|
||||
print '</td>';
|
||||
|
||||
// Date last change
|
||||
print '<td>';
|
||||
print dol_print_date($db->jdate($obj->tms), 'dayhour');
|
||||
print '</td>';
|
||||
|
||||
// Entity limit to superadmin
|
||||
if (! empty($conf->multicompany->enabled) && !$user->entity)
|
||||
{
|
||||
|
||||
@ -577,7 +577,7 @@ if ($id == 11)
|
||||
'project' => $langs->trans('Project'),
|
||||
'project_task' => $langs->trans('Task'),
|
||||
'agenda' => $langs->trans('Agenda'),
|
||||
'resource' => $langs->trans('Resource'),
|
||||
'dolresource' => $langs->trans('Resource'),
|
||||
// old deprecated
|
||||
'propal' => $langs->trans('Proposal'),
|
||||
'commande' => $langs->trans('Order'),
|
||||
|
||||
@ -302,7 +302,7 @@ class Boms extends DolibarrApi
|
||||
private function _validate($data)
|
||||
{
|
||||
$myobject = array();
|
||||
foreach ($this->myobject->fields as $field => $propfield) {
|
||||
foreach ($this->bom->fields as $field => $propfield) {
|
||||
if (in_array($field, array('rowid', 'entity', 'date_creation', 'tms', 'fk_user_creat')) || $propfield['notnull'] != 1) continue; // Not a mandatory field
|
||||
if (!isset($data[$field]))
|
||||
throw new RestException(400, "$field field missing");
|
||||
|
||||
@ -312,7 +312,7 @@ class Orders extends DolibarrApi
|
||||
*
|
||||
* @url PUT {id}/lines/{lineid}
|
||||
*
|
||||
* @return object
|
||||
* @return array|bool
|
||||
*/
|
||||
public function putLine($id, $lineid, $request_data = null)
|
||||
{
|
||||
|
||||
@ -316,7 +316,7 @@ class Invoices extends DolibarrApi
|
||||
*
|
||||
* @url PUT {id}/lines/{lineid}
|
||||
*
|
||||
* @return object
|
||||
* @return array
|
||||
*
|
||||
* @throws 200
|
||||
* @throws 304
|
||||
@ -423,7 +423,7 @@ class Invoices extends DolibarrApi
|
||||
*
|
||||
* @url DELETE {id}/contact/{rowid}
|
||||
*
|
||||
* @return int
|
||||
* @return array
|
||||
* @throws 401
|
||||
* @throws 404
|
||||
* @throws 500
|
||||
|
||||
@ -66,10 +66,20 @@ class ChargeSociales extends CommonObject
|
||||
public $date_validation;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
* @var int account ID
|
||||
*/
|
||||
public $fk_account;
|
||||
|
||||
/**
|
||||
* @var int account ID (identical to fk_account)
|
||||
*/
|
||||
public $accountid;
|
||||
|
||||
/**
|
||||
* @var int payment type (identical to mode_reglement_id in commonobject class)
|
||||
*/
|
||||
public $paiementtype;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
*/
|
||||
|
||||
@ -89,7 +89,7 @@ class box_commandes extends ModeleBoxes
|
||||
$sql = "SELECT s.nom as name";
|
||||
$sql.= ", s.rowid as socid";
|
||||
$sql.= ", s.code_client";
|
||||
$sql.= ", s.logo";
|
||||
$sql.= ", s.logo, s.email";
|
||||
$sql.= ", c.ref, c.tms";
|
||||
$sql.= ", c.rowid";
|
||||
$sql.= ", c.date_commande";
|
||||
@ -130,6 +130,7 @@ class box_commandes extends ModeleBoxes
|
||||
$commandestatic->total_ttc = $objp->total_ttc;
|
||||
$societestatic->id = $objp->socid;
|
||||
$societestatic->name = $objp->name;
|
||||
$societestatic->email = $objp->email;
|
||||
$societestatic->code_client = $objp->code_client;
|
||||
$societestatic->logo = $objp->logo;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015-2019 Frederic France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -88,7 +88,7 @@ class box_prospect extends ModeleBoxes
|
||||
{
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid";
|
||||
$sql.= ", s.code_client";
|
||||
$sql.= ", s.client";
|
||||
$sql.= ", s.client, s.email";
|
||||
$sql.= ", s.code_fournisseur";
|
||||
$sql.= ", s.fournisseur";
|
||||
$sql.= ", s.logo";
|
||||
@ -116,6 +116,7 @@ class box_prospect extends ModeleBoxes
|
||||
$datem=$this->db->jdate($objp->tms);
|
||||
$thirdpartystatic->id = $objp->socid;
|
||||
$thirdpartystatic->name = $objp->name;
|
||||
$thirdpartystatic->email = $objp->email;
|
||||
$thirdpartystatic->code_client = $objp->code_client;
|
||||
$thirdpartystatic->code_fournisseur = $objp->code_fournisseur;
|
||||
$thirdpartystatic->client = $objp->client;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2004-2006 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015-2019 Frederic France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -85,7 +85,7 @@ class box_supplier_orders extends ModeleBoxes
|
||||
{
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid,";
|
||||
$sql.= " s.code_client, s.code_fournisseur,";
|
||||
$sql.= " s.logo,";
|
||||
$sql.= " s.logo, s.email,";
|
||||
$sql.= " c.rowid, c.ref, c.tms, c.date_commande,";
|
||||
$sql.= " c.total_ht,";
|
||||
$sql.= " c.tva as total_tva,";
|
||||
@ -118,6 +118,7 @@ class box_supplier_orders extends ModeleBoxes
|
||||
|
||||
$thirdpartytmp->id = $objp->socid;
|
||||
$thirdpartytmp->name = $objp->name;
|
||||
$thirdpartytmp->email = $objp->email;
|
||||
$thirdpartytmp->fournisseur = 1;
|
||||
$thirdpartytmp->code_fournisseur = $objp->code_fournisseur;
|
||||
$thirdpartytmp->logo = $objp->logo;
|
||||
|
||||
@ -147,7 +147,7 @@ class FormTicket
|
||||
$extrafields = new ExtraFields($this->db);
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($ticketstat->table_element);
|
||||
|
||||
print "\n<!-- Begin form TICKETSUP -->\n";
|
||||
print "\n<!-- Begin form TICKET -->\n";
|
||||
|
||||
if ($withdolfichehead) dol_fiche_head(null, 'card', '', 0, '');
|
||||
|
||||
@ -837,7 +837,7 @@ class FormTicket
|
||||
$outputlangs->load('other');
|
||||
}
|
||||
|
||||
print "\n<!-- Begin message_form TICKETSUP -->\n";
|
||||
print "\n<!-- Begin message_form TICKET -->\n";
|
||||
|
||||
$send_email = GETPOST('send_email', 'int') ? GETPOST('send_email', 'int') : 0;
|
||||
|
||||
|
||||
@ -865,10 +865,42 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
$page = GETPOST('page', 'int');
|
||||
|
||||
$search_status = GETPOST("search_status", 'int');
|
||||
if ($search_status=='') $search_status=1; // always display active customer first
|
||||
$search_name = GETPOST("search_name", 'alpha');
|
||||
$search_addressphone = GETPOST("search_addressphone", 'alpha');
|
||||
|
||||
$search_name = GETPOST("search_name", 'alpha');
|
||||
$search_address = GETPOST("search_address", 'alpha');
|
||||
$search_poste = GETPOST("search_poste", 'alpha');
|
||||
|
||||
$searchAddressPhoneDBFields = array(
|
||||
//Address
|
||||
't.address',
|
||||
't.zip',
|
||||
't.town',
|
||||
|
||||
//Phone
|
||||
't.phone',
|
||||
't.phone_perso',
|
||||
't.phone_mobile',
|
||||
|
||||
//Fax
|
||||
't.fax',
|
||||
|
||||
//E-mail
|
||||
't.email',
|
||||
|
||||
//Social media
|
||||
"t.skype",
|
||||
"t.jabberid",
|
||||
"t.twitter",
|
||||
"t.facebook",
|
||||
"t.linkedin",
|
||||
"t.whatsapp",
|
||||
"t.youtube",
|
||||
"t.snapchat",
|
||||
"t.instagram"
|
||||
);
|
||||
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
if (! $sortfield) $sortfield="t.lastname";
|
||||
@ -915,9 +947,12 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
||||
|
||||
// Initialize array of search criterias
|
||||
$search=array();
|
||||
foreach($contactstatic->fields as $key => $val)
|
||||
foreach($arrayfields as $key => $val)
|
||||
{
|
||||
if (GETPOST('search_'.$key, 'alpha')) $search[$key]=GETPOST('search_'.$key, 'alpha');
|
||||
$queryName = 'search_'.substr($key, 2);
|
||||
if (GETPOST($queryName, 'alpha')){
|
||||
$search[$key]=GETPOST($queryName, 'alpha');
|
||||
}
|
||||
}
|
||||
$search_array_options=$extrafields->getOptionalsFromPost($contactstatic->table_element, '', 'search_');
|
||||
|
||||
@ -926,14 +961,15 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
||||
{
|
||||
$search_status = '';
|
||||
$search_name = '';
|
||||
$search_addressphone = '';
|
||||
$search_address = '';
|
||||
$search_poste = '';
|
||||
$search= [];
|
||||
$search_array_options=array();
|
||||
|
||||
foreach($contactstatic->fields as $key => $val)
|
||||
{
|
||||
$search[$key]='';
|
||||
}
|
||||
$toselect='';
|
||||
}
|
||||
|
||||
$contactstatic->fields = dol_sort_array($contactstatic->fields, 'position');
|
||||
@ -968,7 +1004,10 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
||||
$param="socid=".urlencode($object->id);
|
||||
if ($search_status != '') $param.='&search_status='.urlencode($search_status);
|
||||
if ($search_name != '') $param.='&search_name='.urlencode($search_name);
|
||||
if ($search_poste != '') $param.='&search_poste='.urlencode($search_poste);
|
||||
if ($search_address != '') $param.='&search_address='.urlencode($search_address);
|
||||
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||
|
||||
// Add $param from extra fields
|
||||
$extrafieldsobjectkey=$contactstatic->table_element;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
@ -979,7 +1018,9 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||
$sql .= " WHERE t.fk_soc = ".$object->id;
|
||||
if ($search_status!='' && $search_status != '-1') $sql .= " AND t.statut = ".$db->escape($search_status);
|
||||
if ($search_name) $sql .= natural_search(array('t.lastname', 't.firstname'), $search_name);
|
||||
if ($search_name) $sql .= natural_search(array('t.lastname', 't.firstname'), $search_name);
|
||||
if ($search_poste) $sql .= natural_search('t.poste', $search_poste);
|
||||
if ($search_address) $sql .= natural_search($searchAddressPhoneDBFields, $search_address);
|
||||
// Add where from extra fields
|
||||
$extrafieldsobjectkey=$contactstatic->table_element;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
||||
@ -995,17 +1036,21 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
||||
// Fields title search
|
||||
// --------------------------------------------------------------------
|
||||
print '<tr class="liste_titre">';
|
||||
foreach($contactstatic->fields as $key => $val)
|
||||
foreach($arrayfields as $key => $val)
|
||||
{
|
||||
$align='';
|
||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $align.=($align?' ':'').'center';
|
||||
if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap';
|
||||
if ($key == 'status' || $key == 'statut') $align.=($align?' ':'').'center';
|
||||
if (! empty($arrayfields['t.'.$key]['checked']))
|
||||
if (in_array($val['type'], array('t.date','t.datetime','t.timestamp'))) $align.=($align?' ':'').'center';
|
||||
if (in_array($val['type'], array('t.timestamp'))) $align.=($align?' ':'').'nowrap';
|
||||
if ($key == 't.status' || $key == 't.statut') $align.=($align?' ':'').'center';
|
||||
if (! empty($arrayfields[$key]['checked']))
|
||||
{
|
||||
print '<td class="liste_titre'.($align?' '.$align:'').'">';
|
||||
if (in_array($key, array('lastname','name'))) print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
|
||||
elseif (in_array($key, array('statut'))) print $form->selectarray('search_status', array('-1'=>'','0'=>$contactstatic->LibStatut(0, 1),'1'=>$contactstatic->LibStatut(1, 1)), $search_status);
|
||||
if (in_array($key, array('t.statut'))){
|
||||
print $form->selectarray('search_status', array('-1'=>'','0'=>$contactstatic->LibStatut(0, 1),'1'=>$contactstatic->LibStatut(1, 1)), $search_status);
|
||||
}else{
|
||||
$fieldName = substr($key, 2);
|
||||
print sprintf('<input type="text" class="flat maxwidth75" name="search_%s" value="%s">', $fieldName, dol_escape_htmltag($search[$key]));
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
@ -1019,8 +1064,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print $form->showFilterButtons();
|
||||
print '</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
|
||||
@ -1368,12 +1368,23 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
||||
{
|
||||
$width=80; $cssclass='photoref';
|
||||
$showimage=$object->is_photo_available($conf->ticket->multidir_output[$entity].'/'.$object->ref);
|
||||
$maxvisiblephotos=(isset($conf->global->TICKETSUP_MAX_VISIBLE_PHOTO)?$conf->global->TICKETSUP_MAX_VISIBLE_PHOTO:2);
|
||||
$maxvisiblephotos=(isset($conf->global->TICKET_MAX_VISIBLE_PHOTO)?$conf->global->TICKET_MAX_VISIBLE_PHOTO:2);
|
||||
if ($conf->browser->layout == 'phone') $maxvisiblephotos=1;
|
||||
if ($showimage) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$object->show_photos('ticket', $conf->ticket->multidir_output[$entity], 'small', $maxvisiblephotos, 0, 0, 0, $width, 0).'</div>';
|
||||
else
|
||||
if ($showimage)
|
||||
{
|
||||
if (!empty($conf->global->TICKETSUP_NODISPLAYIFNOPHOTO)) {
|
||||
$showphoto = $object->show_photos('ticket', $conf->ticket->multidir_output[$entity], 'small', $maxvisiblephotos, 0, 0, 0, $width, 0);
|
||||
if ($object->nbphoto > 0)
|
||||
{
|
||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$showphoto.'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$showimage = 0;
|
||||
}
|
||||
}
|
||||
if (! $showimage)
|
||||
{
|
||||
if (!empty($conf->global->TICKET_NODISPLAYIFNOPHOTO)) {
|
||||
$nophoto='';
|
||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"></div>';
|
||||
}
|
||||
|
||||
@ -502,38 +502,31 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
|
||||
$out.="\n";
|
||||
|
||||
$out.='<div class="div-table-responsive-no-min">';
|
||||
$out.='<table class="noborder" width="100%">';
|
||||
$out.='<table class="noborder borderbottom centpercent">';
|
||||
|
||||
$out.='<tr class="liste_titre">';
|
||||
|
||||
$out.='<td class="liste_titre">';
|
||||
if($sortorder === 'desc') {
|
||||
$sortUrl = $_SERVER["PHP_SELF"] . '?sortfield=a.datep&sortorder=asc' . $param;
|
||||
$out .= dolGetButtonTitle($langs->trans('Date'), $langs->trans('OrderByDateAsc'), 'fa fa-sort-numeric-down', $sortUrl, '', 1);
|
||||
}
|
||||
else{
|
||||
$sortUrl = $_SERVER["PHP_SELF"] . '?sortfield=a.datep&sortorder=desc' . $param;
|
||||
$out .= dolGetButtonTitle($langs->trans('Date'), $langs->trans('OrderByDateDesc'), 'fa fa-sort-numeric-down-alt', $sortUrl, '', 1);
|
||||
}
|
||||
$out.='</td>';
|
||||
//$out.='<td class="liste_titre">';
|
||||
$out .= getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', '', $param, '', $sortfield, $sortorder, '')."\n";
|
||||
//$out.='</td>';
|
||||
|
||||
$out.='<td class="liste_titre"><strong>'.$langs->trans("Search").' : </strong></td>';
|
||||
$out.='<th class="liste_titre"><strong>'.$langs->trans("Search").' : </strong></th>';
|
||||
if ($donetodo)
|
||||
{
|
||||
$out.='<td class="liste_titre"></td>';
|
||||
$out.='<th class="liste_titre"></th>';
|
||||
}
|
||||
$out.='<td class="liste_titre">'.$langs->trans("Type").' ';
|
||||
$out.='<th class="liste_titre">'.$langs->trans("Type").' ';
|
||||
$out.=$formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:-1, 0, 0, 1);
|
||||
$out.='</td>';
|
||||
$out.='<td class="liste_titre maxwidth100onsmartphone">';
|
||||
$out.='</th>';
|
||||
$out.='<th class="liste_titre maxwidth100onsmartphone">';
|
||||
$out.=$langs->trans("Label").' ';
|
||||
$out.='<input type="text" class="maxwidth100onsmartphone" name="search_agenda_label" value="'.$filters['search_agenda_label'].'">';
|
||||
$out.='</td>';
|
||||
$out.='</th>';
|
||||
|
||||
$out.='<td class="liste_titre" align="middle">';
|
||||
$out.='<th class="liste_titre width50 middle">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
|
||||
$out.=$searchpicto;
|
||||
$out.='</td>';
|
||||
$out.='</th>';
|
||||
$out.='</tr>';
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers
|
||||
$this->description = "Zapier triggers.";
|
||||
// 'development', 'experimental', 'dolibarr' or version
|
||||
$this->version = 'development';
|
||||
$this->picto = 'zapier@zapier';
|
||||
$this->picto = 'zapier';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -102,6 +102,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers
|
||||
return 0;
|
||||
}
|
||||
$logtriggeraction = false;
|
||||
$sql = '';
|
||||
if ($action!='') {
|
||||
$actions = explode('_', $action);
|
||||
$sql = 'SELECT rowid, url FROM '.MAIN_DB_PREFIX.'zapier_hook';
|
||||
@ -460,7 +461,7 @@ function cleanObjectDatas($toclean)
|
||||
if (isset($toclean->lines) && count($toclean->lines) > 0) {
|
||||
$nboflines = count($toclean->lines);
|
||||
for ($i=0; $i < $nboflines; $i++) {
|
||||
$this->cleanObjectDatas($toclean->lines[$i]);
|
||||
cleanObjectDatas($toclean->lines[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -147,6 +147,16 @@ else
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupportCurl")."<br>\n";
|
||||
}
|
||||
|
||||
// Check if PHP calendar extension is available
|
||||
if (! function_exists("easter_date"))
|
||||
{
|
||||
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportCalendar")."<br>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupportCalendar")."<br>\n";
|
||||
}
|
||||
|
||||
|
||||
// Check if UTF8 supported
|
||||
if (! function_exists("utf8_encode"))
|
||||
|
||||
@ -13,6 +13,7 @@ PHPSupportPOSTGETOk=This PHP supports variables POST and GET.
|
||||
PHPSupportPOSTGETKo=It's possible your PHP setup does not support variables POST and/or GET. Check the parameter <b>variables_order</b> in php.ini.
|
||||
PHPSupportGD=This PHP supports GD graphical functions.
|
||||
PHPSupportCurl=This PHP supports Curl.
|
||||
PHPSupportCalendar=This PHP supports calendars extensions.
|
||||
PHPSupportUTF8=This PHP supports UTF8 functions.
|
||||
PHPSupportIntl=This PHP supports Intl functions.
|
||||
PHPMemoryOK=Your PHP max session memory is set to <b>%s</b>. This should be enough.
|
||||
@ -21,6 +22,7 @@ Recheck=Click here for a more detailed test
|
||||
ErrorPHPDoesNotSupportSessions=Your PHP installation does not support sessions. This feature is required to allow Dolibarr to work. Check your PHP setup and permissions of the sessions directory.
|
||||
ErrorPHPDoesNotSupportGD=Your PHP installation does not support GD graphical functions. No graphs will be available.
|
||||
ErrorPHPDoesNotSupportCurl=Your PHP installation does not support Curl.
|
||||
ErrorPHPDoesNotSupportCalendar=Your PHP installation does not support php calendar extensions.
|
||||
ErrorPHPDoesNotSupportUTF8=Your PHP installation does not support UTF8 functions. Dolibarr cannot work correctly. Resolve this before installing Dolibarr.
|
||||
ErrorPHPDoesNotSupportIntl=Your PHP installation does not support Intl functions.
|
||||
ErrorDirDoesNotExists=Directory %s does not exist.
|
||||
|
||||
@ -75,7 +75,7 @@ class Contacts extends DolibarrApi
|
||||
throw new RestException(401, 'No permission to read contacts');
|
||||
}
|
||||
if ($id ==0) {
|
||||
$result = $this->contact->intiAsSpecimen();
|
||||
$result = $this->contact->initAsSpecimen();
|
||||
} else {
|
||||
$result = $this->contact->fetch($id);
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ class Thirdparties extends DolibarrApi
|
||||
throw new RestException(401);
|
||||
}
|
||||
if ($id ==0) {
|
||||
$result = $this->company->intiAsSpecimen();
|
||||
$result = $this->company->initAsSpecimen();
|
||||
} else {
|
||||
$result = $this->company->fetch($id);
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ $url_page_current = DOL_URL_ROOT.'/ticket/card.php';
|
||||
//if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||
$result = restrictedArea($user, 'ticket', $object->id);
|
||||
|
||||
$triggermodname = 'TICKETSUP_MODIFY';
|
||||
$triggermodname = 'TICKET_MODIFY';
|
||||
$permissiontoadd = $user->rights->ticket->write;
|
||||
|
||||
$actionobject = new ActionsTicket($db);
|
||||
|
||||
@ -2672,7 +2672,7 @@ class Ticket extends CommonObject
|
||||
global $conf, $langs;
|
||||
|
||||
if ($conf->global->TICKET_DISABLE_ALL_MAILS) {
|
||||
dol_syslog(get_class($this) . '::sendTicketMessageByEmail: Emails are disable into ticket setup by option TICKETSUP_DISABLE_ALL_MAILS', LOG_WARNING);
|
||||
dol_syslog(get_class($this) . '::sendTicketMessageByEmail: Emails are disable into ticket setup by option TICKET_DISABLE_ALL_MAILS', LOG_WARNING);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
@ -210,7 +210,8 @@ class ZapierApi extends DolibarrApi
|
||||
$sql.= $db->plimit($limit + 1, $offset);
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
$result = $db->query($sql);
|
||||
$i = 0;
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
while ($i < $num) {
|
||||
@ -240,9 +241,6 @@ class ZapierApi extends DolibarrApi
|
||||
*/
|
||||
public function post($request_data = null)
|
||||
{
|
||||
// $debug = '<pre>'.print_r($request_data, true).'</pre>';
|
||||
// $debug .= '<pre>'.print_r(DolibarrApiAccess::$user->rights->zapier, true).'</pre>';
|
||||
// mail('frederic.france@free.fr', 'test hook', $debug);
|
||||
if (! DolibarrApiAccess::$user->rights->zapier->write) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
@ -196,7 +196,7 @@ if ($object->id > 0)
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
$object->info($object->id);
|
||||
print dol_print_object_info($object, 1);
|
||||
dol_print_object_info($object, 1);
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -413,7 +413,7 @@ class FilesLibTest extends PHPUnit\Framework\TestCase
|
||||
|
||||
$result=dol_compress_file($filein, $fileout, $format, $errorstring);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertGreaterThanOrEqual(1, $result, "Pb with dol_compress_file ".$errorstring);
|
||||
$this->assertGreaterThanOrEqual(1, $result, "Pb with dol_compress_file on ".$filein." : ".$errorstring);
|
||||
|
||||
$result=dol_uncompress($fileout, $dirout);
|
||||
print __METHOD__." result=".join(',', $result)."\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user