In the real world id is an initial filename #27271

Merged
merged 1 commit into from Feb 28, 2017

Conversation

Projects
None yet
3 participants
@VicDeo
Member

VicDeo commented Feb 27, 2017

Description

Fixes tooltip with original path in thrashbin

Motivation and Context

Steps to reproduce

  1. Upload a file through the web UI in IE
  2. delete file afterwards in the UI
  3. change into "deleted files view" in the web ui

Expected behaviour

the file is presented and when moving with the mouse over it, a tooltip presents the path, the file has been stored before in ownCloud

Actual behaviour

The file is there, but not tooltip present, so no information about the previous location of the file before deletion.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
@mention-bot

This comment has been minimized.

Show comment
Hide comment
@mention-bot

mention-bot Feb 27, 2017

@VicDeo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @PVince81, @DeepDiver1975 and @butonic to be potential reviewers.

@VicDeo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @PVince81, @DeepDiver1975 and @butonic to be potential reviewers.

- $originalPath = $originalLocations[$id][$timestamp];
+ $originalName = substr($entryName, 0, -strlen($timestamp)-2);
+ if (isset($originalLocations[$originalName][$timestamp])) {
+ $originalPath = $originalLocations[$originalName][$timestamp];

This comment has been minimized.

@PVince81

PVince81 Feb 28, 2017

Member

in my quick debugging yesterday I also noticed that the timestamp key in the array was an integer but the $timestamp variable was a string. If this works it means maybe PHP does its weird non-strict equality == magic to still match the correct key.

@PVince81

PVince81 Feb 28, 2017

Member

in my quick debugging yesterday I also noticed that the timestamp key in the array was an integer but the $timestamp variable was a string. If this works it means maybe PHP does its weird non-strict equality == magic to still match the correct key.

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Feb 28, 2017

Member

Tested, works 👍

Please backport to stable9.1

Member

PVince81 commented Feb 28, 2017

Tested, works 👍

Please backport to stable9.1

@PVince81 PVince81 merged commit 4a77379 into master Feb 28, 2017

4 checks passed

Scrutinizer 1 new issues
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details

@PVince81 PVince81 deleted the fix-trash-tooltip branch Feb 28, 2017

@VicDeo VicDeo referenced this pull request Feb 28, 2017

Merged

[Stable9.1] In the real world id is an initial filename #27279

4 of 9 tasks complete
@VicDeo

This comment has been minimized.

Show comment
Hide comment
@VicDeo

VicDeo Feb 28, 2017

Member

Stable9.1: #27279

Member

VicDeo commented Feb 28, 2017

Stable9.1: #27279

@MorrisJobke MorrisJobke referenced this pull request in nextcloud/server Mar 20, 2017

Merged

Tooltip in trashbin with previous location #3948

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment