I think I found a little problem.
@ component params, we can find following :
Code: Select all
<field name="enable_multiple_upload_admin" type="list" default="0" label="COM_PHOCADOWNLOAD_FIELD_ENABLE_MU_ADMIN_LABEL" description="COM_PHOCADOWNLOAD_FIELD_ENABLE_MU_ADMIN_DESC">
<option value="1">COM_PHOCADOWNLOAD_YES</option>
<option value="0">COM_PHOCADOWNLOAD_NO</option>
</field>
Let's check to the file, then upload, the tab is enabled anyway...
I modified this way :
\administrator\components\com_phocadownload\views\phocadownloadmanager\view.html.php
Replace this :
Code: Select all
$this->tmpl['multipleuploadmethod'] = $params->get( 'multiple_upload_method', 1 );
Code: Select all
$this->tmpl['multipleuploadmethod'] = $params->get('enable_multiple_upload_admin',0);
-------------------
Another thing, the FileMakeSafe fonction of Joomla do not remove blank spaces, so I've created my own function to do this, if it can help somebody :
\administrator\components\com_phocadownload\helpers\fileupload.php
Add
Code: Select all
public static function AudioFileMakeSafe($File) {
$date = Jfactory::getDate()->toFormat('%d-%m-%Y'); //Just If you want to display Date in the filename...
$AllowedExt = array('mp3','wav','ogg','mp4');
$FileExt = strtolower(Jfile::getExt($File)); // Force lowercase for extension file...
if (empty($FileExt))
return false;
if((in_array($FileExt, $AllowedExt) == true)) {
$AudioFileName = Jfile::stripExt($File);
$AudioSafeName = Jfile::makeSafe($AudioFileName);
//replace - by _
$AudioSafeName = str_replace('-', '_', $AudioSafeName);
// remplace spaces by _
$AudioSafeName = str_replace(' ', '_', $AudioSafeName);
$AudioSafeFile = $date .'_'. $AudioSafeName .'.'. $FileExt;
return $AudioSafeFile;
} else
return false;
}
Code: Select all
if (isset($file['name'])) {
$file['name'] = self::AudioFileMakeSafe($file['name']);
}
Laurent.