mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 19:43:16 +00:00
fix #487 noms des utilisateurs manquants dans un tableau
This commit is contained in:
@@ -558,7 +558,7 @@ class Session_Handler
|
|||||||
$browser = Browser::getInstance();
|
$browser = Browser::getInstance();
|
||||||
|
|
||||||
if($this->is_authenticated())
|
if($this->is_authenticated())
|
||||||
$user = User_Adapter::getInstance ($this->get_usr_id (), appbox::get_instance ());
|
$user = User_Adapter::getInstance ($this->get_usr_id (), appbox::get_instance (\bootstrap::getCore()));
|
||||||
|
|
||||||
return Session_Logger::create($databox, $browser, $this, $user);
|
return Session_Logger::create($databox, $browser, $this, $user);
|
||||||
}
|
}
|
||||||
|
@@ -453,7 +453,6 @@ class module_report_activity extends module_report
|
|||||||
$this->result[$i]['total'] += 1;
|
$this->result[$i]['total'] += 1;
|
||||||
|
|
||||||
$total['tot_dl'] += 1;
|
$total['tot_dl'] += 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$nb_row = $i + 1;
|
$nb_row = $i + 1;
|
||||||
@@ -638,8 +637,23 @@ class module_report_activity extends module_report
|
|||||||
foreach ($rs as $row)
|
foreach ($rs as $row)
|
||||||
{
|
{
|
||||||
$user = $row[$on];
|
$user = $row[$on];
|
||||||
if (($save_user != $user) && !is_null($user))
|
if (($save_user != $user) && !is_null($user) && !empty($user))
|
||||||
{
|
{
|
||||||
|
if ($i >= 0)
|
||||||
|
{
|
||||||
|
if (($this->result[$i]['nbprev'] + $this->result[$i]['nbdoc']) == 0 || ($this->result[$i]['poiddoc'] + $this->result[$i]['poidprev']) == 0)
|
||||||
|
{
|
||||||
|
unset($this->result[$i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($this->result[$i]['poiddoc']) && isset($this->result[$i]['poidprev']))
|
||||||
|
{
|
||||||
|
$this->result[$i]['poiddoc'] = p4string::format_octets($this->result[$i]['poiddoc']);
|
||||||
|
$this->result[$i]['poidprev'] = p4string::format_octets($this->result[$i]['poidprev']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
$this->result[$i]['nbprev'] = 0;
|
$this->result[$i]['nbprev'] = 0;
|
||||||
@@ -675,12 +689,11 @@ class module_report_activity extends module_report
|
|||||||
$total['poidprev'] += (!is_null($row['poid']) ? $row['poid'] : 0);
|
$total['poidprev'] += (!is_null($row['poid']) ? $row['poid'] : 0);
|
||||||
$this->result[$i]['usrid'] = $row['usrid'];
|
$this->result[$i]['usrid'] = $row['usrid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$save_user = $user;
|
$save_user = $user;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->result[$i]['poiddoc'] = p4string::format_octets($this->result[$i]['poiddoc']);
|
unset($this->result[$i]);
|
||||||
$this->result[$i]['poidprev'] = p4string::format_octets($this->result[$i]['poidprev']);
|
|
||||||
|
|
||||||
$nb_row = $i + 1;
|
$nb_row = $i + 1;
|
||||||
$this->total = $nb_row;
|
$this->total = $nb_row;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user