admin
Karma: 98
|
Re:Upgrade issue - 2009/06/05 10:44
There is no general solution to the problem of customization. The brute force solution is to apply the changes again to a new release, which is tedious but effective.
If you have modifications that are generally useful, then you can always submit them to me for possible inclusion in the standard Remository product.
Or another option is that I am normally willing to add hooks for plugins (and have done this myself a way to implement custom code in a way that is not broken by upgrades). That way, the custom code can be written as a plugin that is relatively independent of changes in Remository.
On the file extension check, the issue is not that it does not work, but that it is not applied to files that are stored in the database. If you want to apply it to files stored in the database, you would need to modify the code (adding to the upgrade problem!). The relevant code is in ../com_remository/p-classes/remositoryFile.php around lines 327 to 347:
| Code: |
public function storePhysicalFile ($physical, $extensiontitle=true, $checkExt=true) {
$this->url = '';
$this->islocal = '1';
$this->filetype = $this->getExtension();
if ($this->filetitle == '') {
$nicetitle = str_replace('_', ' ', $physical->proper_name);
if ($extensiontitle) $this->filetitle = $nicetitle;
else $this->filetitle = remositoryRepository::allButLast($nicetitle, '.');
}
if ($this->filepath) {
if ($this->onDiskCheckFail($physical, $checkExt)) {
echo "n";
exit;
}
if ($checkExt AND !remositoryRepository::getInstance()->isExtensionOK($this->realname)) {
echo "n";
exit;
}
}
else {
|
and you would need to move the small block that starts off if ($checkExt AND ... outside the containing condition.
Martin Brampton aka Counterpoint http://aliro.org http://black-sheep-research.com |