I've read somewhere that this feature is already on the roadmap, but I was unable to find it.
I have done a quick implementation of it on my ispcp installation. It consists mostly of code duplicated from the subdomain source, but it works pretty well on my machine.
I have attached the needed files to this post. Just apply the patch and copy the "ispcp-alssub-mngr" into the engine directory and "delete_alssub.php" in gui/client.
I think for a final implementation of this we should consider redesigning the manager code of all the managers a bit. There is lots of duplicated code that could be put in another common file.
I made some modifications to the patch and alssub-mngr, so it works with RC3.
Also the sql for the extra table (subdomain_alias) was missing in your .zip.
By 'reverse engineering' , i found out the structure, it's included as well.
Ok, here's the new package... Same instructions as in the first post:
- apply the patch
- copy "ispcp-alssub-mngr" into the engine directory (default: /var/www/ispcp/engine)
- copy "delete_alssub.php" to gui/client (default /var/www/ispcp/gui/client)
- import subdomain_alias.sql into the ispcp database
It's far from perfect, though. Imho all the "mgr" code (not only my "alssub" addition) should be rewritten to use a central library. Right now the code duplication is crazy If I should ever find the time I'll try to do this, but it doesn't look good at the moment.
It's far from perfect, though. Imho all the "mgr" code (not only my "alssub" addition) should be rewritten to use a central library. Right now the code duplication is crazy If I should ever find the time I'll try to do this, but it doesn't look good at the moment.
At least it has an advantage: Since the documentation of the code is worse than the code itself (there is no docu) it's easier to read all the duplications than to jump from function to function in all files... :-)
But of course - good code is looks different... but also has another history