Merge pull request #933 from FHenry/3.4
Make constraint SQL unique name (Mandatory for PgSQL)
This commit is contained in:
commit
28c4f9af61
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copytight (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -804,7 +805,7 @@ class Account extends CommonObject
|
|||||||
$sql = "SELECT sum(amount) as amount";
|
$sql = "SELECT sum(amount) as amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank";
|
||||||
$sql.= " WHERE fk_account = ".$this->id;
|
$sql.= " WHERE fk_account = ".$this->id;
|
||||||
if ($option == 1) $sql.= " AND dateo <= ".$this->db->idate(time());
|
if ($option == 1) $sql.= " AND dateo <= '".$this->db->idate(dol_now())."'";
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
* \brief Page liste des bons de prelevements
|
* \brief Page liste des bons de prelevements
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
* \brief Prelevement creation page
|
* \brief Prelevement creation page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
* \brief Page to list withdraw requests
|
* \brief Page to list withdraw requests
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/modPrelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/modules/modPrelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
* \brief Page liste des factures prelevees
|
* \brief Page liste des factures prelevees
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
* \brief Withdraw reject
|
* \brief Withdraw reject
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
* \brief Prelevement statistics
|
* \brief Prelevement statistics
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
* \brief Fiche prelevement
|
* \brief Fiche prelevement
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -24,7 +25,8 @@
|
|||||||
* \brief Prelevement index page
|
* \brief Prelevement index page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../../main.inc.php');
|
|
||||||
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
* \brief card of withdraw line
|
* \brief card of withdraw line
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
* \brief Prelevement lines
|
* \brief Prelevement lines
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
* \ingroup prelevement
|
* \ingroup prelevement
|
||||||
* \brief Page liste des prelevements
|
* \brief Page liste des prelevements
|
||||||
*/
|
*/
|
||||||
require('../../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
* \brief Reject page
|
* \brief Reject page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
* \brief Page de stats des prelevements
|
* \brief Page de stats des prelevements
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
|
|||||||
@ -184,13 +184,12 @@ function show_array_actions_to_do($max=5)
|
|||||||
$sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent,";
|
$sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent,";
|
||||||
$sql.= " c.code, c.libelle,";
|
$sql.= " c.code, c.libelle,";
|
||||||
$sql.= " s.nom as sname, s.rowid, s.client";
|
$sql.= " s.nom as sname, s.rowid, s.client";
|
||||||
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c,";
|
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c LEFT JOIN ";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a";
|
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a ON c.id = a.fk_action";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
$sql.= " WHERE c.id = a.fk_action";
|
$sql.= " WHERE a.entity = ".$conf->entity;
|
||||||
$sql.= " AND a.entity = ".$conf->entity;
|
|
||||||
$sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))";
|
$sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||||
@ -283,13 +282,12 @@ function show_array_last_actions_done($max=5)
|
|||||||
$sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label,";
|
$sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label,";
|
||||||
$sql.= " c.code, c.libelle,";
|
$sql.= " c.code, c.libelle,";
|
||||||
$sql.= " s.rowid, s.nom as sname, s.client";
|
$sql.= " s.rowid, s.nom as sname, s.client";
|
||||||
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c,";
|
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c LEFT JOIN ";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a";
|
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a ON c.id = a.fk_action ";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.=")";
|
$sql.=")";
|
||||||
$sql.= " WHERE c.id = a.fk_action";
|
$sql.= " WHERE a.entity = ".$conf->entity;
|
||||||
$sql.= " AND a.entity = ".$conf->entity;
|
|
||||||
$sql.= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))";
|
$sql.= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||||
|
|||||||
@ -1244,7 +1244,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity)
|
|||||||
|
|
||||||
if (empty($modulepart)) return 'ErrorBadParameter';
|
if (empty($modulepart)) return 'ErrorBadParameter';
|
||||||
if (empty($entity)) $entity=0;
|
if (empty($entity)) $entity=0;
|
||||||
|
dol_syslog('$modulepart='.$modulepart.' $original_file= '.$original_file);
|
||||||
// We define $accessallowed and $sqlprotectagainstexternals
|
// We define $accessallowed and $sqlprotectagainstexternals
|
||||||
$accessallowed=0;
|
$accessallowed=0;
|
||||||
$sqlprotectagainstexternals='';
|
$sqlprotectagainstexternals='';
|
||||||
@ -1365,8 +1365,11 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity)
|
|||||||
// Wrapping pour les prelevements
|
// Wrapping pour les prelevements
|
||||||
elseif ($modulepart == 'prelevement')
|
elseif ($modulepart == 'prelevement')
|
||||||
{
|
{
|
||||||
if ($user->rights->prelevement->bons->lire) $accessallowed=1;
|
if ($user->rights->prelevement->bons->lire || preg_match('/^specimen/i',$original_file))
|
||||||
$original_file=$conf->prelevement->dir_output.'/receipts/'.$original_file;
|
{
|
||||||
|
$accessallowed=1;
|
||||||
|
}
|
||||||
|
$original_file=$conf->prelevement->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les graph energie
|
// Wrapping pour les graph energie
|
||||||
elseif ($modulepart == 'graph_stock')
|
elseif ($modulepart == 'graph_stock')
|
||||||
@ -1466,17 +1469,6 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity)
|
|||||||
$original_file=$conf->deplacement->dir_output.'/'.$original_file;
|
$original_file=$conf->deplacement->dir_output.'/'.$original_file;
|
||||||
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$refname."' AND entity=".$conf->entity;
|
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$refname."' AND entity=".$conf->entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les prelevements
|
|
||||||
else if ($modulepart == 'prelevement')
|
|
||||||
{
|
|
||||||
if ($user->rights->prelevement->bons->lire || preg_match('/^specimen/i',$original_file))
|
|
||||||
{
|
|
||||||
$accessallowed=1;
|
|
||||||
}
|
|
||||||
$original_file=$conf->prelevement->dir_output.'/'.$original_file;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wrapping pour les propales
|
// Wrapping pour les propales
|
||||||
else if ($modulepart == 'propal')
|
else if ($modulepart == 'propal')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -947,7 +947,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$sql.= ", '".$this->note_public."'";
|
$sql.= ", '".$this->note_public."'";
|
||||||
$sql.= ", ".$conf->entity;
|
$sql.= ", ".$conf->entity;
|
||||||
$sql.= ", ".$this->socid;
|
$sql.= ", ".$this->socid;
|
||||||
$sql.= ", ".$this->db->idate($now);
|
$sql.= ", '".$this->db->idate($now)."'";
|
||||||
//$sql.= ", ".$this->db->idate($now);
|
//$sql.= ", ".$this->db->idate($now);
|
||||||
$sql.= ", ".$user->id;
|
$sql.= ", ".$user->id;
|
||||||
$sql.= ", 0";
|
$sql.= ", 0";
|
||||||
|
|||||||
@ -346,9 +346,9 @@ ALTER TABLE llx_opensurvey_comments ADD INDEX idx_id_comment (id_comment);
|
|||||||
ALTER TABLE llx_opensurvey_comments ADD INDEX idx_id_sondage (id_sondage);
|
ALTER TABLE llx_opensurvey_comments ADD INDEX idx_id_sondage (id_sondage);
|
||||||
ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_id_sondage_admin (id_sondage_admin);
|
ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_id_sondage_admin (id_sondage_admin);
|
||||||
ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_date_fin (date_fin);
|
ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_date_fin (date_fin);
|
||||||
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_id_users (id_users);
|
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_opensurvey_user_studs_id_users (id_users);
|
||||||
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_nom (nom);
|
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_opensurvey_user_studs_nom (nom);
|
||||||
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_id_sondage (id_sondage);
|
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_opensurvey_user_studs_id_sondage (id_sondage);
|
||||||
|
|
||||||
ALTER TABLE llx_boxes ADD COLUMN params varchar(255);
|
ALTER TABLE llx_boxes ADD COLUMN params varchar(255);
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,6 @@
|
|||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
|
|
||||||
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_id_users (id_users);
|
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_opensurvey_user_studs_id_users (id_users);
|
||||||
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_nom (nom);
|
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_opensurvey_user_studs_nom (nom);
|
||||||
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_id_sondage (id_sondage);
|
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_opensurvey_user_studs_id_sondage (id_sondage);
|
||||||
|
|||||||
@ -1292,9 +1292,11 @@ class Project extends CommonObject
|
|||||||
switch ($Tablename)
|
switch ($Tablename)
|
||||||
{
|
{
|
||||||
case "facture":
|
case "facture":
|
||||||
case "facture_fourn":
|
|
||||||
$sql = "SELECT rowid, facnumber as ref";
|
$sql = "SELECT rowid, facnumber as ref";
|
||||||
break;
|
break;
|
||||||
|
case "facture_fourn":
|
||||||
|
$sql = "SELECT rowid, ref";
|
||||||
|
break;
|
||||||
case "facture_rec":
|
case "facture_rec":
|
||||||
$sql = "SELECT rowid, titre as ref";
|
$sql = "SELECT rowid, titre as ref";
|
||||||
break;
|
break;
|
||||||
@ -1309,7 +1311,9 @@ class Project extends CommonObject
|
|||||||
|
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX.$Tablename;
|
$sql.= " FROM ".MAIN_DB_PREFIX.$Tablename;
|
||||||
$sql.= " WHERE ".$projectkey." is null";
|
$sql.= " WHERE ".$projectkey." is null";
|
||||||
$sql.= " AND fk_soc=".$this->societe->id;
|
if (!empty($this->societe->id)) {
|
||||||
|
$sql.= " AND fk_soc=".$this->societe->id;
|
||||||
|
}
|
||||||
$sql.= " ORDER BY ref DESC";
|
$sql.= " ORDER BY ref DESC";
|
||||||
|
|
||||||
dol_syslog("Project.Lib::select_element sql=".$sql);
|
dol_syslog("Project.Lib::select_element sql=".$sql);
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
* Copyright (C) 2005 Lionel Cousteix <etm_ltd@tiscali.co.uk>
|
* Copyright (C) 2005 Lionel Cousteix <etm_ltd@tiscali.co.uk>
|
||||||
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
||||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -85,6 +86,9 @@ $form = new Form($db);
|
|||||||
$object = new User($db);
|
$object = new User($db);
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
|
// fetch optionals attributes and labels
|
||||||
|
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('usercard'));
|
$hookmanager->initHooks(array('usercard'));
|
||||||
|
|
||||||
@ -560,9 +564,6 @@ if ($action == 'adduserldap')
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// fetch optionals attributes and labels
|
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
|
||||||
|
|
||||||
llxHeader('',$langs->trans("UserCard"));
|
llxHeader('',$langs->trans("UserCard"));
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user