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

Quick post doesn't work #9

Closed
donqq opened this issue Feb 2, 2017 · 5 comments
Closed

Quick post doesn't work #9

donqq opened this issue Feb 2, 2017 · 5 comments
Assignees
Labels

Comments

@donqq
Copy link

donqq commented Feb 2, 2017

It posts, but still not display the post without refreshing the page, but as soon as the plugin is disabled the quick post appears when it's posted without refreshing the page.

@donqq
Copy link
Author

donqq commented Feb 3, 2017

master...stormyqq:patch-1
It's fixed.

@DiogoParrinha
Copy link
Owner

Thanks :)

@DiogoParrinha DiogoParrinha self-assigned this Mar 17, 2017
@DiogoParrinha
Copy link
Owner

Duplicate of #8 .

I can't accept your Pull Request because it modifies parts which are not required (only the preg_replace call which uses the e modified needs to be changed) and because your modification to the first call of preg_replace doesn't do what it's supposed to.

It's supposed to remove the quote tags, not to keep the quote tag that matches the first pattern, as your fix does. The code was originally part of http://forums.mybb-plugins.com/Thread-OUGC-Post-Character-Count-Enhancement but I failed to notice the e modified.

To my knowledge, simply removing it fixes the issue, because we don't need to evaluate any code within it. We just want to strip everything that matches the first pattern.

@DiogoParrinha
Copy link
Owner

Yes, your code made it compatible but wouldn't work as expected. It would give no warnings but the code wouldn't remove the quote tags properly. I've fixed it by simply removing the 'e' modified, which is deprecated and we don't need to eval anything so we don't need to use the _callback function.

Anyway, thanks for putting your time into this.

@DiogoParrinha
Copy link
Owner

I think you're not understanding. The callback function may be recommended but your solution would replace the match with the content of $match[0] which doesn't make sense because we want to strip the quote tag and its contents. Basically, your PR doesn't fix the issue, it fixes the warning.

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

No branches or pull requests

2 participants