Skip to content

Set expiration date by default when adding additional shares - #7286

Merged
MorrisJobke merged 3 commits into
masterfrom
issue/4823
May 19, 2014
Merged

MorrisJobke merged 3 commits into
masterfrom
issue/4823

Conversation

@nickvergessen

Copy link
Copy Markdown
Contributor

Fix #4823, #4734

@karlitschek

Copy link
Copy Markdown
Contributor

@schiesbn

@jancborchardt

Copy link
Copy Markdown
Contributor

@nickvergessen this doesn’t change anything in the interface, does it? Because expiration date should not be checked by default. Just checking. :)

@nickvergessen

Copy link
Copy Markdown
Contributor Author

@jancborchardt no it doesn't. Maybe the title is a bit misleading. It only creates the exp date when creating a second/third/etc. sharing for the same file and a exp date was set earlier.

@nickvergessen

Copy link
Copy Markdown
Contributor Author

@PVince81 @schiesbn any news?

@schiessle

Copy link
Copy Markdown
Contributor

Instead of setting the expire date from outside with a parameter, wouldn't it make sense to check for already existing shares in shareItem() and reuse the expire date if shares with a expire date already exists?

This way we would avoid that the interfaces (web, ocs api) need to take care of it.

@nickvergessen

Copy link
Copy Markdown
Contributor Author

@schiesbn then #4734 would still occure ;)

Comment thread lib/public/share.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.

Do we want to start using bindValue ? We never used it before (CC @bantu)
Might be better to stick with the array approach, you can reformat it onto multiple lines if it's too long.

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.

@PVince81 the problem is, that the array approach does not allow inserting a datetime object which is required here. Note also that we already do use it in setExpirationDate()
https://github.com/owncloud/core/blob/issue/4823/lib/public/share.php#L842

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.

Ok, understood.

@PVince81

Copy link
Copy Markdown
Contributor

I was confused by the title of this PR and thought this would be about prepopulating the "expiration date field" as soon as the user clicks on the checkbox, prepopulating with the date of today.

Can you explain what this fixes and how to test this ? The linked ticket isn't very clear about this (different things are discussed there)

@nickvergessen

Copy link
Copy Markdown
Contributor Author

@PVince81 #4823 (comment) has a Step-by-Step for reproducing

@nickvergessen nickvergessen changed the title Set expiration date by default when creating a share Set expiration date by default when creating additional shares Mar 26, 2014
@nickvergessen nickvergessen changed the title Set expiration date by default when creating additional shares Set expiration date by default when adding additional shares Mar 26, 2014
@jancborchardt

Copy link
Copy Markdown
Contributor

@nickvergessen can I ask you to check out (and if possible, fix) the Scrutinizer issues related to this pull request?

@nickvergessen

Copy link
Copy Markdown
Contributor Author

@jancborchardt fixed the js linelength, but im not sure about the others

@DeepDiver1975

Copy link
Copy Markdown
Contributor

@nickvergessen rebase please

@nickvergessen

Copy link
Copy Markdown
Contributor Author

@DeepDiver1975 rebased, but didn't test it yet after rebasing, will do that after lunch

@nickvergessen

Copy link
Copy Markdown
Contributor Author

Tested after the rebase, still works

@jancborchardt

Copy link
Copy Markdown
Contributor

@bantu please review this as you filed the original issue.

@PVince81

PVince81 commented Apr 2, 2014

Copy link
Copy Markdown
Contributor

Code looks good.
Works 👍

@nickvergessen

Copy link
Copy Markdown
Contributor Author

bump @bantu @schiesbn can we get a second +1 ?

@MorrisJobke

Copy link
Copy Markdown
Contributor

@nickvergessen A rebase is needed.

@nickvergessen

Copy link
Copy Markdown
Contributor Author

@MorrisJobke updated

@ghost

ghost commented May 7, 2014

Copy link
Copy Markdown

@PVince81

Copy link
Copy Markdown
Contributor

Please rebase.

@nickvergessen

Copy link
Copy Markdown
Contributor Author

I'm not going to rebase this every week. Just say when you want it to be rebased and merge it then

@nickvergessen

Copy link
Copy Markdown
Contributor Author

Rebased once again

@MorrisJobke

Copy link
Copy Markdown
Contributor

Rebased. I will review now.

@MorrisJobke

Copy link
Copy Markdown
Contributor

Works like described. I did a mistake during conflcit resolution, which is fixed with the latest commit 👍

@MorrisJobke

Copy link
Copy Markdown
Contributor

Old diff (before rebase): c98edf1...e54d72e
New diff (after rebase and conflict problem): a7509e5...f633fb5

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 7 new issues, 1 updated code elements

@ghost

ghost commented May 19, 2014

Copy link
Copy Markdown

@ghost

ghost commented May 19, 2014

Copy link
Copy Markdown

MorrisJobke added a commit that referenced this pull request May 19, 2014
Set expiration date by default when adding additional shares
@MorrisJobke
MorrisJobke merged commit 48977c8 into master May 19, 2014
@MorrisJobke
MorrisJobke deleted the issue/4823 branch May 19, 2014 08:26
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 26, 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.

"Expiration Date" UI / database discrepancy

8 participants