Fix: Upload photo for members
This commit is contained in:
parent
79e0c59438
commit
bf37aee95b
@ -277,6 +277,7 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->adhe
|
||||
{
|
||||
if (isset($_FILES['photo']['tmp_name']) && trim($_FILES['photo']['tmp_name']))
|
||||
{
|
||||
|
||||
// If photo is provided
|
||||
if (! is_dir($conf->adherent->dir_output))
|
||||
{
|
||||
@ -696,7 +697,7 @@ if ($action == 'edit')
|
||||
|
||||
// Photo
|
||||
print '<td align="center" valign="middle" width="25%" rowspan="'.$rowspan.'">';
|
||||
print $html->showphoto('member',$adh);
|
||||
print $html->showphoto('memberphoto',$adh);
|
||||
if ($caneditfieldmember)
|
||||
{
|
||||
print '<br><br><table class="nobordernopadding"><tr><td>'.$langs->trans("PhotoFile").'</td></tr>';
|
||||
|
||||
@ -28,37 +28,22 @@
|
||||
* document.php?modulepart=repfichierconcerne&file=pathrelatifdufichier
|
||||
*/
|
||||
|
||||
define('NOTOKENRENEWAL',1); // Disables token renewal
|
||||
|
||||
// Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||
$action = isset($_GET["action"])?$_GET["action"]:'';
|
||||
$original_file = isset($_GET["file"])?$_GET["file"]:'';
|
||||
$modulepart = isset($_GET["modulepart"])?$_GET["modulepart"]:'';
|
||||
$urlsource = isset($_GET["urlsource"])?$_GET["urlsource"]:'';
|
||||
|
||||
// Define if we need master or master+main
|
||||
$needmasteronly=false;
|
||||
if ($modulepart == 'bittorrent') $needmasteronly=true;
|
||||
//if ($modulepart == 'webcal') $needmasteronly=true;
|
||||
//if ($modulepart == 'agenda') $needmasteronly=true;
|
||||
// Pour autre que bittorrent, on charge environnement + info issus de logon comme le user
|
||||
if (($modulepart == 'bittorrent') && ! defined("NOLOGIN")) define("NOLOGIN",1);
|
||||
|
||||
// This is to make Dolibarr working with Plesk
|
||||
set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
|
||||
// Load master or main
|
||||
if ($needmasteronly)
|
||||
{
|
||||
// For some download we don't need login
|
||||
require("./master.inc.php");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
|
||||
// Pour autre que companylogo, on charge environnement + info issus de logon comme le user
|
||||
require("./main.inc.php");
|
||||
// master.inc.php is included in main.inc.php
|
||||
}
|
||||
require("./main.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
|
||||
|
||||
|
||||
|
||||
@ -34,29 +34,14 @@ $original_file = isset($_GET["file"])?$_GET["file"]:'';
|
||||
$modulepart = isset($_GET["modulepart"])?$_GET["modulepart"]:'';
|
||||
$urlsource = isset($_GET["urlsource"])?$_GET["urlsource"]:'';
|
||||
|
||||
// Define if we need master or master+main
|
||||
$needmasteronly=false;
|
||||
if ($modulepart == 'companylogo') $needmasteronly=true;
|
||||
// Pour autre que companylogo, on charge environnement + info issus de logon comme le user
|
||||
if (($modulepart == 'companylogo') && ! defined("NOLOGIN")) define("NOLOGIN",1);
|
||||
|
||||
// This is to make Dolibarr working with Plesk
|
||||
set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
|
||||
// Load master or main
|
||||
if ($needmasteronly)
|
||||
{
|
||||
// Pour companylogo, on charge juste environnement sans logon qui charge le user
|
||||
require("./master.inc.php");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
|
||||
// Pour autre que companylogo, on charge environnement + info issus de logon comme le user
|
||||
require("./main.inc.php");
|
||||
// master.inc.php is included in main.inc.php
|
||||
}
|
||||
require("./main.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user