mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Merge branch 'regs' into 3.6
This commit is contained in:
@@ -573,11 +573,11 @@ class module_report_nav extends module_report
|
||||
*/
|
||||
public function buildTabUserWhat($bid, $rid, $tab = false)
|
||||
{
|
||||
$this->initialize();
|
||||
$sbas_id = phrasea::sbasFromBas($bid);
|
||||
$record = new record_adapter($sbas_id, $rid);
|
||||
|
||||
$this->setDisplay($tab);
|
||||
$this->initialize();
|
||||
$this->champ = array(
|
||||
'photo',
|
||||
'record_id',
|
||||
@@ -593,7 +593,7 @@ class module_report_nav extends module_report
|
||||
|
||||
|
||||
$x = $record->get_thumbnail();
|
||||
$this->result = array(
|
||||
$this->result[] = array(
|
||||
'photo' =>
|
||||
"<img style='width:" . $x->get_width() . "px;height:" . $x->get_height() . "px;'
|
||||
src='" . $x->get_url() . "'>"
|
||||
@@ -603,10 +603,10 @@ class module_report_nav extends module_report
|
||||
, 'titre' => $record->get_title()
|
||||
, 'taille' => $document->get_size()
|
||||
);
|
||||
|
||||
|
||||
$this->setDisplayNav();
|
||||
$this->setReport();
|
||||
|
||||
|
||||
return $this->report;
|
||||
}
|
||||
|
||||
|
@@ -1179,7 +1179,9 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
foreach ($mandatoryParams as $param)
|
||||
{
|
||||
if (!array_key_exists($param, $params))
|
||||
throw new Exception_InvalidArgument();
|
||||
{
|
||||
throw new Exception_InvalidArgument(sprintf('Invalid metadata, missing key %s', $param));
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_array($params['value']))
|
||||
|
@@ -274,40 +274,39 @@ class record_preview extends record_adapter
|
||||
{
|
||||
if ($this->title)
|
||||
return $this->title;
|
||||
|
||||
$this->title = collection::getLogo($this->get_base_id()) . ' ';
|
||||
|
||||
switch ($this->env)
|
||||
{
|
||||
|
||||
case "RESULT":
|
||||
$this->title .= sprintf(
|
||||
_('preview:: resultat numero %s '), '<span id="current_result_n">' . ($this->number + 1)
|
||||
. '</span>'
|
||||
. '</span> : '
|
||||
);
|
||||
|
||||
$title = parent::get_title();
|
||||
if ($search_engine instanceof searchEngine_adapter)
|
||||
{
|
||||
$this->title .= array_pop($search_engine->build_excerpt($highlight, array($title), $this));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->title .= $title;
|
||||
}
|
||||
$this->title .= parent::get_title($highlight, $search_engine);
|
||||
break;
|
||||
case "BASK":
|
||||
$this->title .= $this->name . ' - ' . parent::get_title()
|
||||
$this->title .= $this->name . ' - ' . parent::get_title($highlight, $search_engine)
|
||||
. ' (' . $this->get_number() . '/' . $this->total . ') ';
|
||||
break;
|
||||
case "REG":
|
||||
$title = parent::get_title();
|
||||
if ($this->get_number() == 0)
|
||||
$this->title .= _('preview:: regroupement ');
|
||||
{
|
||||
$this->title .= $title;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->title .= sprintf(
|
||||
_('preview:: Previsualisation numero %s '), $this->get_number() . '/' . $this->total
|
||||
_('%s %d/%d '), $title, $this->get_number() . '/' . $this->total
|
||||
);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$this->title .= parent::get_title();
|
||||
$this->title .= parent::get_title($highlight, $search_engine);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user