Skip to content

[ticket/17469] Automatic updater front end#6864

Open
CHItA wants to merge 1 commit intophpbb:masterfrom
CHItA:ticket/17469
Open

[ticket/17469] Automatic updater front end#6864
CHItA wants to merge 1 commit intophpbb:masterfrom
CHItA:ticket/17469

Conversation

@CHItA
Copy link
Member

@CHItA CHItA commented Sep 27, 2025

PHPBB3-17469

Checklist:

  • Correct branch: master for new features; 3.3.x for fixes
  • Tests pass
  • Code follows coding guidelines: master and 3.3.x
  • Commit follows commit message format

Tracker ticket:

https://tracker.phpbb.com/browse/PHPBB-17469

@CHItA CHItA added this to the 4.0.0-a2 milestone Sep 28, 2025
@CHItA CHItA force-pushed the ticket/17469 branch 11 times, most recently from 2b9d103 to de6bd65 Compare September 28, 2025 09:22
});
if (!response.ok)
{
phpbb.alert(response.status, response.statusText);
Copy link
Member

Choose a reason for hiding this comment

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

Was the idea to just output the status id and the text without any language parsing?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, pretty much.

{
case 'error':
phpbb.alert(resp.status, resp.error);
return;
Copy link
Member

Choose a reason for hiding this comment

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

I guess you don't like break?

Copy link
Member Author

Choose a reason for hiding this comment

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

i have no problem with it, but you may or may not want further code to execute based on the status, hence return seemed more fitting.

arguments:
- '@filesystem'
- '@updater.get_updates'
- '@language'
Copy link
Member

Choose a reason for hiding this comment

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

we typically try to order these alphabetically

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

{
$recheck = $request->variable('versioncheck_force', false);
$do_update = $request->variable('do_update', false);
$token = $request->variable('form_token', false);
Copy link
Member

Choose a reason for hiding this comment

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

Since token is a string shouldn't we kind of default to ''?

Copy link
Member Author

Choose a reason for hiding this comment

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

it is easier to do the check if the default is false, does this break any parsing/validation?

{
if ($this->user->data['user_type'] != USER_FOUNDER)
{
throw new http_exception(403);
Copy link
Member

Choose a reason for hiding this comment

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

You might want to add a language string for this:
throw new http_exception(403, 'INSTALL_PHPBB_NOT_INSTALLED');

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe, but it should be inaccessible for other users anyway - as in link hidden, so probably you called this thing by hand, in which case no information for you.

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should maybe have these strings in a container parameter file

Copy link
Member Author

Choose a reason for hiding this comment

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

i think that would make it harder to mock? the purpose here is to have them modifiable for test cases.

Copy link
Member

Choose a reason for hiding this comment

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

also not sure if this is actually interface worthy :D

Copy link
Member Author

Choose a reason for hiding this comment

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

it is not, but if you want to change them in the tests, this seems reasonable. although we could do mock objects as well i guess.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants