develop

Conflicts:
	htdocs/install/mysql/migration/7.0.0-8.0.0.sql
This commit is contained in:
florian HENRY 2018-05-02 08:49:40 +02:00
commit daf829c9f7
14 changed files with 69 additions and 130 deletions

View File

@ -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 '<td colspan="3" align="right">';
if ($tabname[$id] != MAIN_DB_PREFIX.'c_email_templates' || $action != 'edit')
{
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
}
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
print '</td>';
print "</tr>";
@ -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 '<td colspan="4"></td></tr><tr class="pair nohover"><td colspan="5">'; // To create an artificial CR for the current tr we are on
}
else print '<td>';
print '<td>';
if ($context != 'hide')
{
//print '<textarea cols="3" rows="'.ROWS_2.'" class="flat" name="'.$fieldlist[$field].'">'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'</textarea>';
$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);
}

View File

@ -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].'<br>';
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);

View File

@ -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 '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
@ -299,42 +300,42 @@ if ($conf->global->USER_PASSWORD_GENERATED == "Perso"){
print '<td colspan="3"> '.$langs->trans("PasswordPatternDesc").'</td>';
print '</tr>';
print '<tr class="oddeven">';
print '<td>' . $langs->trans("MinLength")."</td>";
print '<td colspan="2"><input type="number" value="'.$tabConf[0].'" id="minlenght" min="1"></td>';
print '</tr>';
print '<tr class="oddeven">';
print '<td>' . $langs->trans("NbMajMin")."</td>";
print '<td colspan="2"><input type="number" value="'.$tabConf[1].'" id="NbMajMin" min="0"></td>';
print '</tr>';
print '<tr class="oddeven">';
print '<td>' . $langs->trans("NbNumMin")."</td>";
print '<td colspan="2"><input type="number" value="'.$tabConf[2].'" id="NbNumMin" min="0"></td>';
print '</tr>';
print '<tr class="oddeven">';
print '<td>' . $langs->trans("NbSpeMin")."</td>";
print '<td colspan="2"><input type="number" value="'.$tabConf[3].'" id="NbSpeMin" min="0"></td>';
print '</tr>';
print '<tr class="oddeven">';
print '<td>' . $langs->trans("NbIteConsecutive")."</td>";
print '<td colspan="2"><input type="number" value="'.$tabConf[4].'" id="NbIteConsecutive" min="0"></td>';
print '</tr>';
print '<tr class="oddeven">';
print '<td>' . $langs->trans("NoAmbiCaracAutoGeneration")."</td>";
print '<td colspan="2"><input type="checkbox" id="NoAmbiCaracAutoGeneration" '.($tabConf[5] ? "checked" : "").' min="0"> <span id="textcheckbox">'.($tabConf[5] ? $langs->trans("Activated") : $langs->trans("Disabled")).'</span></td>';
print '</tr>';
print '</table>';
print '<br>';

View File

@ -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,";

View File

@ -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

View File

@ -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

View File

@ -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);
}
}
}

View File

@ -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");

View File

@ -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.

View File

@ -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");

View File

@ -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.

View File

@ -508,7 +508,10 @@ if ($num > 0)
print '</td>';
print '<td class="center">';
if ($obj->lastresult != '') {print dol_trunc($obj->lastresult);}
if ($obj->lastresult != '') {
if (empty($obj->lastresult)) print $obj->lastresult;
else print '<span class="error">'.dol_trunc($obj->lastresult).'</div>';
}
print '</td>';
print '<td>';

View File

@ -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;

View File

@ -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 '<tr><td>'.fieldLabel('Capital','capital').'</td>';
print '<td colspan="3"><input type="text" name="capital" id="capital" size="10" value="'.$object->capital.'"> <font class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</font></td></tr>';
print '<td colspan="3"><input type="text" name="capital" id="capital" size="10" value="';
print dol_escape_htmltag(price($object->capital));
print '"> <font class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</font></td></tr>';
// Assign a Name
print '<tr>';