Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
7059cdb07a
@ -7,7 +7,7 @@ English Dolibarr ChangeLog
|
||||
For users:
|
||||
- New: If field "signature" is filled into user table, text is added
|
||||
at end of predefined email texts. If option MAIL_DO_NOT_USE_SIGN is on, this
|
||||
feautre is disabled.
|
||||
feature is disabled.
|
||||
- New: Add link "Back to list" on all cards.
|
||||
- New: After first install, warning are visible onto mandatory setup not
|
||||
configured. Show also total number of activated modules.
|
||||
@ -67,6 +67,7 @@ For developers:
|
||||
action/calendar, trips and expenses, dons, vat payment, contact/society, contract, product lines,
|
||||
expedition, order supplier and order invoice (lines included), intervention card, project, tasks.
|
||||
- New: Add ChromePHP output into syslog module.
|
||||
- New: Add PRODUCT_PRICE_MODIFY trigger.
|
||||
|
||||
For translators:
|
||||
- New: Update language files (de, tr, pt, ca, es, en, fr).
|
||||
|
||||
@ -84,6 +84,7 @@ class modMyModule extends DolibarrModules
|
||||
// 'css' => array('/mymodule/css/mymodule.css.php'), // Set this to relative path of css file if module has its own css file
|
||||
// 'js' => array('/mymodule/js/mymodule.js'), // Set this to relative path of js file if module must load a js on all pages
|
||||
// 'hooks' => array('hookcontext1','hookcontext2') // Set here all hooks context managed by module
|
||||
// 'dir' => array('output' => 'othermodulename'), // To force the default directories names
|
||||
// 'workflow' => array('WORKFLOW_MODULE1_YOURACTIONTYPE_MODULE2'=>array('enabled'=>'! empty($conf->module1->enabled) && ! empty($conf->module2->enabled)', 'picto'=>'yourpicto@mymodule')) // Set here all workflow context managed by module
|
||||
// );
|
||||
$this->module_parts = array();
|
||||
|
||||
@ -52,7 +52,7 @@ class Conf
|
||||
public $smart_menu;
|
||||
|
||||
public $modules = array(); // List of activated modules
|
||||
public $modules_parts = array('css'=>array(), 'js'=>array(),'triggers'=>array(),'login'=>array(),'substitutions'=>array(),'menus'=>array(),'theme'=>array(),'tpl'=>array(),'barcode'=>array(),'models'=>array(),'hooks'=>array()); // List of modules parts
|
||||
public $modules_parts = array('css'=>array(), 'js'=>array(),'triggers'=>array(),'login'=>array(),'substitutions'=>array(),'menus'=>array(),'theme'=>array(),'tpl'=>array(),'barcode'=>array(),'models'=>array(),'hooks'=>array(),'dir'=>array()); // List of modules parts
|
||||
|
||||
// TODO Remove thoose arrays with generic module_parts
|
||||
public $tabs_modules = array();
|
||||
@ -258,6 +258,7 @@ class Conf
|
||||
// Define default dir_output and dir_temp for directories of modules
|
||||
foreach($this->modules as $module)
|
||||
{
|
||||
// For multicompany sharings
|
||||
$this->$module->multidir_output = array($this->entity => $rootfordata."/".$module);
|
||||
$this->$module->multidir_temp = array($this->entity => $rootfordata."/".$module."/temp");
|
||||
// For backward compatibility
|
||||
@ -265,6 +266,24 @@ class Conf
|
||||
$this->$module->dir_temp = $rootfordata."/".$module."/temp";
|
||||
}
|
||||
|
||||
// External modules storage
|
||||
if (! empty($this->modules_parts['dir']))
|
||||
{
|
||||
foreach($this->modules_parts['dir'] as $module => $dirs)
|
||||
{
|
||||
foreach($dirs as $type => $name)
|
||||
{
|
||||
$subdir=($type=='temp'?'/temp':'');
|
||||
// For multicompany sharings
|
||||
$varname = 'multidir_'.$type;
|
||||
$this->$module->$varname = array($this->entity => $rootfordata."/".$name.$subdir);
|
||||
// For backward compatibility
|
||||
$varname = 'dir_'.$type;
|
||||
$this->$module->$varname = $rootfordata."/".$name.$subdir;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// For mycompany storage
|
||||
$this->mycompany->dir_output=$rootfordata."/mycompany";
|
||||
$this->mycompany->dir_temp=$rootfordata."/mycompany/temp";
|
||||
|
||||
@ -285,16 +285,6 @@ if ($modulepart)
|
||||
$original_file=$conf->contrat->dir_output.'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping pour les documents generaux
|
||||
else if ($modulepart == 'ged')
|
||||
{
|
||||
if ($user->rights->document->lire)
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file= $conf->ged->dir_output.'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping pour les dons
|
||||
else if ($modulepart == 'donation')
|
||||
{
|
||||
@ -390,6 +380,12 @@ if ($modulepart)
|
||||
// Generic wrapping
|
||||
else
|
||||
{
|
||||
// For dir temp
|
||||
$dir_temp=false;
|
||||
if (preg_match('/\_temp$/i', $modulepart)) {
|
||||
$modulepart = str_replace('_temp', '', $modulepart);
|
||||
$dir_temp=true;
|
||||
}
|
||||
// Define $accessallowed
|
||||
if (($user->rights->$modulepart->lire) || ($user->rights->$modulepart->read) || ($user->rights->$modulepart->download)) $accessallowed=1; // No subpermission, we have checked on main permission
|
||||
elseif (preg_match('/^specimen/i',$original_file)) $accessallowed=1; // If link to a specimen
|
||||
@ -407,7 +403,9 @@ if ($modulepart)
|
||||
}
|
||||
|
||||
// Define $original_file
|
||||
$original_file=$conf->$modulepart->dir_output.'/'.$original_file;
|
||||
$dir = $conf->$modulepart->dir_output;
|
||||
if ($dir_temp) $dir = $conf->$modulepart->dir_temp;
|
||||
$original_file = $dir.'/'.$original_file;
|
||||
|
||||
// Define $sqlprotectagainstexternals for modules who want to protect access using a SQL query.
|
||||
$sqlProtectConstName = strtoupper($modulepart).'_SQLPROTECTAGAINSTEXTERNALS_FOR_DOCUMENTS';
|
||||
|
||||
@ -1027,6 +1027,16 @@ class Product extends CommonObject
|
||||
$this->localtax2_tx = $localtax2;
|
||||
|
||||
$this->_log_price($user,$level);
|
||||
|
||||
// Appel des triggers
|
||||
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
|
||||
$interface=new Interfaces($this->db);
|
||||
$result=$interface->run_triggers('PRODUCT_PRICE_MODIFY',$this,$user,$langs,$conf);
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++; $this->errors=$interface->errors;
|
||||
}
|
||||
// Fin appel triggers
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user