Skip to content

Add app version to JS and CSS - #11591

Merged
LukasReschke merged 2 commits into
masterfrom
addAppVersionToCSSandJS
Oct 16, 2014
Merged

LukasReschke merged 2 commits into
masterfrom
addAppVersionToCSSandJS

Conversation

@LukasReschke

Copy link
Copy Markdown
Contributor

This leads to the regeneration of the hash in case a single application is updated. - This does not touch the Assetic Pipeline because I don't know how it works.

Fixes #11374

@karlitschek Shall we backport this?

@karlitschek

Copy link
Copy Markdown
Contributor

looks good 👍
Backport would be good

Comment thread lib/private/templatelayout.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope this loop doesn't have any performance impact.
Since the $versionHash is stored statically it will compute it only once per request, but will likely recompute it for every requested resource.
Would it make sense to store it in the session ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. - Yes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mhm, actually I don't know how we should get informed about new app versions then... - We therefore should better invest time to cache this action inside OC_App... - Let's make this in another PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

CC @icewind1991 for a second opinion

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\OC_App::getAppVersions()

No need to do a loop

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Thanks @icewind1991

@PVince81

Copy link
Copy Markdown
Contributor

Tested, works. See comment.

@LukasReschke
LukasReschke force-pushed the addAppVersionToCSSandJS branch from b54eafc to e3ff57c Compare October 15, 2014 11:15
@PVince81

Copy link
Copy Markdown
Contributor

👍

This leads to the regeneration of the hash in case a single application is updated.

Fixes #11374
@LukasReschke
LukasReschke force-pushed the addAppVersionToCSSandJS branch from e3ff57c to 6ccda2a Compare October 15, 2014 12:00
@LukasReschke

Copy link
Copy Markdown
Contributor Author

Undefined index: REQUEST_URI - I love that CI server.... On it...

@LukasReschke

Copy link
Copy Markdown
Contributor Author

Mhm - something is messed up with him completely... - It's not even in this PR.

@LukasReschke

Copy link
Copy Markdown
Contributor Author

@owncloud-bot Retest this please.

@MorrisJobke

Copy link
Copy Markdown
Contributor

After this is merged and backported also #11556 should be backported.

@karlitschek

Copy link
Copy Markdown
Contributor

agreed

@DeepDiver1975

Copy link
Copy Markdown
Contributor

This does not touch the Assetic Pipeline because I don't know how it works.

I'll add the required logic regarding the asset pipeline.

@ghost

ghost commented Oct 15, 2014

Copy link
Copy Markdown

🚀 Test PASSed. 🚀
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/251/
🚀 Test PASSed. 🚀

@DeepDiver1975

Copy link
Copy Markdown
Contributor

I'll add the required logic regarding the asset pipeline.

@LukasReschke done

@LukasReschke

Copy link
Copy Markdown
Contributor Author

👍 - let's wait for Jenkins

@DeepDiver1975

Copy link
Copy Markdown
Contributor

I wonder if it would make sense to add this repair step to this branch as well: https://github.com/owncloud/core/pull/11430/files#diff-d3585657ca758697141bd56c5aa79a9aR14

It clears the assets folder on upgrade ...

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 2 new issues

@ghost

ghost commented Oct 16, 2014

Copy link
Copy Markdown

🚀 Test PASSed. 🚀
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/401/
🚀 Test PASSed. 🚀

LukasReschke added a commit that referenced this pull request Oct 16, 2014
@LukasReschke
LukasReschke merged commit a37dcf9 into master Oct 16, 2014
@LukasReschke
LukasReschke deleted the addAppVersionToCSSandJS branch October 16, 2014 13:54
@LukasReschke

Copy link
Copy Markdown
Contributor Author

Stable7: 6e3a7ea...af72528

@MorrisJobke

Copy link
Copy Markdown
Contributor

What about backporting the htaccess PR?

@LukasReschke

Copy link
Copy Markdown
Contributor Author

Feel free to do it - I will not touch it, for me this seems too risky ;-)

@MorrisJobke

Copy link
Copy Markdown
Contributor

Okay. Then not:)

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CSS/JS version parameter in templatelayout.php has to consider the app version

7 participants