mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Subdef export does not include original file extension anymore
This commit is contained in:
@@ -826,9 +826,16 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_original_name()
|
||||
public function get_original_name($removeExtension = null)
|
||||
{
|
||||
return $this->original_name;
|
||||
if($removeExtension)
|
||||
{
|
||||
return pathinfo($this->original_name, PATHINFO_FILENAME);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->original_name;
|
||||
}
|
||||
}
|
||||
|
||||
public function set_original_name($original_name)
|
||||
@@ -891,7 +898,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_title($highlight = false, searchEngine_adapter $searchEngine = null)
|
||||
public function get_title($highlight = false, searchEngine_adapter $searchEngine = null, $removeExtension = null)
|
||||
{
|
||||
$title = '';
|
||||
$appbox = appbox::get_instance(\bootstrap::getCore());
|
||||
@@ -924,7 +931,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
|
||||
if (trim($title) === '')
|
||||
{
|
||||
$title = trim($this->get_original_name());
|
||||
$title = trim($this->get_original_name($removeExtension));
|
||||
}
|
||||
|
||||
$title = $title != "" ? $title : "<i>" . _('reponses::document sans titre') . "</i>";
|
||||
|
@@ -137,7 +137,7 @@ class set_export extends set_abstract
|
||||
new record_exportElement(
|
||||
$child_basrec->get_sbas_id(),
|
||||
$record_id,
|
||||
$record->get_title() . '_' . $n . '/',
|
||||
$record->get_title(null, null, true) . '_' . $n . '/',
|
||||
$remain_hd[$base_id]
|
||||
);
|
||||
|
||||
@@ -459,7 +459,7 @@ class set_export extends set_abstract
|
||||
|
||||
$files[$id]['original_name'] =
|
||||
$files[$id]['export_name'] =
|
||||
$download_element->get_original_name();
|
||||
$download_element->get_original_name(true);
|
||||
|
||||
$files[$id]['original_name'] =
|
||||
trim($files[$id]['original_name']) != '' ?
|
||||
@@ -472,7 +472,7 @@ class set_export extends set_abstract
|
||||
|
||||
if ($rename_title)
|
||||
{
|
||||
$title = strip_tags($download_element->get_title());
|
||||
$title = strip_tags($download_element->get_title(null, null, true));
|
||||
|
||||
$files[$id]['export_name'] = $unicode->remove_nonazAZ09($title, true);
|
||||
$rename_done = true;
|
||||
|
Reference in New Issue
Block a user