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

Update .changes history according to move operation #247

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexdraconian
Copy link

If pagename in history entries(contents of .changes file) are not edited according to move, users can't access to old history entry before moving.

This PR resolves the problem, by updating pagename in .changes file.

$history_content = file_get_contents($new_path);

$old_pagename = str_replace("/", ":", substr($old_path, strlen($conf['metadir']) + 1, -8));
$new_pagename = str_replace("/", ":", substr($new_path, strlen($conf['metadir']) + 1, -8));
Copy link
Owner

Choose a reason for hiding this comment

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

I think this is missing an utf8_decodeFN to remove the (potential) encoding of the filename. Also, what speaks against just using $src_ns, $dst_ns, $src_name and $dst_name in the calling method to construct both IDs without the complicated step of first constructing filenames?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants