Skip to content

Commit

Permalink
Merge branch 'bug-1371' of github.com:marcosgdf/dolibarr into
Browse files Browse the repository at this point in the history
marcosgdf-bug-1371

Conflicts:
	ChangeLog
  • Loading branch information
eldy committed May 4, 2014
2 parents e8308e7 + 08301e3 commit c9ebe77
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -12,6 +12,7 @@ Fix: Can disable features with CKEDITOR.
Fix: Pb of records not correctly cleaned when module marge is
uninstalled (conflict between 'margin' and 'margins').
Fix: [ bug #1341 ] Lastname not added by file or direct input in mass e-mailing
Fix: [ bug #1357 ] Invoice creator state not printed in generated invoice documents

***** ChangeLog for 3.5.2 compared to 3.5.1 *****
Fix: Can't add user for a task.
Expand Down
17 changes: 14 additions & 3 deletions htdocs/societe/class/societe.class.php
Expand Up @@ -10,6 +10,7 @@
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
*
* 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
Expand Down Expand Up @@ -2534,7 +2535,17 @@ function setMysoc($conf)
$this->address=empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS;
$this->zip=empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP;
$this->town=empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN;
$this->state_id=empty($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT)?'':$conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT;
$this->state_id=empty($conf->global->MAIN_INFO_SOCIETE_STATE)?'':$conf->global->MAIN_INFO_SOCIETE_STATE;

/* Disabled: we don't want any SQL request into method setMySoc. This method set object from env only.
If we need label, label must be loaded by output that need it from id (label depends on output language)
require_once DOL_DOCUMENT_ROOT .'/core/lib/company.lib.php';
if (!empty($conf->global->MAIN_INFO_SOCIETE_STATE)) {
$this->state_id= $conf->global->MAIN_INFO_SOCIETE_STATE;
$this->state = getState($this->state_id);
}
*/

$this->note_private=empty($conf->global->MAIN_INFO_SOCIETE_NOTE)?'':$conf->global->MAIN_INFO_SOCIETE_NOTE;

$this->nom=$this->name; // deprecated
Expand All @@ -2554,8 +2565,8 @@ function setMysoc($conf)
{
dol_syslog("Your country setup use an old syntax. Reedit it using setup area.", LOG_WARNING);
include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
$country_code=getCountry($country_id,2,$db); // This need a SQL request, but it's the old feature
$country_label=getCountry($country_id,0,$db); // This need a SQL request, but it's the old feature
$country_code=getCountry($country_id,2,$db); // This need a SQL request, but it's the old feature that should not be used anymore
$country_label=getCountry($country_id,0,$db); // This need a SQL request, but it's the old feature that should not be used anymore
}
}
$this->country_id=$country_id;
Expand Down

0 comments on commit c9ebe77

Please sign in to comment.