feat(legacy): invalidate cached assets using md5sum (#2161)

* feat(legacy): invalidate cached assets  using md5sum

Don't rely on version to invalidate cached assets

* use Assets::url() when loading legacy pages

* fix script docs
This commit is contained in:
Jonas L 2022-09-19 11:58:31 +02:00 committed by GitHub
parent 1edcbc0657
commit 23578da4e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 457 additions and 271 deletions

View file

@ -18,28 +18,20 @@ class UserController extends Zend_Controller_Action
// Start the session to re-open write permission to the session so we can
// create the namespace for our csrf token verification
SessionHelper::reopenSessionForWriting();
$CC_CONFIG = Config::getConfig();
$request = $this->getRequest();
Zend_Layout::getMvcInstance()->assign('parent_page', 'Settings');
$baseUrl = Config::getBasePath();
$js_files = [
'js/datatables/js/jquery.dataTables.js?',
'js/datatables/plugin/dataTables.pluginAPI.js?',
'js/airtime/user/user.js?',
];
foreach ($js_files as $js) {
$this->view->headScript()->appendFile(
$baseUrl . $js . $CC_CONFIG['airtime_version'],
'text/javascript'
);
foreach ([
'js/datatables/js/jquery.dataTables.js',
'js/datatables/plugin/dataTables.pluginAPI.js',
'js/airtime/user/user.js',
] as $file) {
$this->view->headScript()->appendFile(Assets::url($file), 'text/javascript');
}
$this->view->headLink()->appendStylesheet($baseUrl . 'css/users.css?' . $CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet(Assets::url('css/users.css'));
$form = new Application_Form_AddUser();