Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add app version to JS and CSS #11591

Merged
merged 2 commits into from
Oct 16, 2014
Merged

Add app version to JS and CSS #11591

merged 2 commits into from
Oct 16, 2014

Conversation

LukasReschke
Copy link
Member

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
Contributor

looks good 👍
Backport would be good

if(empty(self::$versionHash)) {
$appVersions = array();
foreach(OC_App::getAllApps() as $app) {
$appVersions[] = OC_App::getAppVersion($app);
Copy link
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
Member 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
Member 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
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
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
Member Author

Choose a reason for hiding this comment

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

True.

Copy link
Member 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
Contributor

Tested, works. See comment.

@PVince81
Copy link
Contributor

👍

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

Fixes #11374
@LukasReschke
Copy link
Member Author

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

@LukasReschke
Copy link
Member Author

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

@LukasReschke
Copy link
Member Author

@owncloud-bot Retest this please.

@MorrisJobke
Copy link
Contributor

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

@karlitschek
Copy link
Contributor

agreed

@DeepDiver1975
Copy link
Member

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
Copy link

ghost commented Oct 15, 2014

🚀 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
Member

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

@LukasReschke done

@LukasReschke
Copy link
Member Author

👍 - let's wait for Jenkins

@DeepDiver1975
Copy link
Member

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

The inspection completed: 2 new issues

@ghost
Copy link

ghost commented Oct 16, 2014

🚀 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
Member Author

Stable7: 6e3a7ea...af72528

@MorrisJobke
Copy link
Contributor

What about backporting the htaccess PR?

@LukasReschke
Copy link
Member Author

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

@MorrisJobke
Copy link
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