New: add directory for external module and other customization
This commit is contained in:
parent
ad16244f08
commit
9c20c25d11
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2010 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
|
||||
@ -51,7 +52,8 @@ $modules_files = array();
|
||||
// Load list of modules
|
||||
foreach($conf->file->dol_document_root as $searchdir)
|
||||
{
|
||||
$dirtoscan=$searchdir.'/includes/modules/';
|
||||
if (preg_match('/custom$/i',$searchdir)) $dirtoscan = $searchdir . "/modules/";
|
||||
else $dirtoscan = $searchdir . "/includes/modules/";
|
||||
$handle=opendir($dirtoscan);
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
|
||||
@ -142,7 +142,8 @@ class Conf
|
||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_TRIGGERS$/i',$key,$reg))
|
||||
{
|
||||
$modulename = strtolower($reg[1]);
|
||||
$this->triggers_modules[] = DOL_DOCUMENT_ROOT.'/'.$modulename.'/inc/triggers/';
|
||||
if ($value == 1) $this->triggers_modules[] = DOL_DOCUMENT_ROOT.'/'.$modulename.'/inc/triggers/';
|
||||
else if ($value == 2) $this->triggers_modules[] = DOL_DOCUMENT_EXTMODULE.'/'.$modulename.'/inc/triggers/';
|
||||
}
|
||||
// If this is constant for login method activated by a module
|
||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_LOGIN_METHOD$/i',$key,$reg))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user