Skip to content

[ticket/11088] Move style, extension and language pack management to Customise tab#985

Merged
p merged 14 commits intophpbb:developfrom
imkingdavid:ticket/11088
Dec 13, 2012
Merged

[ticket/11088] Move style, extension and language pack management to Customise tab#985
p merged 14 commits intophpbb:developfrom
imkingdavid:ticket/11088

Conversation

@imkingdavid
Copy link
Copy Markdown
Contributor

Instead of being separated, these related ACP modules are now grouped
intuitively.

http://tracker.phpbb.com/browse/PHPBB3-11088

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The Style components string is no longer being used (it wasn't before this change either, but since I'm changing the style organization around, I figured I could remove it here).

As for Smilies, the tab behind the comma still appears in my files, so I know I didn't remove it. Maybe Git automatically removed it for me upon commit but it is still in my file, so I'm confused.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

look closely
You have extra spaces after the comma in the one you committed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm you're right, the extra space was added by me, not removed. My bad.

@travisbot
Copy link
Copy Markdown

This pull request passes (merged bb6b05c into 7bf5989).

@travisbot
Copy link
Copy Markdown

This pull request fails (merged d1c5ab21 into 7bf5989).

@travisbot
Copy link
Copy Markdown

This pull request passes (merged d1c5ab21 into 7bf5989).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing comma .. 'ACP_LANGUAGE',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks.

@imkingdavid
Copy link
Copy Markdown
Contributor Author

As an update, this works for new installs, but I am stuck at getting it to work on update.

@erikfrerejean
Copy link
Copy Markdown

Have you looked how it is done in the installer?
https://github.com/phpbb/phpbb3/blob/develop/phpBB/install/install_install.php#L1599

@imkingdavid
Copy link
Copy Markdown
Contributor Author

Thanks, I'll take a look later.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@imkingdavid Oops - there is a DOT here, should be a comma.

Also got this error running the database update: PHP Fatal error: Class 'acp_modules' not found in /phpbb3/phpBB/install/database_update.php on line 2385

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah, thanks.

Yeah, as I said in the commit message, i hadn't tested it. I was working away from my normal computer and didn't have a test environment set up. Looks like I just forgot to include the class file.

…customise

Instead of being separated, these related ACP modules are now grouped
intuitively.

PHPBB3-11088
This should rename Styles category to Customise, move language packs, and add extension management

PHPBB3-11088
@imkingdavid
Copy link
Copy Markdown
Contributor Author

This now works for both fresh install and update; tested.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Something went wrong in the wording there.

@p
Copy link
Copy Markdown
Contributor

p commented Dec 12, 2012

I like this.

For adding/copying permissions, I have a feeling that the same code already exists elsewhere in updater. How about factoring it out into a function that 1) adds a new permission and 2) assigns it to whoever has a designated initial permission? Or two functions if that makes more sense.

@imkingdavid
Copy link
Copy Markdown
Contributor Author

@p I moved the permission creation to a function but have not yet had the chance to test it. This PR will need to be merged prior to #492 which also adds a permission.

@EXreaction
Copy link
Copy Markdown
Contributor

@imkingdavid Migrations already has a permission creation function, adding a separate one now will just mean more cleanup work later. I would prefer the db update section wait on migrations otherwise it'll just need to be done all over again.

This PR could either wait for migrations or be merged without the database update and then create a ticket for it that depends on migrations.

@imkingdavid
Copy link
Copy Markdown
Contributor Author

@EXreaction I'm okay with that, but @p was wanting database updater stuff done. Do you know if the migrations permission add function allows copying permissions as well or is there a separate function for that?

BTW, just tested with the latest commit and it works, so we can merge if we don't want to wait for migrations.

@EXreaction
Copy link
Copy Markdown
Contributor

There is currently not a function for copying permissions.
https://github.com/EXreaction/phpbb3/blob/feature/migrations/phpBB/includes/db/migration/tool/permission.php#L92

Note that this code is very likely to be changed (so far it was pretty much just copied from UMIL).

If you'd like to create a function that does an add/copy based on use of the add and permission_set functions that would be wonderful, I can add it to the permissions tool. Also as an alternative, just a permission copy function that is separate might be more useful.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

phpbb prefix?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like underscore is consistent with the rest of the file though.

@p
Copy link
Copy Markdown
Contributor

p commented Dec 13, 2012

@EXreaction I thought I asked for the migrations PR to be made smaller, not larger via absorbing unrelated functionality?

p added a commit to p/phpbb3 that referenced this pull request Dec 13, 2012
* imkingdavid/ticket/11088:
  [ticket/11088] Pass required objects in as arguments
  [ticket/11088] Globalize objects in new permission function
  [ticket/11088] Move permission creation to a function
  [ticket/11088] Copy a_styles permission for a_extensions
  [ticket/11088] Remove extraneous word from sentence in comment
  [ticket/11088] Changed "file extensions" to "attachment extensions"
  [ticket/11088] Fix the database updater to correctly manipulate the modules
  [ticket/11088] Put language pack module move below extension module creation
  [ticket/11088] Untested, progress on update script
  [ticket/11088] Fix typo (period instead of comma)
  [ticket/11088] Untested progress for update script
  [ticket/11088] Added missing comma
  [ticket/11088] Removed added space
  [ticket/11088] Move style, extension and language pack management to customise
@p p merged commit a578321 into phpbb:develop Dec 13, 2012
@EXreaction
Copy link
Copy Markdown
Contributor

@p Anything that is added to database_update must become part of migrations, so it's not going to get any smaller by adding more to database_update before migrations is merged, but I guess it's too late now.

@p
Copy link
Copy Markdown
Contributor

p commented Dec 13, 2012

You are doing it wrong. First implement migrations, the actual code that is needed to make them work. If you need test cases, those should go into the test suite. Get this first part merged. Then rewrite database updater to use migrations.

You are doing everything at once which produces a huge and unreviewable diff and tons of conflicts with everything. The only way I was able to even read the diff was to assume none of the updater code was actually changed and just throw it out of the diff, reducing it from 8000 lines to maybe 1000. If you start making changes in the updater code all those 8000 lines must be reviewed.

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.

9 participants