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

Usercp2.php removal #3034

Closed
Ben-MyBB opened this issue Feb 18, 2018 · 12 comments · Fixed by #3135
Closed

Usercp2.php removal #3034

Ben-MyBB opened this issue Feb 18, 2018 · 12 comments · Fixed by #3135
Labels
b:1.8 Branch: 1.8.x
Milestone

Comments

@Ben-MyBB
Copy link
Member

In 1.9 we should remove the usercp2.php and look to merge this into one since the file doesn't do a huge amount and tidy things up a little bit.

@Ben-MyBB Ben-MyBB added the b:1.9 Branch: 1.9.x label Feb 18, 2018
@Ben-MyBB Ben-MyBB added this to the 1.9.0 milestone Feb 18, 2018
@effone
Copy link
Member

effone commented Apr 2, 2018

I have already made changes, testing now. I need some guidance:

Hooks will be renamed as well? There is no point using 'usercp2' in hook names, but if I modify those hooks maybe some existing plugins using those hooks break.

Please confirm so that I can make a PR.

@effone
Copy link
Member

effone commented Apr 2, 2018

Well, here is the PR.
Tested so far working fine ...
Unfortunately messed and mixed up with my other PR and reverted commit. Is it okay or I have to create fresh?
Also suggest required changes.

@euantorano
Copy link
Member

euantorano commented Apr 2, 2018 via email

@effone
Copy link
Member

effone commented Apr 2, 2018

@euantorano Alright I will do the necessary reverts.

Just another point, if we keep the old hooks there is an open hook in usercp2.php
$plugins->run_hooks("usercp2_start"); which I have ommitted as $plugins->run_hooks("usercp_start"); is already in place. But there is no $plugins->run_hooks("usercp2_end");
This start hook of usercp2 is pointless and can be omitted. But if I omit that the issue remains same as any plugin using the hook $plugins->run_hooks("usercp2_start"); will break.

Decision?

@euantorano
Copy link
Member

euantorano commented Apr 2, 2018 via email

@Starpaul20
Copy link
Member

If we're keeping this issue for 1.9, then the hooks should be renamed.

@effone
Copy link
Member

effone commented Apr 3, 2018

Commit: Hook names retained

If we are going to rename hooks at all; its not a big job, but a matter to decide. Let me know and I will revert my last commit, if required.

@effone
Copy link
Member

effone commented Apr 5, 2018

Are we gonna merge this or waiting for 1.9?
I have a messed up fork of MyBB (no idea how some commit happened directly to feature while I was playing with VSCode) and this is preventing me to make a freah fork as well as making new PR. So I need to delete and refork.
Still not much familiar with GitHub, I guess ...

@euantorano
Copy link
Member

euantorano commented Apr 5, 2018 via email

@effone
Copy link
Member

effone commented Apr 5, 2018

@euantorano with due honor to your view this is not gonna impact much in extend as you can see only 6 links to be fixed in theme.xml removing '2' from links (css association can be kept as is) and thats all. Even if people not comfortable or not ready to modify links we can suggest them with 2 lines of htaccess code and that will handle all routing from usercp2 to usercp. The frontend impact is neglegable wrt the ongoing / upcoming changes.

@effone
Copy link
Member

effone commented Apr 5, 2018

Another solution is to keep a dummy usercp2 for now with a code like following:

<?php

define("IN_MYBB", 1);

$redirecturl = str_replace('usercp2', 'usercp', $_SERVER['REQUEST_URI']);
header('Location: '.$redirecturl);

that will handle updated as well as old themes ...
for plugins: we are keeping the old hooks as of now, right?

@euantorano
Copy link
Member

Yes, that would work. And yes, we're keeping the old hooks as of now.

@effone effone added b:1.8 Branch: 1.8.x and removed b:1.9 Branch: 1.9.x labels Apr 30, 2018
Eldenroot pushed a commit to Eldenroot/mybb that referenced this issue May 8, 2018
* THIS_SCRIPT Fallback added.

Moved from ./global.php

* Revert "THIS_SCRIPT Fallback added."

This reverts commit 81fecc7.

* Removal of usercp2

Removed traces of usercp2 from wol functions

* Removed traces of usercp2

Updated Unsubscription Information links.

* Removal of usercp2

CSS attachment & links updated.

* Merged usercp2 codes

Combined usercp & usercp2 codes. Maintained usercp condition style.

* Delete usercp2.php

Codes combined in usercp.

* Hook names retained

1. Hook names reverted to earlier for backward compatibility
2. $plugins->run_hooks("usercp2_start"); Dropped.
3. Comments added to hooks for reference.

* Removed ALLOWABLE_PAGE

As suggested ...

* Added back "ALLOWABLE_PAGE"

.... as confirmed.
Shade- pushed a commit to Shade-/mybb that referenced this issue Jun 12, 2018
* THIS_SCRIPT Fallback added.

Moved from ./global.php

* Revert "THIS_SCRIPT Fallback added."

This reverts commit 81fecc7.

* Removal of usercp2

Removed traces of usercp2 from wol functions

* Removed traces of usercp2

Updated Unsubscription Information links.

* Removal of usercp2

CSS attachment & links updated.

* Merged usercp2 codes

Combined usercp & usercp2 codes. Maintained usercp condition style.

* Delete usercp2.php

Codes combined in usercp.

* Hook names retained

1. Hook names reverted to earlier for backward compatibility
2. $plugins->run_hooks("usercp2_start"); Dropped.
3. Comments added to hooks for reference.

* Removed ALLOWABLE_PAGE

As suggested ...

* Added back "ALLOWABLE_PAGE"

.... as confirmed.
euantorano pushed a commit that referenced this issue Jun 13, 2018
* Fixes #3034 usercp2.php removal (#3093)

* THIS_SCRIPT Fallback added.

Moved from ./global.php

* Revert "THIS_SCRIPT Fallback added."

This reverts commit 81fecc7.

* Removal of usercp2

Removed traces of usercp2 from wol functions

* Removed traces of usercp2

Updated Unsubscription Information links.

* Removal of usercp2

CSS attachment & links updated.

* Merged usercp2 codes

Combined usercp & usercp2 codes. Maintained usercp condition style.

* Delete usercp2.php

Codes combined in usercp.

* Hook names retained

1. Hook names reverted to earlier for backward compatibility
2. $plugins->run_hooks("usercp2_start"); Dropped.
3. Comments added to hooks for reference.

* Removed ALLOWABLE_PAGE

As suggested ...

* Added back "ALLOWABLE_PAGE"

.... as confirmed.

* Converted usercp_addsubscription_thread

* usercp2 -> usercp
euantorano pushed a commit to euantorano/mybb that referenced this issue Mar 23, 2019
…bb#3261)

* Fixes mybb#3034 usercp2.php removal (mybb#3093)

* THIS_SCRIPT Fallback added.

Moved from ./global.php

* Revert "THIS_SCRIPT Fallback added."

This reverts commit 81fecc7.

* Removal of usercp2

Removed traces of usercp2 from wol functions

* Removed traces of usercp2

Updated Unsubscription Information links.

* Removal of usercp2

CSS attachment & links updated.

* Merged usercp2 codes

Combined usercp & usercp2 codes. Maintained usercp condition style.

* Delete usercp2.php

Codes combined in usercp.

* Hook names retained

1. Hook names reverted to earlier for backward compatibility
2. $plugins->run_hooks("usercp2_start"); Dropped.
3. Comments added to hooks for reference.

* Removed ALLOWABLE_PAGE

As suggested ...

* Added back "ALLOWABLE_PAGE"

.... as confirmed.

* Converted usercp_addsubscription_thread

* usercp2 -> usercp
euantorano pushed a commit to euantorano/mybb that referenced this issue Mar 23, 2019
…bb#3261)

* Fixes mybb#3034 usercp2.php removal (mybb#3093)

* THIS_SCRIPT Fallback added.

Moved from ./global.php

* Revert "THIS_SCRIPT Fallback added."

This reverts commit 81fecc7.

* Removal of usercp2

Removed traces of usercp2 from wol functions

* Removed traces of usercp2

Updated Unsubscription Information links.

* Removal of usercp2

CSS attachment & links updated.

* Merged usercp2 codes

Combined usercp & usercp2 codes. Maintained usercp condition style.

* Delete usercp2.php

Codes combined in usercp.

* Hook names retained

1. Hook names reverted to earlier for backward compatibility
2. $plugins->run_hooks("usercp2_start"); Dropped.
3. Comments added to hooks for reference.

* Removed ALLOWABLE_PAGE

As suggested ...

* Added back "ALLOWABLE_PAGE"

.... as confirmed.

* Converted usercp_addsubscription_thread

* usercp2 -> usercp
euantorano pushed a commit that referenced this issue Jun 2, 2019
* Fixes #3034 usercp2.php removal (#3093)

* THIS_SCRIPT Fallback added.

Moved from ./global.php

* Revert "THIS_SCRIPT Fallback added."

This reverts commit 81fecc7.

* Removal of usercp2

Removed traces of usercp2 from wol functions

* Removed traces of usercp2

Updated Unsubscription Information links.

* Removal of usercp2

CSS attachment & links updated.

* Merged usercp2 codes

Combined usercp & usercp2 codes. Maintained usercp condition style.

* Delete usercp2.php

Codes combined in usercp.

* Hook names retained

1. Hook names reverted to earlier for backward compatibility
2. $plugins->run_hooks("usercp2_start"); Dropped.
3. Comments added to hooks for reference.

* Removed ALLOWABLE_PAGE

As suggested ...

* Added back "ALLOWABLE_PAGE"

.... as confirmed.

* Converted usercp_addsubscription_thread

* usercp2 -> usercp
euantorano pushed a commit that referenced this issue Jun 2, 2019
* Fixes #3034 usercp2.php removal (#3093)

* THIS_SCRIPT Fallback added.

Moved from ./global.php

* Revert "THIS_SCRIPT Fallback added."

This reverts commit 81fecc7.

* Removal of usercp2

Removed traces of usercp2 from wol functions

* Removed traces of usercp2

Updated Unsubscription Information links.

* Removal of usercp2

CSS attachment & links updated.

* Merged usercp2 codes

Combined usercp & usercp2 codes. Maintained usercp condition style.

* Delete usercp2.php

Codes combined in usercp.

* Hook names retained

1. Hook names reverted to earlier for backward compatibility
2. $plugins->run_hooks("usercp2_start"); Dropped.
3. Comments added to hooks for reference.

* Removed ALLOWABLE_PAGE

As suggested ...

* Added back "ALLOWABLE_PAGE"

.... as confirmed.

* Converted usercp_addsubscription_thread

* usercp2 -> usercp
lairdshaw pushed a commit to lairdshaw/mybb that referenced this issue Oct 11, 2021
[Rebased for 1.9 by Laird]

* THIS_SCRIPT Fallback added.

Moved from ./global.php

* Revert "THIS_SCRIPT Fallback added."

This reverts commit 81fecc7.

* Removal of usercp2

Removed traces of usercp2 from wol functions

* Removed traces of usercp2

Updated Unsubscription Information links.

* Removal of usercp2

CSS attachment & links updated.

* Merged usercp2 codes

Combined usercp & usercp2 codes. Maintained usercp condition style.

* Delete usercp2.php

Codes combined in usercp.

* Hook names retained

1. Hook names reverted to earlier for backward compatibility
2. $plugins->run_hooks("usercp2_start"); Dropped.
3. Comments added to hooks for reference.

* Removed ALLOWABLE_PAGE

As suggested ...

* Added back "ALLOWABLE_PAGE"

.... as confirmed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:1.8 Branch: 1.8.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants