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

Persist sticky status on bookmark update #1333

Merged
merged 1 commit into from
Jul 27, 2019

Conversation

ArthurHoaro
Copy link
Member

Fixes #1331

@ArthurHoaro ArthurHoaro added bug it's broken! in review labels Jul 27, 2019
@ArthurHoaro ArthurHoaro added this to the 0.11.0 milestone Jul 27, 2019
@ArthurHoaro ArthurHoaro requested a review from nodiscc July 27, 2019 08:57
@ArthurHoaro ArthurHoaro self-assigned this Jul 27, 2019
@ArthurHoaro ArthurHoaro force-pushed the hotfix/sticky-update branch from bfdda24 to 32cff8e Compare July 27, 2019 08:58
$shortUrl = $LINKSDB[$id]['shorturl'];
$link['updated'] = new DateTime();
$link['shorturl'] = $LINKSDB[$id]['shorturl'];
$link['sticky'] = isset($LINKSDB[$id]['sticky']) ? $LINKSDB[$id]['sticky'] : false;
Copy link

Choose a reason for hiding this comment

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

you can use the shorthand $link['sticky'] = $LINKSDB[$id]['sticky'] ?? false

Copy link
Member Author

Choose a reason for hiding this comment

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

No, Shaarli v0.10.x still supports PHP 5.6 (support which will be dropped in the next release o/).

Copy link

Choose a reason for hiding this comment

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

Oh! I didn't know that. Good point.

@ArthurHoaro ArthurHoaro force-pushed the hotfix/sticky-update branch from 32cff8e to 81cae5f Compare July 27, 2019 09:46
@ArthurHoaro ArthurHoaro merged commit d7dead5 into shaarli:master Jul 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug it's broken! in review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Pinned links are unpinned when updated
2 participants