Jump to content

Uninstalling an application: the core_javascript table

Recommended Posts

Just want to double check something, and happy to be wrong on this...

Is there a reason why uninstalling an Invision application doesn't remove that specific application's javascript from the core_javascript table of the database?

It's easy to check:

  1. Install a new instance of the full suite
  2. Check core_javascript and there's all the javascript files for all the applications.
  3. Uninstall a random application (say, Blog)
  4. Check core_javascript and there's all the javascript files still there for that specific application.

Reason I am asking is that I've just spotted that an old test instance of mine where I had uninstalled all my own applications but left behind the Invision apps,  all the JS from my own apps were still in the table. Always been under the impression that removal of application JS files from core_javascript was done at uninstallation time by the framework (it does for plugins), but it appears it is not.

Taking a look at the delete() function in \IPS\Plugin, there is a clear removal of the JS from the table:

$hasJs = \IPS\Db::i()->delete( 'core_javascript', array( 'javascript_plugin=?', $this->id ) );

But amongst all the tidy up in the equivalent function in \IPS\Application, there is no clearing of the application's JS from the table.

If someone reinstalls an application at a later point, there is a deletion of existing done by importXml in the \IPS\Output\Javascript, prior to importing the new.

Just double-checked to see if maybe it was implemented via the Uninstall extension, and nope.

Edited by Nathan Explosion
Link to comment
Share on other sites

  • 2 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...