BxFilesUploaderHTML5.php 931 B

123456789101112131415161718192021222324252627282930313233
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup Files Files
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxFilesUploaderHTML5 extends BxTemplUploaderHTML5
  12. {
  13. protected $_oModule;
  14. public function __construct ($aObject, $sStorageObject, $sUniqId, $oTemplate)
  15. {
  16. parent::__construct($aObject, $sStorageObject, $sUniqId, $oTemplate);
  17. $this->_oModule = BxDolModule::getInstance('bx_files');
  18. }
  19. protected function getGhostTemplateVars($aFile, $iProfileId, $iContentId, $oStorage, $oImagesTranscoder)
  20. {
  21. $sTitle = $this->_oModule->_oDb->getFileTitle($aFile['id']);
  22. $a = array(
  23. 'file_title' => $sTitle ? $sTitle : $aFile['file_name']
  24. );
  25. $a['file_title_attr'] = bx_html_attribute($a['file_title']);
  26. return $a;
  27. }
  28. }
  29. /** @} */