I just wanted to share a tip here. For awhile I have been searching on how to overwrite files in phoca download via the backend.
Open up controllers > phocadownloadupload.php and go to line 190. You will see the following code:
Code: Select all
if (JFile::exists($filepath)) {
if ($format == 'json') {
header('HTTP/1.0 409 Conflict');
jexit('Error. File already exists');
} else {
JError::raiseNotice(100, JText::_('Error. File already exists'));
// REDIRECT
if ($return) {
$mainframe->redirect(base64_decode($return).'&folder='.$folder);
}
return;
}
}
Code: Select all
/*if (JFile::exists($filepath)) {
if ($format == 'json') {
header('HTTP/1.0 409 Conflict');
jexit('Error. File already exists');
} else {
JError::raiseNotice(100, JText::_('Error. File already exists'));
// REDIRECT
if ($return) {
$mainframe->redirect(base64_decode($return).'&folder='.$folder);
}
return;
}
}*/
Now you can overwrite files via the backend. Hope this is of use to some phoca download users.
Mark