diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index db9725ce9f6..f8a31b239bb 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -617,25 +617,13 @@ if ($id) $reshook=$hookmanager->executeHooks('createDictionaryFieldlist',$parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks $error=$hookmanager->error; $errors=$hookmanager->errors; - if ($id == 3) unset($fieldlist[2]); - if (empty($reshook)) { - if ($tabname[$id] == MAIN_DB_PREFIX.'c_email_templates' && $action == 'edit') - { - fieldListAccountModel($fieldlist,$obj,$tabname[$id],'hide'); - } - else - { - fieldListAccountModel($fieldlist,$obj,$tabname[$id],'add'); - } + fieldListAccountModel($fieldlist,$obj,$tabname[$id],'add'); } print ''; - if ($tabname[$id] != MAIN_DB_PREFIX.'c_email_templates' || $action != 'edit') - { - print ''; - } + print ''; print ''; print ""; @@ -1134,16 +1122,11 @@ function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='') } elseif (in_array($fieldlist[$field], array('content'))) { - if ($tabname == MAIN_DB_PREFIX.'c_email_templates') - { - print ''; // To create an artificial CR for the current tr we are on - } - else print ''; + print ''; if ($context != 'hide') { //print ''; $okforextended=true; - if ($tabname == MAIN_DB_PREFIX.'c_email_templates' && empty($conf->global->FCKEDITOR_ENABLE_MAIL)) $okforextended=false; $doleditor = new DolEditor($fieldlist[$field], (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_5, '90%'); print $doleditor->Create(1); } diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index d282acd3447..4e731021199 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -169,10 +169,6 @@ if ($conf->adherent->enabled) $elementList['member']=$langs->trans('Mai if ($conf->contrat->enabled) $elementList['contract']=$langs->trans('MailToSendContract'); if ($conf->projet->enabled) $elementList['project']=$langs->trans('MailToProject'); $elementList['user']=$langs->trans('MailToUser'); -sort($elementList); -// Add all and none after the sort -$elementList['all'] ='-- '.$langs->trans("All").' -- ('.$langs->trans('VisibleEverywhere').')'; -$elementList['none']='-- '.$langs->trans("None").' -- ('.$langs->trans('VisibleNowhere').')'; $parameters=array('elementList'=>$elementList); $reshook=$hookmanager->executeHooks('emailElementlist',$parameters); // Note that $action and $object may have been modified by some hooks @@ -182,6 +178,12 @@ if ($reshook == 0) { } } +// Add all and none after the sort +$elementList['all'] ='-- '.$langs->trans("All").' -- ('.$langs->trans('VisibleEverywhere').')'; +$elementList['none']='-- '.$langs->trans("None").' -- ('.$langs->trans('VisibleNowhere').')'; + +asort($elementList); + $id = 25; @@ -211,7 +213,7 @@ if (empty($reshook)) } // Actions add or modify an entry into a dictionary - if (GETPOST('actionadd') || GETPOST('actionmodify')) + if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha')) { $listfield=explode(',', str_replace(' ', '',$tabfield[$id])); $listfieldinsert=explode(',',$tabfieldinsert[$id]); @@ -227,7 +229,7 @@ if (empty($reshook)) if ($value == 'content') continue; if ($value == 'content_lines') continue; - if (GETPOST('actionmodify') && $value == 'topic') $_POST['topic']=$_POST['topic-'.$rowid]; + if (GETPOST('actionmodify','alpha') && $value == 'topic') $_POST['topic']=$_POST['topic-'.$rowid]; if ((! isset($_POST[$value]) || $_POST[$value]=='' || $_POST[$value]=='-1') && $value != 'lang' && $value != 'fk_user' && $value != 'position') { @@ -269,8 +271,8 @@ if (empty($reshook)) if ($value == 'fk_user' && ! ($_POST[$keycode] > 0)) $_POST[$keycode]=''; if ($value == 'private' && ! is_numeric($_POST[$keycode])) $_POST[$keycode]='0'; if ($value == 'position' && ! is_numeric($_POST[$keycode])) $_POST[$keycode]='1'; - if ($_POST[$keycode] == '' && $keycode != 'langcode') $sql.="null"; // lang must be '' if not defined so the unique key that include lang will work - elseif ($_POST[$keycode] == '0' && $keycode == 'langcode') $sql.="null"; + if ($_POST[$keycode] == '' && $keycode != 'langcode') $sql.="null"; // lang must be '' if not defined so the unique key that include lang will work + elseif ($_POST[$keycode] == '0' && $keycode == 'langcode') $sql.="''"; // lang must be '' if not defined so the unique key that include lang will work else $sql.="'".$db->escape($_POST[$keycode])."'"; $i++; } @@ -316,12 +318,16 @@ if (empty($reshook)) if ($field == 'entity') $_POST[$keycode] = $conf->entity; if ($i) $sql.=","; $sql.= $field."="; - if ($_POST[$keycode] == '' || ($keycode == 'langcode' && empty($_POST[$keycode]))) $sql.="null"; // For vat, we want/accept code = '' + +// print $keycode.' - '.$_POST[$keycode].'
'; + if ($_POST[$keycode] == '' || ($keycode != 'langcode' && $keycode != 'private' && empty($_POST[$keycode]))) $sql.="null"; // lang must be '' if not defined so the unique key that include lang will work + elseif ($_POST[$keycode] == '0' && $keycode == 'langcode') $sql.="''"; // lang must be '' if not defined so the unique key that include lang will work + elseif ($keycode == 'private') $sql.=((int) $_POST[$keycode]); // private must be 0 or 1 else $sql.="'".$db->escape($_POST[$keycode])."'"; $i++; } $sql.= " WHERE ".$rowidcol." = '".$rowid."'"; - +//print $sql;exit; dol_syslog("actionmodify", LOG_DEBUG); //print $sql; $resql = $db->query($sql); diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 9627164f534..38cd2d12c1b 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -127,7 +127,7 @@ if ($action == 'activate_encryptdbpassconf') if ($result > 0) { sleep(3); // Don't know why but we need to wait file is completely saved before making the reload. Even with flush and clearstatcache, we need to wait. - + // database value not required //dolibarr_set_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED", "1"); header("Location: security.php"); @@ -135,7 +135,7 @@ if ($action == 'activate_encryptdbpassconf') } else { - setEventMessages($langs->trans('InstrucToEncodePass',dol_encode($dolibarr_main_db_pass)), null, 'warnings'); + setEventMessages($langs->trans('InstrucToEncodePass',dol_encode($dolibarr_main_db_pass)), null, 'warnings'); } } else if ($action == 'disable_encryptdbpassconf') @@ -144,7 +144,7 @@ else if ($action == 'disable_encryptdbpassconf') if ($result > 0) { sleep(3); // Don't know why but we need to wait file is completely saved before making the reload. Even with flush and clearstatcache, we need to wait. - + // database value not required //dolibarr_del_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED",$conf->entity); header("Location: security.php"); @@ -233,6 +233,7 @@ if (is_resource($handle)) } closedir($handle); } +asort($arrayhandler); print ''; print ''; @@ -299,42 +300,42 @@ if ($conf->global->USER_PASSWORD_GENERATED == "Perso"){ print ''; print ''; - + print ''; print '"; print ''; print ''; - + print ''; print '"; print ''; print ''; - + print ''; print '"; print ''; print ''; - + print ''; print '"; print ''; print ''; - + print ''; print '"; print ''; print ''; - + print ''; print '"; print ''; print ''; - + print '
'.$langs->trans("PasswordPatternDesc").'
' . $langs->trans("MinLength")."
' . $langs->trans("NbMajMin")."
' . $langs->trans("NbNumMin")."
' . $langs->trans("NbSpeMin")."
' . $langs->trans("NbIteConsecutive")."
' . $langs->trans("NoAmbiCaracAutoGeneration")." '.($tabConf[5] ? $langs->trans("Activated") : $langs->trans("Disabled")).'
'; print '
'; diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index a96f62e8cbc..c123356f9ab 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -124,6 +124,9 @@ class Menubase else dol_print_error($this->db); } + // TODO + // Check that entry does not exists yet on key menu_handler-fk_menu-position-url-entity, to avoid errors with postgresql + // Insert request $sql = "INSERT INTO ".MAIN_DB_PREFIX."menu("; $sql.= "menu_handler,"; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 2094cd10c5c..2e345a48276 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6181,7 +6181,7 @@ function complete_substitutions_array(&$substitutionarray, $outputlangs, $object { $module=$reg[1]; - dol_syslog("Library functions_".$substitfile['name']." found into ".$dir); + dol_syslog("Library ".$substitfile['name']." found into ".$dir); // Include the user's functions file require_once $dir.$substitfile['name']; // Call the user's function, and only if it is defined diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index d7de2ea9a92..c275dd6cda3 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -105,7 +105,7 @@ function dol_decode($chain, $key='1') * If constant MAIN_SECURITY_SALT is defined, we use it as a salt (used only if hashing algorightm is something else than 'password_hash'). * * @param string $chain String to hash - * @param string $type Type of hash ('0':auto will use MAIN_SECURITY_HASH_ALGO then md5, '1':sha1, '2':sha1+md5, '3':md5, '4':md5 for OpenLdap, '5':sha256). Use '3' here, if hash is not needed for security purpose, for security need, prefer '0'. + * @param string $type Type of hash ('0':auto will use MAIN_SECURITY_HASH_ALGO else md5, '1':sha1, '2':sha1+md5, '3':md5, '4':md5 for OpenLdap, '5':sha256). Use '3' here, if hash is not needed for security purpose, for security need, prefer '0'. * @return string Hash of string * @getRandomPassword */ @@ -447,7 +447,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh if ($feature == 'project') $feature='projet'; if ($feature == 'task') $feature='projet_task'; - $check = array('adherent','banque','don','user','usergroup','produit','service','produit|service','categorie','resource'); // Test on entity only (Objects with no link to company) + $check = array('adherent','banque','don','user','usergroup','product','produit','service','produit|service','categorie','resource'); // Test on entity only (Objects with no link to company) $checksoc = array('societe'); // Test for societe object $checkother = array('contact','agenda'); // Test on entity and link to third party. Allowed if link is empty (Ex: contacts...). $checkproject = array('projet','project'); // Test for project object diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 7fb9f76119b..a5211b11b5e 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -158,14 +158,7 @@ class DolibarrModules // Can not be abstract, because we need to insta * // Set this to relative path of js file if module must load a js on all pages * 'js' => '/mymodule/js/mymodule.js', * // Set here all hooks context managed by module - * 'hooks' => array('hookcontext1','hookcontext2'), - * // Set here all workflow context managed by module - * 'workflow' => array( - * 'WORKFLOW_MODULE1_YOURACTIONTYPE_MODULE2' = >array( - * 'enabled' => '! empty($conf->module1->enabled) && ! empty($conf->module2->enabled)', - * 'picto'=>'yourpicto@mymodule' - * ) - * ) + * 'hooks' => array('hookcontext1','hookcontext2') * ) */ public $module_parts = array(); @@ -960,7 +953,7 @@ class DolibarrModules // Can not be abstract, because we need to insta $sql.= " WHERE ".$this->db->decrypt('name')." = '".$this->db->escape($this->const_name)."'"; $sql.= " AND entity IN (0, ".$entity.")"; - dol_syslog(get_class($this)."::_active", LOG_DEBUG); + dol_syslog(get_class($this)."::_active delect activation constant", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) $err++; @@ -972,7 +965,7 @@ class DolibarrModules // Can not be abstract, because we need to insta $sql.= ", 0, ".$entity; $sql.= ", '".$this->db->escape($note)."')"; - dol_syslog(get_class($this)."::_active", LOG_DEBUG); + dol_syslog(get_class($this)."::_active insert activation constant", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) $err++; @@ -1140,6 +1133,8 @@ class DolibarrModules // Can not be abstract, because we need to insta if (is_array($this->boxes)) { + dol_syslog(get_class($this)."::insert_boxes", LOG_DEBUG); + $pos_name = InfoBox::getListOfPagesForBoxes(); foreach ($this->boxes as $key => $value) @@ -1157,7 +1152,6 @@ class DolibarrModules // Can not be abstract, because we need to insta $sql.= " AND entity = ".$conf->entity; if ($note) $sql.=" AND note ='".$this->db->escape($note)."'"; - dol_syslog(get_class($this)."::insert_boxes", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -1311,6 +1305,8 @@ class DolibarrModules // Can not be abstract, because we need to insta if (is_array($this->cronjobs)) { + dol_syslog(get_class($this)."::insert_cronjobs", LOG_DEBUG); + foreach ($this->cronjobs as $key => $value) { $entity = isset($this->cronjobs[$key]['entity'])?$this->cronjobs[$key]['entity']:$conf->entity; @@ -1339,7 +1335,6 @@ class DolibarrModules // Can not be abstract, because we need to insta $now=dol_now(); - dol_syslog(get_class($this)."::insert_cronjobs", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -1376,7 +1371,6 @@ class DolibarrModules // Can not be abstract, because we need to insta $sql.= "'".$this->db->escape($test)."'"; $sql.= ")"; - dol_syslog(get_class($this)."::insert_cronjobs", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) $err++; @@ -1473,6 +1467,8 @@ class DolibarrModules // Can not be abstract, because we need to insta if (! empty($this->tabs)) { + dol_syslog(get_class($this)."::insert_tabs", LOG_DEBUG); + $i=0; foreach ($this->tabs as $key => $value) { @@ -1506,7 +1502,6 @@ class DolibarrModules // Can not be abstract, because we need to insta $sql.= ", ".$entity; $sql.= ")"; - dol_syslog(get_class($this)."::insert_tabs", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -1539,6 +1534,8 @@ class DolibarrModules // Can not be abstract, because we need to insta if (empty($this->const)) return 0; + dol_syslog(get_class($this)."::insert_const", LOG_DEBUG); + foreach ($this->const as $key => $value) { $name = $this->const[$key][0]; @@ -1574,8 +1571,6 @@ class DolibarrModules // Can not be abstract, because we need to insta $sql.= ",".$entity; $sql.= ")"; - - dol_syslog(get_class($this)."::insert_const", LOG_DEBUG); if (! $this->db->query($sql) ) { $err++; @@ -1645,13 +1640,14 @@ class DolibarrModules // Can not be abstract, because we need to insta $err=0; $entity=(! empty($force_entity) ? $force_entity : $conf->entity); + dol_syslog(get_class($this)."::insert_permissions", LOG_DEBUG); + // Test if module is activated $sql_del = "SELECT ".$this->db->decrypt('value')." as value"; $sql_del.= " FROM ".MAIN_DB_PREFIX."const"; $sql_del.= " WHERE ".$this->db->decrypt('name')." = '".$this->db->escape($this->const_name)."'"; $sql_del.= " AND entity IN (0,".$entity.")"; - dol_syslog(get_class($this)."::insert_permissions", LOG_DEBUG); $resql=$this->db->query($sql_del); if ($resql) @@ -1809,6 +1805,8 @@ class DolibarrModules // Can not be abstract, because we need to insta require_once DOL_DOCUMENT_ROOT . '/core/class/menubase.class.php'; + dol_syslog(get_class($this)."::insert_menus", LOG_DEBUG); + $err=0; $this->db->begin(); @@ -2083,7 +2081,8 @@ class DolibarrModules // Can not be abstract, because we need to insta if (is_array($value)) { // Can defined other parameters - if (is_array($value['data']) && ! empty($value['data'])) + // Example when $key='hooks', then $value is an array('data'=>array('hookcontext1','hookcontext2'), 'entity'=>X) + if (isset($value['data']) && is_array($value['data'])) { $newvalue = json_encode($value['data']); if (isset($value['entity'])) $entity = $value['entity']; @@ -2093,7 +2092,7 @@ class DolibarrModules // Can not be abstract, because we need to insta $newvalue = $value['data']; if (isset($value['entity'])) $entity = $value['entity']; } - else + else // when hook is declared with syntax 'hook'=>array('hookcontext1','hookcontext2',...) { $newvalue = json_encode($value); } @@ -2116,7 +2115,8 @@ class DolibarrModules // Can not be abstract, because we need to insta $sql.= ", ".$entity; $sql.= ")"; - dol_syslog(get_class($this)."::insert_const_".$key."", LOG_DEBUG); + dol_syslog(get_class($this)."::insert_module_parts for key=".$this->const_name."_".strtoupper($key), LOG_DEBUG); + $resql=$this->db->query($sql,1); if (! $resql) { @@ -2127,7 +2127,7 @@ class DolibarrModules // Can not be abstract, because we need to insta } else { - dol_syslog(get_class($this)."::insert_const_".$key." Record already exists.", LOG_WARNING); + dol_syslog(get_class($this)."::insert_module_parts for ".$this->const_name."_".strtoupper($key)." Record already exists.", LOG_WARNING); } } } diff --git a/htdocs/core/modules/modDav.class.php b/htdocs/core/modules/modDav.class.php index ae71f02753b..77c3f8feef7 100644 --- a/htdocs/core/modules/modDav.class.php +++ b/htdocs/core/modules/modDav.class.php @@ -80,19 +80,7 @@ class modDav extends DolibarrModules // for default path (eg: /dav/core/xxxxx) (0=disable, 1=enable) // for specific path of parts (eg: /dav/core/modules/barcode) // for specific css file (eg: /dav/css/dav.css.php) - $this->module_parts = array( - 'triggers' => 0, // Set this to 1 if module has its own trigger directory (core/triggers) - 'login' => 0, // Set this to 1 if module has its own login method file (core/login) - 'substitutions' => 0, // Set this to 1 if module has its own substitution function file (core/substitutions) - 'menus' => 0, // Set this to 1 if module has its own menus handler directory (core/menus) - 'theme' => 0, // Set this to 1 if module has its own theme directory (theme) - 'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl) - 'barcode' => 0, // Set this to 1 if module has its own barcode directory (core/modules/barcode) - 'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx) - 'css' => array(), // Set this to relative path of css file if module has its own css file - 'js' => array(), // Set this to relative path of js file if module must load a js on all pages - 'hooks' => array() // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context 'all' - ); + $this->module_parts = array(); // Data directories to create when module is enabled. // Example: this->dirs = array("/dav/temp","/dav/subdir"); diff --git a/htdocs/core/modules/modMultiCurrency.class.php b/htdocs/core/modules/modMultiCurrency.class.php index 7908f203c69..7c87ef35a53 100644 --- a/htdocs/core/modules/modMultiCurrency.class.php +++ b/htdocs/core/modules/modMultiCurrency.class.php @@ -74,21 +74,6 @@ class modMultiCurrency extends DolibarrModules // for default path (eg: /multicurrency/core/xxxxx) (0=disable, 1=enable) // for specific path of parts (eg: /multicurrency/core/modules/barcode) // for specific css file (eg: /multicurrency/css/multicurrency.css.php) - //$this->module_parts = array( - // 'triggers' => 0, // Set this to 1 if module has its own trigger directory (core/triggers) - // 'login' => 0, // Set this to 1 if module has its own login method directory (core/login) - // 'substitutions' => 0, // Set this to 1 if module has its own substitution function file (core/substitutions) - // 'menus' => 0, // Set this to 1 if module has its own menus handler directory (core/menus) - // 'theme' => 0, // Set this to 1 if module has its own theme directory (theme) - // 'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl) - // 'barcode' => 0, // Set this to 1 if module has its own barcode directory (core/modules/barcode) - // 'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx) - // 'css' => array('/multicurrency/css/multicurrency.css.php'), // Set this to relative path of css file if module has its own css file - // 'js' => array('/multicurrency/js/multicurrency.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@multicurrency')) // Set here all workflow context managed by module - // ); $this->module_parts = array(); // Data directories to create when module is enabled. diff --git a/htdocs/core/modules/modResource.class.php b/htdocs/core/modules/modResource.class.php index 0cf19ec31e2..15b414947ef 100644 --- a/htdocs/core/modules/modResource.class.php +++ b/htdocs/core/modules/modResource.class.php @@ -79,26 +79,7 @@ class modResource extends DolibarrModules // for default path (eg: /resource/core/xxxxx) (0=disable, 1=enable) // for specific path of parts (eg: /resource/core/modules/barcode) // for specific css file (eg: /resource/css/resource.css.php) - $this->module_parts = array( - // Set this to 1 if module has its own trigger directory - //'triggers' => 1, - // Set this to 1 if module has its own login method directory - //'login' => 0, - // Set this to 1 if module has its own substitution function file - //'substitutions' => 0, - // Set this to 1 if module has its own menus handler directory - //'menus' => 0, - // Set this to 1 if module has its own barcode directory - //'barcode' => 0, - // Set this to 1 if module has its own models directory - //'models' => 0, - // Set this to relative path of css if module has its own css file - //'css' => '/resource/css/resource.css.php', - // Set here all hooks context managed by module - // 'hooks' => array('actioncard','actioncommdao','resource_card','element_resource') - // Set here all workflow context managed by module - //'workflow' => array('order' => array('WORKFLOW_ORDER_AUTOCREATE_INVOICE')) - ); + $this->module_parts = array(); // Data directories to create when module is enabled. // Example: this->dirs = array("/resource/temp"); diff --git a/htdocs/core/modules/modTicketsup.class.php b/htdocs/core/modules/modTicketsup.class.php index 3dcd3a3423f..594835dad4a 100644 --- a/htdocs/core/modules/modTicketsup.class.php +++ b/htdocs/core/modules/modTicketsup.class.php @@ -82,22 +82,8 @@ class modTicketsup extends DolibarrModules $this->module_parts = array( // Set this to 1 if module has its own trigger directory 'triggers' => 1, - // Set this to 1 if module has its own login method directory - //'login' => 0, - // Set this to 1 if module has its own substitution function file - //'substitutions' => 0, - // Set this to 1 if module has its own menus handler directory - //'menus' => 0, - // Set this to 1 if module has its own barcode directory - //'barcode' => 0, // Set this to 1 if module has its own models directory 'models' => 1, - // Set this to relative path of css if module has its own css file - //'css' => '', - // Set here all hooks context managed by module - 'hooks' => array('admin') - // Set here all workflow context managed by module - //'workflow' => array('order' => array('WORKFLOW_ORDER_AUTOCREATE_INVOICE')) ); // Data directories to create when module is enabled. diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 81e9d57c03b..61b31d37131 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -508,7 +508,10 @@ if ($num > 0) print ''; print ''; - if ($obj->lastresult != '') {print dol_trunc($obj->lastresult);} + if ($obj->lastresult != '') { + if (empty($obj->lastresult)) print $obj->lastresult; + else print ''.dol_trunc($obj->lastresult).''; + } print ''; print ''; diff --git a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql index 9fa2849b757..cf99009100e 100644 --- a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql +++ b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql @@ -441,7 +441,6 @@ ALTER TABLE llx_extrafields MODIFY COLUMN list VARCHAR(128); UPDATE llx_rights_def set module = 'asset' where module = 'assets'; - ALTER TABLE llx_c_accounting_category ADD COLUMN entity integer NOT NULL DEFAULT 1 AFTER rowid; -- VMYSQL4.1 DROP INDEX uk_c_accounting_category on llx_c_accounting_category -- VPGSQL8.2 DROP INDEX uk_c_accounting_category @@ -450,3 +449,5 @@ ALTER TABLE llx_c_accounting_category ADD UNIQUE INDEX uk_c_accounting_category( -- VPGSQL8.2 DROP INDEX uk_accounting_journal_code ALTER TABLE llx_accounting_journal ADD UNIQUE INDEX uk_accounting_journal_code (code,entity); +UPDATE llx_c_email_templates SET lang = '' WHERE lang IS NULL; + diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index f318d49f98d..4e2e0a61af7 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -56,7 +56,7 @@ $mesg=''; $error=0; $errors=array(); $action = (GETPOST('action','aZ09') ? GETPOST('action','aZ09') : 'view'); $cancel = GETPOST('cancel','alpha'); $backtopage = GETPOST('backtopage','alpha'); -$confirm = GETPOST('confirm'); +$confirm = GETPOST('confirm','alpha'); $socid = GETPOST('socid','int')?GETPOST('socid','int'):GETPOST('id','int'); if ($user->societe_id) $socid=$user->societe_id; @@ -1949,7 +1949,9 @@ else // Capital print ''.fieldLabel('Capital','capital').''; - print ' '.$langs->trans("Currency".$conf->currency).''; + print ' '.$langs->trans("Currency".$conf->currency).''; // Assign a Name print '';