Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
0b32b24eba
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -51,12 +52,12 @@ if ($actionsave)
|
|||||||
if ($i >= 3)
|
if ($i >= 3)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
setEventMessage($langs->trans("SetupSaved"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
$mesg = "<font class=\"error\">".$langs->trans("SaveFailed")."</font>";
|
setEventMessage($langs->trans("SaveFailed"), 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +96,10 @@ print "</tr>";
|
|||||||
|
|
||||||
print "<tr class=\"impair\">";
|
print "<tr class=\"impair\">";
|
||||||
print '<td class="fieldrequired">'.$langs->trans("PasswordTogetVCalExport")."</td>";
|
print '<td class="fieldrequired">'.$langs->trans("PasswordTogetVCalExport")."</td>";
|
||||||
print "<td><input required=\"required\" type=\"text\" class=\"flat\" name=\"MAIN_AGENDA_XCAL_EXPORTKEY\" value=\"". (GETPOST('MAIN_AGENDA_XCAL_EXPORTKEY','alpha')?GETPOST('MAIN_AGENDA_XCAL_EXPORTKEY','alpha'):$conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) . "\" size=\"40\"></td>";
|
print '<td><input required="required" type="text" class="flat" id="MAIN_AGENDA_XCAL_EXPORTKEY" name="MAIN_AGENDA_XCAL_EXPORTKEY" value="' . (GETPOST('MAIN_AGENDA_XCAL_EXPORTKEY','alpha')?GETPOST('MAIN_AGENDA_XCAL_EXPORTKEY','alpha'):$conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) . '" size="40">';
|
||||||
|
if (! empty($conf->use_javascript_ajax))
|
||||||
|
print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
|
||||||
|
print '</td>';
|
||||||
print "<td> </td>";
|
print "<td> </td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
@ -147,9 +151,24 @@ $message.=$langs->trans("AgendaUrlOptions4",$user->login,$user->login).'<br>';
|
|||||||
$message.=$langs->trans("AgendaUrlOptions5",$user->login,$user->login);
|
$message.=$langs->trans("AgendaUrlOptions5",$user->login,$user->login);
|
||||||
print info_admin($message);
|
print info_admin($message);
|
||||||
|
|
||||||
dol_htmloutput_mesg($mesg);
|
if (! empty($conf->use_javascript_ajax))
|
||||||
|
{
|
||||||
|
print "\n".'<script type="text/javascript">';
|
||||||
|
print '$(document).ready(function () {
|
||||||
|
$("#generate_token").click(function() {
|
||||||
|
$.get( "'.DOL_URL_ROOT.'/core/ajax/security.php", {
|
||||||
|
action: \'getrandompassword\',
|
||||||
|
generic: true
|
||||||
|
},
|
||||||
|
function(token) {
|
||||||
|
$("#MAIN_AGENDA_XCAL_EXPORTKEY").val(token);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});';
|
||||||
|
print '</script>';
|
||||||
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -118,7 +118,7 @@ if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
|||||||
if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ;
|
if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ;
|
||||||
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||||
if ($search_nom) $sql.= " AND s.nom LIKE '%".$db->escape($search_nom)."%'";
|
if ($search_nom) $sql.= " AND s.nom LIKE '%".$db->escape($search_nom)."%'";
|
||||||
if ($search_zipcode) $sql.= " AND s.cp LIKE '%".$db->escape($search_zipcode)."%'";
|
if ($search_zipcode) $sql.= " AND s.cp LIKE '".$db->escape($search_zipcode)."%'";
|
||||||
if ($search_ville) $sql.= " AND s.ville LIKE '%".$db->escape($search_ville)."%'";
|
if ($search_ville) $sql.= " AND s.ville LIKE '%".$db->escape($search_ville)."%'";
|
||||||
if ($search_code) $sql.= " AND s.code_client LIKE '%".$db->escape($search_code)."%'";
|
if ($search_code) $sql.= " AND s.code_client LIKE '%".$db->escape($search_code)."%'";
|
||||||
if ($search_compta) $sql.= " AND s.code_compta LIKE '%".$db->escape($search_compta)."%'";
|
if ($search_compta) $sql.= " AND s.code_compta LIKE '%".$db->escape($search_compta)."%'";
|
||||||
@ -144,7 +144,7 @@ if ($result)
|
|||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
$param = "&search_nom=".$search_nom."&search_code=".$search_code."&search_ville=".$search_ville;
|
$param = "&search_nom=".$search_nom."&search_code=".$search_code."&search_zipcode=".$search_zipcode."&search_ville=".$search_ville;
|
||||||
if ($search_categ != '') $param.='&search_categ='.$search_categ;
|
if ($search_categ != '') $param.='&search_categ='.$search_categ;
|
||||||
if ($search_sale != '') $param.='&search_sale='.$search_sale;
|
if ($search_sale != '') $param.='&search_sale='.$search_sale;
|
||||||
|
|
||||||
|
|||||||
@ -195,7 +195,7 @@ if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
|||||||
if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ;
|
if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ;
|
||||||
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||||
if ($search_nom) $sql .= " AND s.nom LIKE '%".$db->escape(strtolower($search_nom))."%'";
|
if ($search_nom) $sql .= " AND s.nom LIKE '%".$db->escape(strtolower($search_nom))."%'";
|
||||||
if ($search_zipcode) $sql .= " AND s.cp LIKE '%".$db->escape(strtolower($search_zipcode))."%'";
|
if ($search_zipcode) $sql .= " AND s.cp LIKE '".$db->escape(strtolower($search_zipcode))."%'";
|
||||||
if ($search_ville) $sql .= " AND s.ville LIKE '%".$db->escape(strtolower($search_ville))."%'";
|
if ($search_ville) $sql .= " AND s.ville LIKE '%".$db->escape(strtolower($search_ville))."%'";
|
||||||
if ($search_departement) $sql .= " AND d.nom LIKE '%".$db->escape(strtolower($search_departement))."%'";
|
if ($search_departement) $sql .= " AND d.nom LIKE '%".$db->escape(strtolower($search_departement))."%'";
|
||||||
if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'";
|
if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'";
|
||||||
@ -244,7 +244,7 @@ if ($resql)
|
|||||||
llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
$param='&stcomm='.$stcomm.'&search_nom='.urlencode($search_nom).'&search_ville='.urlencode($search_ville);
|
$param='&stcomm='.$stcomm.'&search_nom='.urlencode($search_nom).'&search_zipcode='.urlencode($search_code).'&search_ville='.urlencode($search_ville);
|
||||||
// Added by Matelli
|
// Added by Matelli
|
||||||
// Store the status filter in the URL
|
// Store the status filter in the URL
|
||||||
if (isSet($search_cstc))
|
if (isSet($search_cstc))
|
||||||
|
|||||||
@ -1020,23 +1020,35 @@ class DoliDBPgsql
|
|||||||
*
|
*
|
||||||
* @param string $table Name of table
|
* @param string $table Name of table
|
||||||
* @return array Tableau des informations des champs de la table
|
* @return array Tableau des informations des champs de la table
|
||||||
* TODO modify for postgresql
|
*
|
||||||
*/
|
*/
|
||||||
function DDLInfoTable($table)
|
function DDLInfoTable($table)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
$infotables=array();
|
$infotables=array();
|
||||||
|
|
||||||
$sql="SHOW FULL COLUMNS FROM ".$table.";";
|
$sql="SELECT ";
|
||||||
|
$sql.=" infcol.column_name as \"Column\",";
|
||||||
|
$sql.=" CASE WHEN infcol.character_maximum_length IS NOT NULL THEN infcol.udt_name || '('||infcol.character_maximum_length||')'";
|
||||||
|
$sql.=" ELSE infcol.udt_name";
|
||||||
|
$sql.=" END as \"Type\",";
|
||||||
|
$sql.=" infcol.collation_name as \"Collation\",";
|
||||||
|
$sql.=" infcol.is_nullable as \"Null\",";
|
||||||
|
$sql.=" '' as \"Key\",";
|
||||||
|
$sql.=" infcol.column_default as \"Default\",";
|
||||||
|
$sql.=" '' as \"Extra\",";
|
||||||
|
$sql.=" '' as \"Privileges\"";
|
||||||
|
$sql.=" FROM information_schema.columns infcol";
|
||||||
|
$sql.=" WHERE table_schema='public' ";
|
||||||
|
$sql.=" AND table_name='".$table."'";
|
||||||
|
$sql.=" ORDER BY ordinal_position;";
|
||||||
|
|
||||||
dol_syslog($sql,LOG_DEBUG);
|
dol_syslog($sql,LOG_DEBUG);
|
||||||
$result = $this->pg_query($this->db,$sql);
|
$result = $this->query($sql);
|
||||||
while($row = $this->fetch_row($result))
|
while($row = $this->fetch_row($result))
|
||||||
{
|
{
|
||||||
$infotables[] = $row;
|
$infotables[] = $row;
|
||||||
}
|
}
|
||||||
return $infotables;
|
return $infotables;
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -87,8 +87,6 @@
|
|||||||
$reshook=$hookmanager->executeHooks('formEditProductOptions',$parameters,$this,$action);
|
$reshook=$hookmanager->executeHooks('formEditProductOptions',$parameters,$this,$action);
|
||||||
}
|
}
|
||||||
|
|
||||||
//echo '<br>'; // Fix: No reason to start a content of the cells with br
|
|
||||||
|
|
||||||
// editeur wysiwyg
|
// editeur wysiwyg
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
$nbrows=ROWS_2;
|
$nbrows=ROWS_2;
|
||||||
|
|||||||
@ -97,7 +97,7 @@ if ($socname)
|
|||||||
$sortorder = "ASC";
|
$sortorder = "ASC";
|
||||||
}
|
}
|
||||||
if ($search_nom) $sql .= " AND s.nom LIKE '%".$db->escape($search_nom)."%'";
|
if ($search_nom) $sql .= " AND s.nom LIKE '%".$db->escape($search_nom)."%'";
|
||||||
if ($search_zipcode) $sql .= " AND s.cp LIKE '%".$db->escape($search_zipcode)."%'";
|
if ($search_zipcode) $sql .= " AND s.cp LIKE '".$db->escape($search_zipcode)."%'";
|
||||||
if ($search_ville) $sql .= " AND s.ville LIKE '%".$db->escape($search_ville)."%'";
|
if ($search_ville) $sql .= " AND s.ville LIKE '%".$db->escape($search_ville)."%'";
|
||||||
if ($search_code_fournisseur) $sql .= " AND s.code_fournisseur LIKE '%".$db->escape($search_code_fournisseur)."%'";
|
if ($search_code_fournisseur) $sql .= " AND s.code_fournisseur LIKE '%".$db->escape($search_code_fournisseur)."%'";
|
||||||
if ($search_compta_fournisseur) $sql .= " AND s.code_compta_fournisseur LIKE '%".$db->escape($search_compta_fournisseur)."%'";
|
if ($search_compta_fournisseur) $sql .= " AND s.code_compta_fournisseur LIKE '%".$db->escape($search_compta_fournisseur)."%'";
|
||||||
@ -122,7 +122,7 @@ if ($resql)
|
|||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$param = "&search_nom=".$search_nom."&search_code_fournisseur=".$search_code_fournisseur."&search_ville=".$search_ville;
|
$param = "&search_nom=".$search_nom."&search_code_fournisseur=".$search_code_fournisseur."&search_zipcode=".$search_zipcode."&search_ville=".$search_ville;
|
||||||
if ($search_categ != '') $param.='&search_categ='.$search_categ;
|
if ($search_categ != '') $param.='&search_categ='.$search_categ;
|
||||||
|
|
||||||
print_barre_liste($langs->trans("ListOfSuppliers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords);
|
print_barre_liste($langs->trans("ListOfSuppliers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords);
|
||||||
|
|||||||
@ -71,7 +71,7 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
$mesg='<div class="ok">'.$langs->trans("SetupSaved").'</div>';
|
setEventMessage($langs->trans("SetupSaved"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -100,37 +100,13 @@ dol_fiche_head($head, 'paypalaccount', $langs->trans("ModuleSetup"));
|
|||||||
|
|
||||||
print $langs->trans("PaypalDesc")."<br>\n";
|
print $langs->trans("PaypalDesc")."<br>\n";
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax)
|
|
||||||
{
|
|
||||||
print "\n".'<script type="text/javascript" language="javascript">';
|
|
||||||
print '$(document).ready(function () {
|
|
||||||
$("#apidoc").hide();
|
|
||||||
$("#apidoca").click(function() {
|
|
||||||
$("#apidoca").hide();
|
|
||||||
$("#apidoc").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#generate_token").click(function() {
|
|
||||||
$.get( "'.DOL_URL_ROOT.'/core/ajax/security.php", {
|
|
||||||
action: \'getrandompassword\',
|
|
||||||
generic: true
|
|
||||||
},
|
|
||||||
function(token) {
|
|
||||||
$("#PAYPAL_SECURITY_TOKEN").val(token);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});';
|
|
||||||
print '</script>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Test if php curl exist
|
// Test if php curl exist
|
||||||
if (! function_exists('curl_version'))
|
if (! function_exists('curl_version'))
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorPhpCurlNotInstalled").'</div>';
|
setEventMessage($langs->trans("ErrorPhpCurlNotInstalled"), 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_htmloutput_mesg($mesg);
|
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
@ -235,7 +211,8 @@ $var=!$var;
|
|||||||
print '<tr '.$bc[$var].'><td>';
|
print '<tr '.$bc[$var].'><td>';
|
||||||
print $langs->trans("SecurityToken").'</td><td>';
|
print $langs->trans("SecurityToken").'</td><td>';
|
||||||
print '<input size="48" type="text" id="PAYPAL_SECURITY_TOKEN" name="PAYPAL_SECURITY_TOKEN" value="'.$conf->global->PAYPAL_SECURITY_TOKEN.'">';
|
print '<input size="48" type="text" id="PAYPAL_SECURITY_TOKEN" name="PAYPAL_SECURITY_TOKEN" value="'.$conf->global->PAYPAL_SECURITY_TOKEN.'">';
|
||||||
print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
|
if (! empty($conf->use_javascript_ajax))
|
||||||
|
print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -256,7 +233,8 @@ print '<br><br>';
|
|||||||
|
|
||||||
// Help doc
|
// Help doc
|
||||||
print '<u>'.$langs->trans("InformationToFindParameters","Paypal").'</u>:<br>';
|
print '<u>'.$langs->trans("InformationToFindParameters","Paypal").'</u>:<br>';
|
||||||
if ($conf->use_javascript_ajax) print '<a href="#" id="apidoca">'.$langs->trans("ClickHere").'...</a>';
|
if (! empty($conf->use_javascript_ajax))
|
||||||
|
print '<a href="#" id="apidoca">'.$langs->trans("ClickHere").'...</a>';
|
||||||
|
|
||||||
$realpaypalurl='www.paypal.com';
|
$realpaypalurl='www.paypal.com';
|
||||||
$sandboxpaypalurl='developer.paypal.com';
|
$sandboxpaypalurl='developer.paypal.com';
|
||||||
@ -374,7 +352,29 @@ if (! empty($conf->adherent->enabled))
|
|||||||
print "<br>";
|
print "<br>";
|
||||||
print info_admin($langs->trans("YouCanAddTagOnUrl"));
|
print info_admin($langs->trans("YouCanAddTagOnUrl"));
|
||||||
|
|
||||||
llxFooter();
|
if (! empty($conf->use_javascript_ajax))
|
||||||
|
{
|
||||||
|
print "\n".'<script type="text/javascript">';
|
||||||
|
print '$(document).ready(function () {
|
||||||
|
$("#apidoc").hide();
|
||||||
|
$("#apidoca").click(function() {
|
||||||
|
$("#apidoca").hide();
|
||||||
|
$("#apidoc").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#generate_token").click(function() {
|
||||||
|
$.get( "'.DOL_URL_ROOT.'/core/ajax/security.php", {
|
||||||
|
action: \'getrandompassword\',
|
||||||
|
generic: true
|
||||||
|
},
|
||||||
|
function(token) {
|
||||||
|
$("#PAYPAL_SECURITY_TOKEN").val(token);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});';
|
||||||
|
print '</script>';
|
||||||
|
}
|
||||||
|
|
||||||
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user