forked from Wavyzz/dolibarr
Fix: add index for best performance
Fix: add DOL_DOCUMENT_ROOT_ALT in inc.php for update
This commit is contained in:
@@ -198,7 +198,9 @@ class Conf
|
|||||||
// Sharings between entities
|
// Sharings between entities
|
||||||
if ($this->multicompany->enabled)
|
if ($this->multicompany->enabled)
|
||||||
{
|
{
|
||||||
dol_include_once('/multicompany/class/actions_multicompany.class.php');
|
$ret = @dol_include_once('/multicompany/class/actions_multicompany.class.php');
|
||||||
|
if ($ret)
|
||||||
|
{
|
||||||
$mc = new ActionsMulticompany($db);
|
$mc = new ActionsMulticompany($db);
|
||||||
|
|
||||||
foreach($multicompany_sharing as $key => $value)
|
foreach($multicompany_sharing as $key => $value)
|
||||||
@@ -207,6 +209,7 @@ class Conf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
//var_dump($this->modules);
|
//var_dump($this->modules);
|
||||||
|
|
||||||
|
|||||||
@@ -125,6 +125,10 @@ define('MAIN_DB_PREFIX',(isset($dolibarr_main_db_prefix)?$dolibarr_main_db_prefi
|
|||||||
|
|
||||||
define('DOL_CLASS_PATH', 'class/'); // Filsystem path to class dir
|
define('DOL_CLASS_PATH', 'class/'); // Filsystem path to class dir
|
||||||
define('DOL_DATA_ROOT',(isset($dolibarr_main_data_root)?$dolibarr_main_data_root:''));
|
define('DOL_DATA_ROOT',(isset($dolibarr_main_data_root)?$dolibarr_main_data_root:''));
|
||||||
|
if (! empty($dolibarr_main_document_root_alt))
|
||||||
|
{
|
||||||
|
define('DOL_DOCUMENT_ROOT_ALT', $dolibarr_main_document_root_alt); // Filesystem paths to alternate core php (alternate htdocs)
|
||||||
|
}
|
||||||
define('DOL_MAIN_URL_ROOT', (isset($dolibarr_main_url_root)?$dolibarr_main_url_root:'')); // URL relative root
|
define('DOL_MAIN_URL_ROOT', (isset($dolibarr_main_url_root)?$dolibarr_main_url_root:'')); // URL relative root
|
||||||
$uri=preg_replace('/^http(s?):\/\//i','',constant('DOL_MAIN_URL_ROOT')); // $uri contains url without http*
|
$uri=preg_replace('/^http(s?):\/\//i','',constant('DOL_MAIN_URL_ROOT')); // $uri contains url without http*
|
||||||
$suburi = strstr ($uri, '/'); // $suburi contains url without domain
|
$suburi = strstr ($uri, '/'); // $suburi contains url without domain
|
||||||
|
|||||||
@@ -85,6 +85,10 @@ INSERT INTO llx_c_source (rowid,code,label,active) VALUES (7, 'SRC_06', 'Magasin
|
|||||||
|
|
||||||
ALTER TABLE llx_actioncomm ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER id;
|
ALTER TABLE llx_actioncomm ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER id;
|
||||||
|
|
||||||
|
ALTER TABLE llx_propaldet ADD INDEX idx_propaldet_fk_product (fk_product);
|
||||||
|
ALTER TABLE llx_commandedet ADD INDEX idx_commandedet_fk_product (fk_product);
|
||||||
|
ALTER TABLE llx_facturedet ADD INDEX idx_facturedet_fk_product (fk_product);
|
||||||
|
|
||||||
--Add Chile data
|
--Add Chile data
|
||||||
-- Regions Chile (id pays=67)
|
-- Regions Chile (id pays=67)
|
||||||
INSERT INTO llx_c_regions (rowid, code_region, fk_pays, cheflieu, tncc, nom, active) VALUES (6701, 6701, 67, NULL, NULL, 'Tarapacá', 1);
|
INSERT INTO llx_c_regions (rowid, code_region, fk_pays, cheflieu, tncc, nom, active) VALUES (6701, 6701, 67, NULL, NULL, 'Tarapacá', 1);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
-- Copyright (C) 2011 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,4 +22,6 @@
|
|||||||
|
|
||||||
|
|
||||||
ALTER TABLE llx_commandedet ADD INDEX idx_commandedet_fk_commande (fk_commande);
|
ALTER TABLE llx_commandedet ADD INDEX idx_commandedet_fk_commande (fk_commande);
|
||||||
|
ALTER TABLE llx_commandedet ADD INDEX idx_commandedet_fk_product (fk_product);
|
||||||
|
|
||||||
ALTER TABLE llx_commandedet ADD CONSTRAINT fk_commandedet_fk_commande FOREIGN KEY (fk_commande) REFERENCES llx_commande (rowid);
|
ALTER TABLE llx_commandedet ADD CONSTRAINT fk_commandedet_fk_commande FOREIGN KEY (fk_commande) REFERENCES llx_commande (rowid);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
-- Copyright (C) 2011 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
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
-- Copyright (C) 2011 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
|
||||||
@@ -23,5 +24,6 @@
|
|||||||
-- V4 DELETE llx_facturedet FROM llx_facturedet LEFT JOIN llx_facture ON llx_facturedet.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL;
|
-- V4 DELETE llx_facturedet FROM llx_facturedet LEFT JOIN llx_facture ON llx_facturedet.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL;
|
||||||
|
|
||||||
ALTER TABLE llx_facturedet ADD INDEX idx_facturedet_fk_facture (fk_facture);
|
ALTER TABLE llx_facturedet ADD INDEX idx_facturedet_fk_facture (fk_facture);
|
||||||
|
ALTER TABLE llx_facturedet ADD INDEX idx_facturedet_fk_product (fk_product);
|
||||||
ALTER TABLE llx_facturedet ADD UNIQUE INDEX uk_fk_remise_except (fk_remise_except, fk_facture);
|
ALTER TABLE llx_facturedet ADD UNIQUE INDEX uk_fk_remise_except (fk_remise_except, fk_facture);
|
||||||
ALTER TABLE llx_facturedet ADD CONSTRAINT fk_facturedet_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid);
|
ALTER TABLE llx_facturedet ADD CONSTRAINT fk_facturedet_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
-- Copyright (C) 2009-2011 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,4 +21,6 @@
|
|||||||
|
|
||||||
|
|
||||||
ALTER TABLE llx_propaldet ADD INDEX idx_propaldet_fk_propal (fk_propal);
|
ALTER TABLE llx_propaldet ADD INDEX idx_propaldet_fk_propal (fk_propal);
|
||||||
|
ALTER TABLE llx_propaldet ADD INDEX idx_propaldet_fk_product (fk_product);
|
||||||
|
|
||||||
ALTER TABLE llx_propaldet ADD CONSTRAINT fk_propaldet_fk_propal FOREIGN KEY (fk_propal) REFERENCES llx_propal (rowid);
|
ALTER TABLE llx_propaldet ADD CONSTRAINT fk_propaldet_fk_propal FOREIGN KEY (fk_propal) REFERENCES llx_propal (rowid);
|
||||||
|
|||||||
@@ -34,7 +34,6 @@
|
|||||||
|
|
||||||
// For compatibility during upgrade
|
// For compatibility during upgrade
|
||||||
if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '..');
|
if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '..');
|
||||||
if (! defined('DOL_DOCUMENT_ROOT_ALT')) define('DOL_DOCUMENT_ROOT_ALT', ''); // If option not enabled, we keep it disabled but avoid warning
|
|
||||||
if (! defined('ADODB_DATE_VERSION')) include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
|
if (! defined('ADODB_DATE_VERSION')) include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user