Fix: wrong image path with multicompany sharing
This commit is contained in:
parent
4cc0e889c1
commit
4683a35532
@ -279,15 +279,13 @@ if (empty($reshook))
|
||||
$action = 'edit';
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$contactid=GETPOST("contactid",'int');
|
||||
$object->fetch($contactid);
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$contactid=GETPOST("contactid",'int');
|
||||
|
||||
$object->fetch($contactid);
|
||||
|
||||
// Photo save
|
||||
$dir = $conf->societe->dir_output."/contact/".$object->id."/photos";
|
||||
// Photo save
|
||||
$dir = $conf->societe->multidir_output[$object->entity]."/contact/".$object->id."/photos";
|
||||
$file_OK = is_uploaded_file($_FILES['photo']['tmp_name']);
|
||||
if (GETPOST('deletephoto') && $object->photo)
|
||||
{
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
/* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2017 Regis Houssin <regis.houssin@capnetworks.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
|
||||
@ -69,7 +70,7 @@ if (! $sortfield) $sortfield="name";
|
||||
|
||||
if ($id > 0) $object->fetch($id);
|
||||
|
||||
$upload_dir = $conf->societe->dir_output.'/contact/'.dol_sanitizeFileName($object->ref);
|
||||
$upload_dir = $conf->societe->multidir_output[$object->entity].'/contact/'.dol_sanitizeFileName($object->ref);
|
||||
$modulepart='contact';
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user