mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
Merge branch '3.6' of github.com:alchemy-fr/Phraseanet into 3.6
This commit is contained in:
@@ -321,7 +321,7 @@ class ACL implements cache_cacheableInterface
|
||||
|
||||
$this->give_access_to_base($bas_to_acces);
|
||||
|
||||
foreach ($rights_to_give as $sbas_id => $rights)
|
||||
foreach ($rights_to_give as $base_id => $rights)
|
||||
{
|
||||
$this->update_rights_to_base($base_id, $rights);
|
||||
}
|
||||
|
@@ -110,7 +110,7 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract
|
||||
'name' => $user_from->get_display_name()
|
||||
);
|
||||
|
||||
if (self::mail($to, $from, $params['ssel_id']))
|
||||
if (self::mail($to, $from, $params['ssel_id'], $params['url']))
|
||||
$mailed = true;
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract
|
||||
* @param int $ssel_id
|
||||
* @return boolean
|
||||
*/
|
||||
function mail($to, $from, $ssel_id)
|
||||
function mail($to, $from, $ssel_id, $url)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -217,7 +217,7 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract
|
||||
$from['name']
|
||||
) . "</div>\n";
|
||||
|
||||
$body .= "<br/>\n" . $this->registry->get('GV_ServerName') . 'lightbox/validate/' . $ssel_id;
|
||||
$body .= "<br/>\n" . $url;
|
||||
|
||||
return mail::send_mail($subject, $body, $to, $from, array());
|
||||
}
|
||||
|
@@ -76,7 +76,6 @@ class gatekeeper
|
||||
$session = $appbox->get_session();
|
||||
|
||||
if (http_request::is_command_line())
|
||||
|
||||
return;
|
||||
|
||||
if (isset($_SERVER['PHP_SELF']) && trim($_SERVER['PHP_SELF']))
|
||||
@@ -105,7 +104,7 @@ class gatekeeper
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +121,6 @@ class gatekeeper
|
||||
if ($this->_PHP_SELF == '/thesaurus2/xmlhttp/getterm.x.php'
|
||||
|| $this->_PHP_SELF == '/thesaurus2/xmlhttp/searchcandidate.x.php'
|
||||
|| $this->_PHP_SELF == '/thesaurus2/xmlhttp/getsy.x.php')
|
||||
|
||||
return;
|
||||
phrasea::redirect('/login/?redirect=/thesaurus2');
|
||||
break;
|
||||
@@ -131,7 +129,6 @@ class gatekeeper
|
||||
break;
|
||||
case 'admin':
|
||||
if ($this->_script_name === 'runscheduler.php')
|
||||
|
||||
return;
|
||||
phrasea::redirect('/login/?redirect=' . $_SERVER['REQUEST_URI']);
|
||||
break;
|
||||
@@ -151,7 +148,6 @@ class gatekeeper
|
||||
return;
|
||||
case 'setup':
|
||||
if ($appbox->upgradeavailable())
|
||||
|
||||
return;
|
||||
else
|
||||
phrasea::redirect('/login/');
|
||||
@@ -161,7 +157,7 @@ class gatekeeper
|
||||
break;
|
||||
case 'lightbox':
|
||||
$this->token_access();
|
||||
if(!$session->is_authenticated())
|
||||
if (!$session->is_authenticated())
|
||||
{
|
||||
phrasea::redirect('/login/?redirect=' . $_SERVER['REQUEST_URI']);
|
||||
}
|
||||
@@ -268,13 +264,12 @@ class gatekeeper
|
||||
$parm = $request->get_parms('LOG');
|
||||
|
||||
if (is_null($parm["LOG"]))
|
||||
|
||||
return $this;
|
||||
|
||||
try
|
||||
{
|
||||
if($session->is_authenticated())
|
||||
$session->logout ();
|
||||
if ($session->is_authenticated())
|
||||
$session->logout();
|
||||
$auth = new Session_Authentication_Token($appbox, $parm['LOG']);
|
||||
$session->authenticate($auth);
|
||||
}
|
||||
@@ -286,10 +281,11 @@ class gatekeeper
|
||||
try
|
||||
{
|
||||
$datas = random::helloToken($parm['LOG']);
|
||||
return phrasea::redirect("/lightbox/validate/" . $datas['datas'] . "/");
|
||||
}
|
||||
catch (Exception_NotFound $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@@ -381,8 +381,14 @@ class record_preview extends record_adapter
|
||||
$tab[$hour][$site][$action] = array();
|
||||
|
||||
if (!isset($tab[$hour][$site][$action][$row['usr_id']]))
|
||||
{
|
||||
$tab[$hour][$site][$action][$row['usr_id']] =
|
||||
array('final' => array(), 'comment' => array());
|
||||
array(
|
||||
'final' => array()
|
||||
, 'comment' => array()
|
||||
, 'user' => \User_Adapter::getInstance($row['usr_id'], $appbox)
|
||||
);
|
||||
}
|
||||
|
||||
if (!in_array($row['final'], $tab[$hour][$site][$action][$row['usr_id']]['final']))
|
||||
$tab[$hour][$site][$action][$row['usr_id']]['final'][] =
|
||||
|
Reference in New Issue
Block a user