When upgrading an Add-on,
This seems kinda inefficient as many Add-Ons (including official XFI) don't have any JS, it therefore would be better to only update the timestamp if an Add-on actually has JavaScript files.
jsLastUpdate
which is used to calculated the JavaScript cache buster is unconditionally updated after importing Add-on Data in XF\AddOn\AddOn:postDataImport()
.
PHP:
public function postDataImport()
{
// all data will be imported, re-enable this so postX methods will have access to their methods
$installed = $this->installedAddOn;
if (!$installed)
{
throw new \LogicException("Add-on is not installed");
}
$installed->is_processing = false;
$installed->saveIfChanged();
\XF::repository('XF:Option')->updateOption('jsLastUpdate', \XF::$time);
}
This seems kinda inefficient as many Add-Ons (including official XFI) don't have any JS, it therefore would be better to only update the timestamp if an Add-on actually has JavaScript files.
Upvote
0