Summary:
Allow ability to override upgrade of instance class
Detailed Description:
In 1.4, the instance class file is upgraded when the main Listit2 is upgraded.
My instance class is something like:
class ListIt2MobileList extends ListIt2 {
....
}
For instance, I needed to add some routes to an instance for custom custom URL
redirects. I added the action.redirect.php in the new instance directory, added
a new GetVersion() function to indicate this was a different version, and added
something like this to this instance class:
public function InitializeFrontend() {
.....
// Custom
$this->RegisterRoute('/' . $this->prefix .
'\/redirect\/(?P<returnid>[0-9]+)\/(?P<item>[0-9]+?)\/(?P<returnpage>.+?)$/',
array('action' => 'redirect'));
....
}
ListIt2 is prone to upgrade this file regularly and overwrite my changes.
Is there an easier way to avoid this? I ended up deleting the Instance
reference in the listit2_instances DB table, and am managing this new instance
as a generic module.
TIA
Mike