Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
bfc933df4d
@ -3061,7 +3061,7 @@ function dol_mkdir($dir, $dataroot='')
|
|||||||
for ($i = 0; $i < $num; $i++)
|
for ($i = 0; $i < $num; $i++)
|
||||||
{
|
{
|
||||||
if ($i > 0) $ccdir .= '/'.$cdir[$i];
|
if ($i > 0) $ccdir .= '/'.$cdir[$i];
|
||||||
else $ccdir = $cdir[$i];
|
else $ccdir .= $cdir[$i];
|
||||||
if (preg_match("/^.:$/",$ccdir,$regs)) continue; // Si chemin Windows incomplet, on poursuit par rep suivant
|
if (preg_match("/^.:$/",$ccdir,$regs)) continue; // Si chemin Windows incomplet, on poursuit par rep suivant
|
||||||
|
|
||||||
// Attention, le is_dir() peut echouer bien que le rep existe.
|
// Attention, le is_dir() peut echouer bien que le rep existe.
|
||||||
|
|||||||
@ -20,13 +20,11 @@
|
|||||||
* \file htdocs/ecm/class/ecmdirectory.class.php
|
* \file htdocs/ecm/class/ecmdirectory.class.php
|
||||||
* \ingroup ecm
|
* \ingroup ecm
|
||||||
* \brief This file is an example for a class file
|
* \brief This file is an example for a class file
|
||||||
* \author Laurent Destailleur
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class EcmDirectory
|
* \class EcmDirectory
|
||||||
* \brief Class to manage ECM directories
|
* \brief Class to manage ECM directories
|
||||||
* \remarks Initialy built by build_class_from_table on 2008-02-24 19:24
|
|
||||||
*/
|
*/
|
||||||
class EcmDirectory // extends CommonObject
|
class EcmDirectory // extends CommonObject
|
||||||
{
|
{
|
||||||
|
|||||||
@ -124,7 +124,7 @@ if ($action == 'add' && $user->rights->ecm->setup)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Suppression fichier
|
// Suppression fichier
|
||||||
if ($action == 'confirm_deletesection' && $confirm == 'yes')
|
else if ($action == 'confirm_deletesection' && $confirm == 'yes')
|
||||||
{
|
{
|
||||||
$result=$ecmdir->delete($user);
|
$result=$ecmdir->delete($user);
|
||||||
setEventMessage($langs->trans("ECMSectionWasRemoved", $ecmdir->label));
|
setEventMessage($langs->trans("ECMSectionWasRemoved", $ecmdir->label));
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;
|
-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;
|
||||||
-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60);
|
-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60);
|
||||||
-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname;
|
-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname;
|
||||||
-- To change type of field: ALTER TABLE llx_table MODIFY name varchar(60);
|
-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60);
|
||||||
-- To restrict request to Mysql version x.y use -- VMYSQLx.y
|
-- To restrict request to Mysql version x.y use -- VMYSQLx.y
|
||||||
-- To restrict request to Pgsql version x.y use -- VPGSQLx.y
|
-- To restrict request to Pgsql version x.y use -- VPGSQLx.y
|
||||||
|
|
||||||
@ -43,8 +43,8 @@ ALTER TABLE llx_mailing MODIFY COLUMN body mediumtext;
|
|||||||
ALTER TABLE llx_mailing ADD COLUMN extraparams varchar(255);
|
ALTER TABLE llx_mailing ADD COLUMN extraparams varchar(255);
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE llx_product MODIFY ref varchar(128) NOT NULL;
|
ALTER TABLE llx_product MODIFY COLUMN ref varchar(128) NOT NULL;
|
||||||
ALTER TABLE llx_product MODIFY ref_ext varchar(128);
|
ALTER TABLE llx_product MODIFY COLUMN ref_ext varchar(128);
|
||||||
|
|
||||||
ALTER TABLE llx_product_fournisseur_price DROP COLUMN fk_product_fournisseur;
|
ALTER TABLE llx_product_fournisseur_price DROP COLUMN fk_product_fournisseur;
|
||||||
ALTER TABLE llx_product_fournisseur_price ADD charges DOUBLE( 24, 8 ) DEFAULT 0 AFTER unitprice;
|
ALTER TABLE llx_product_fournisseur_price ADD charges DOUBLE( 24, 8 ) DEFAULT 0 AFTER unitprice;
|
||||||
@ -64,9 +64,9 @@ alter table llx_propaldet drop column pa_ht;
|
|||||||
alter table llx_propaldet drop column marge_tx;
|
alter table llx_propaldet drop column marge_tx;
|
||||||
alter table llx_propaldet drop column marque_tx;
|
alter table llx_propaldet drop column marque_tx;
|
||||||
|
|
||||||
ALTER TABLE llx_commande CHANGE fk_demand_reason fk_input_reason INT(11) NULL DEFAULT NULL;
|
ALTER TABLE llx_commande CHANGE COLUMN fk_demand_reason fk_input_reason INT(11) NULL DEFAULT NULL;
|
||||||
ALTER TABLE llx_propal CHANGE fk_demand_reason fk_input_reason INT(11) NULL DEFAULT NULL;
|
ALTER TABLE llx_propal CHANGE COLUMN fk_demand_reason fk_input_reason INT(11) NULL DEFAULT NULL;
|
||||||
ALTER TABLE llx_commande_fournisseur CHANGE fk_methode_commande fk_input_method INT(11) NULL DEFAULT 0;
|
ALTER TABLE llx_commande_fournisseur CHANGE COLUMN fk_methode_commande fk_input_method INT(11) NULL DEFAULT 0;
|
||||||
|
|
||||||
INSERT INTO llx_const (name, value, type, note, visible) values ('PRODUCT_CODEPRODUCT_ADDON','mod_codeproduct_leopard','yesno','Module to control product codes',0);
|
INSERT INTO llx_const (name, value, type, note, visible) values ('PRODUCT_CODEPRODUCT_ADDON','mod_codeproduct_leopard','yesno','Module to control product codes',0);
|
||||||
|
|
||||||
@ -85,3 +85,41 @@ ALTER TABLE llx_accountingaccount ADD COLUMN active tinyint DEFAULT 1 NOT NULL
|
|||||||
|
|
||||||
ALTER TABLE llx_actioncomm MODIFY elementtype VARCHAR(32);
|
ALTER TABLE llx_actioncomm MODIFY elementtype VARCHAR(32);
|
||||||
|
|
||||||
|
-- TASK #107
|
||||||
|
ALTER TABLE llx_ecm_directories MODIFY COLUMN label varchar(64) NOT NULL;
|
||||||
|
ALTER TABLE llx_ecm_directories ADD COLUMN acl text;
|
||||||
|
ALTER TABLE llx_ecm_directories ADD INDEX idx_ecm_directories_fk_user_c (fk_user_c);
|
||||||
|
ALTER TABLE llx_ecm_directories ADD INDEX idx_ecm_directories_fk_user_m (fk_user_m);
|
||||||
|
ALTER TABLE llx_ecm_directories ADD CONSTRAINT fk_ecm_directories_fk_user_c FOREIGN KEY (fk_user_c) REFERENCES llx_user (rowid);
|
||||||
|
ALTER TABLE llx_ecm_directories ADD CONSTRAINT fk_ecm_directories_fk_user_m FOREIGN KEY (fk_user_m) REFERENCES llx_user (rowid);
|
||||||
|
|
||||||
|
ALTER TABLE llx_ecm_documents DROP INDEX idx_ecm_documents;
|
||||||
|
ALTER TABLE llx_ecm_documents DROP COLUMN manualkeyword;
|
||||||
|
ALTER TABLE llx_ecm_documents DROP COLUMN fullpath_orig;
|
||||||
|
ALTER TABLE llx_ecm_documents DROP COLUMN private;
|
||||||
|
ALTER TABLE llx_ecm_documents DROP COLUMN crc;
|
||||||
|
ALTER TABLE llx_ecm_documents DROP COLUMN cryptkey;
|
||||||
|
ALTER TABLE llx_ecm_documents DROP COLUMN cipher;
|
||||||
|
ALTER TABLE llx_ecm_documents CHANGE COLUMN fullpath_dol fullpath varchar(255) NOT NULL;
|
||||||
|
ALTER TABLE llx_ecm_documents MODIFY COLUMN filemime varchar(128) NOT NULL;
|
||||||
|
ALTER TABLE llx_ecm_documents ADD COLUMN metadata text after description;
|
||||||
|
ALTER TABLE llx_ecm_documents ADD UNIQUE INDEX idx_ecm_documents_ref (ref, fk_directory, entity);
|
||||||
|
ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_create (fk_create);
|
||||||
|
ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_update (fk_update);
|
||||||
|
ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_directory FOREIGN KEY (fk_directory) REFERENCES llx_ecm_directories (rowid);
|
||||||
|
ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_create FOREIGN KEY (fk_create) REFERENCES llx_user (rowid);
|
||||||
|
ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_update FOREIGN KEY (fk_update) REFERENCES llx_user (rowid);
|
||||||
|
|
||||||
|
create table llx_element_tag
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
|
lang varchar(5) NOT NULL,
|
||||||
|
tag varchar(255) NOT NULL,
|
||||||
|
fk_element integer NOT NULL,
|
||||||
|
element varchar(64) NOT NULL
|
||||||
|
|
||||||
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
ALTER TABLE llx_element_tag ADD UNIQUE INDEX uk_element_tag (entity, lang, tag, fk_element, element);
|
||||||
|
-- END TASK #107
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
-- 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
|
||||||
@ -18,4 +19,8 @@
|
|||||||
|
|
||||||
|
|
||||||
ALTER TABLE llx_ecm_directories ADD UNIQUE INDEX idx_ecm_directories (label, fk_parent, entity);
|
ALTER TABLE llx_ecm_directories ADD UNIQUE INDEX idx_ecm_directories (label, fk_parent, entity);
|
||||||
|
ALTER TABLE llx_ecm_directories ADD INDEX idx_ecm_directories_fk_user_c (fk_user_c);
|
||||||
|
ALTER TABLE llx_ecm_directories ADD INDEX idx_ecm_directories_fk_user_m (fk_user_m);
|
||||||
|
|
||||||
|
ALTER TABLE llx_ecm_directories ADD CONSTRAINT fk_ecm_directories_fk_user_c FOREIGN KEY (fk_user_c) REFERENCES llx_user (rowid);
|
||||||
|
ALTER TABLE llx_ecm_directories ADD CONSTRAINT fk_ecm_directories_fk_user_m FOREIGN KEY (fk_user_m) REFERENCES llx_user (rowid);
|
||||||
@ -1,6 +1,6 @@
|
|||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
-- Copyright (C) 2009-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
|
||||||
@ -21,14 +21,16 @@
|
|||||||
|
|
||||||
create table llx_ecm_directories
|
create table llx_ecm_directories
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
label varchar(32) NOT NULL,
|
label varchar(64) NOT NULL,
|
||||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
fk_parent integer,
|
fk_parent integer,
|
||||||
description varchar(255) NOT NULL,
|
description varchar(255) NOT NULL,
|
||||||
cachenbofdoc integer NOT NULL DEFAULT 0,
|
cachenbofdoc integer NOT NULL DEFAULT 0,
|
||||||
date_c datetime,
|
date_c datetime,
|
||||||
date_m timestamp,
|
date_m timestamp,
|
||||||
fk_user_c integer,
|
fk_user_c integer,
|
||||||
fk_user_m integer
|
fk_user_m integer,
|
||||||
|
acl text
|
||||||
|
|
||||||
) ENGINE=innodb;
|
) ENGINE=innodb;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
-- 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
|
||||||
@ -17,5 +18,11 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE llx_ecm_documents ADD UNIQUE INDEX idx_ecm_documents (fullpath_dol);
|
ALTER TABLE llx_ecm_documents ADD UNIQUE INDEX idx_ecm_documents_ref (ref, fk_directory, entity);
|
||||||
|
ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_create (fk_create);
|
||||||
|
ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_update (fk_update);
|
||||||
|
|
||||||
|
ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_directory FOREIGN KEY (fk_directory) REFERENCES llx_ecm_directories (rowid);
|
||||||
|
ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_create FOREIGN KEY (fk_create) REFERENCES llx_user (rowid);
|
||||||
|
ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_update FOREIGN KEY (fk_update) REFERENCES llx_user (rowid);
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
-- Copyright (C) 2009-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
|
||||||
@ -20,24 +20,20 @@
|
|||||||
|
|
||||||
create table llx_ecm_documents
|
create table llx_ecm_documents
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
ref varchar(16) NOT NULL,
|
ref varchar(16) NOT NULL,
|
||||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
entity integer DEFAULT 1 NOT NULL,
|
||||||
filename varchar(255) NOT NULL,
|
filename varchar(255) NOT NULL,
|
||||||
filesize integer NOT NULL,
|
filesize integer NOT NULL,
|
||||||
filemime varchar(32) NOT NULL,
|
filemime varchar(128) NOT NULL,
|
||||||
fullpath_dol varchar(255) NOT NULL,
|
description text,
|
||||||
fullpath_orig varchar(255) NOT NULL,
|
metadata text,
|
||||||
description text,
|
fullpath varchar(255) NOT NULL,
|
||||||
manualkeyword text,
|
fk_directory integer,
|
||||||
fk_create integer NOT NULL,
|
fk_create integer NOT NULL,
|
||||||
fk_update integer,
|
fk_update integer,
|
||||||
date_c datetime NOT NULL,
|
date_c datetime NOT NULL,
|
||||||
date_u timestamp,
|
date_u timestamp,
|
||||||
fk_directory integer,
|
fk_status smallint DEFAULT 0
|
||||||
fk_status smallint DEFAULT 0,
|
|
||||||
private smallint DEFAULT 0,
|
|
||||||
crc varchar(32) NOT NULL DEFAULT '', -- checksum
|
|
||||||
cryptkey varchar(50) NOT NULL DEFAULT '', -- crypt key
|
|
||||||
cipher varchar(50) NOT NULL DEFAULT 'twofish' -- crypt cipher
|
|
||||||
) ENGINE=innodb;
|
) ENGINE=innodb;
|
||||||
|
|||||||
20
htdocs/install/mysql/tables/llx_element_tag.key.sql
Normal file
20
htdocs/install/mysql/tables/llx_element_tag.key.sql
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2012 Regis Houssin <regis@dolibarr.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
|
||||||
|
-- the Free Software Foundation; either version 2 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
--
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_element_tag ADD UNIQUE INDEX uk_element_tag (entity, lang, tag, fk_element, element);
|
||||||
29
htdocs/install/mysql/tables/llx_element_tag.sql
Normal file
29
htdocs/install/mysql/tables/llx_element_tag.sql
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2012 Regis Houssin <regis@dolibarr.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
|
||||||
|
-- the Free Software Foundation; either version 2 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
--
|
||||||
|
-- ===========================================================================
|
||||||
|
|
||||||
|
create table llx_element_tag
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
|
lang varchar(5) NOT NULL,
|
||||||
|
tag varchar(255) NOT NULL,
|
||||||
|
fk_element integer NOT NULL,
|
||||||
|
element varchar(64) NOT NULL
|
||||||
|
|
||||||
|
)ENGINE=innodb;
|
||||||
|
|
||||||
@ -383,4 +383,4 @@ if ($db->connected) $db->close();
|
|||||||
|
|
||||||
// Return code if ran from command line
|
// Return code if ran from command line
|
||||||
if ($ret) exit($ret);
|
if ($ret) exit($ret);
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user