mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 05:53:13 +00:00
Merge with master
This commit is contained in:
@@ -569,7 +569,7 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper
|
|||||||
|
|
||||||
$parm = $request->get_parms_from_serialized_datas($infos, 'user_infos');
|
$parm = $request->get_parms_from_serialized_datas($infos, 'user_infos');
|
||||||
|
|
||||||
if (!\mail::validateEmail($parm['email']))
|
if ($parm['email'] && !\mail::validateEmail($parm['email']))
|
||||||
throw new \Exception_InvalidArgument(_('Email addess is not valid'));
|
throw new \Exception_InvalidArgument(_('Email addess is not valid'));
|
||||||
|
|
||||||
$user->set_firstname($parm['first_name'])
|
$user->set_firstname($parm['first_name'])
|
||||||
@@ -589,7 +589,7 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper
|
|||||||
|
|
||||||
public function apply_template()
|
public function apply_template()
|
||||||
{
|
{
|
||||||
$appbox = appbox::get_instance();
|
$appbox = \appbox::get_instance();
|
||||||
$session = $appbox->get_session();
|
$session = $appbox->get_session();
|
||||||
|
|
||||||
$template = \User_adapter::getInstance($this->request->get('template'), $appbox);
|
$template = \User_adapter::getInstance($this->request->get('template'), $appbox);
|
||||||
|
@@ -1145,6 +1145,9 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
$appbox = \appbox::get_instance();
|
||||||
|
$session = $appbox->get_session();
|
||||||
|
|
||||||
$connbas = connection::getPDOConnection($this->get_sbas_id());
|
$connbas = connection::getPDOConnection($this->get_sbas_id());
|
||||||
|
|
||||||
$sql = 'DELETE FROM subdef WHERE record_id= :record_id AND name=:name';
|
$sql = 'DELETE FROM subdef WHERE record_id= :record_id AND name=:name';
|
||||||
@@ -1165,7 +1168,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
|||||||
(:record_id, :name, :baseurl, :filename,
|
(:record_id, :name, :baseurl, :filename,
|
||||||
:width, :height, :mime, :path, :filesize, "1")';
|
:width, :height, :mime, :path, :filesize, "1")';
|
||||||
|
|
||||||
echo "substitute subdef $name with $base_url ".$system_file->getPath()." ".$system_file->getFilename()."<br>";
|
|
||||||
$stmt = $connbas->prepare($sql);
|
$stmt = $connbas->prepare($sql);
|
||||||
|
|
||||||
$stmt->execute(array(
|
$stmt->execute(array(
|
||||||
@@ -1183,11 +1185,10 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
|||||||
$sql = 'UPDATE record SET moddate=NOW() WHERE record_id=:record_id';
|
$sql = 'UPDATE record SET moddate=NOW() WHERE record_id=:record_id';
|
||||||
$stmt = $connbas->prepare($sql);
|
$stmt = $connbas->prepare($sql);
|
||||||
$stmt->execute(array(':record_id' => $this->get_record_id()));
|
$stmt->execute(array(':record_id' => $this->get_record_id()));
|
||||||
$stmt->execute();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
$this->delete_data_from_cache(self::CACHE_SUBDEFS);
|
$this->delete_data_from_cache(self::CACHE_SUBDEFS);
|
||||||
|
|
||||||
|
|
||||||
if ($meta_writable)
|
if ($meta_writable)
|
||||||
{
|
{
|
||||||
$this->write_metas();
|
$this->write_metas();
|
||||||
@@ -1199,15 +1200,14 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
|||||||
|
|
||||||
$type = $name == 'document' ? 'HD' : $name;
|
$type = $name == 'document' ? 'HD' : $name;
|
||||||
|
|
||||||
$session->get_logger($record->get_databox())
|
$session->get_logger($this->get_databox())
|
||||||
->log($record, Session_Logger::EVENT_SUBSTITUTE, $type, '');
|
->log($this, Session_Logger::EVENT_SUBSTITUTE, $type, '');
|
||||||
}
|
}
|
||||||
catch (Exception $e)
|
catch (Exception $e)
|
||||||
{
|
{
|
||||||
unset($e);
|
unset($e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -438,7 +438,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if main_user is not empty and main_user.is_template is empty and main_user.is_special is empty %}
|
{% if main_user is not empty and main_user.is_template is empty and main_user.is_special is empty %}
|
||||||
<div id="user_infos_tab" class="PNB" style="top:40px;">
|
<div id="user_infos_tab" class="PNB" style="top:40px;overflow:auto;">
|
||||||
<form id="user_infos_form">
|
<form id="user_infos_form">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
|
Reference in New Issue
Block a user