Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-7262

Clarify docs about is_dynamic not being updated by set_config()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.12-RC1
    • Component/s: Other
    • Labels:
      None

      Description

      If you take a look at the set_config function, it only will set the is_dynamic on insert, but during update, it won't change it, so if code is changed to being dynamic, or not being, this is not updated.

      Not sure if this is too much of a relevant bug, because I'm not sure if a user will ever have a problem with this because the code would probably not be changing after the config is set, but I thought I'd report this non-the-less.

        Activity

        Hide
        bantu Andreas Fischer added a comment -

        @Nathan: Looking at the implementation of set_config() in develop-olympus, the is_dynamic parameter decides whether the cache for the config table is destroyed or not. As such you always have to specify the correct $is_dynamic.

        Show
        bantu Andreas Fischer added a comment - @Nathan: Looking at the implementation of set_config() in develop-olympus, the is_dynamic parameter decides whether the cache for the config table is destroyed or not. As such you always have to specify the correct $is_dynamic.
        Hide
        bantu Andreas Fischer added a comment -

        This also basically implies that modifications should not be changing is_dynamic for any existing phpBB config entries.

        Show
        bantu Andreas Fischer added a comment - This also basically implies that modifications should not be changing is_dynamic for any existing phpBB config entries.
        Hide
        Skouat Skouat added a comment -

        Andreas,

        For more understanding, read this https://www.phpbb.com/bugs/modteamtools/ticket.php?ticket_id=63314
        If we (MOD authors) want to change the status of a config setting, we cannot do it by using the features actually provided.
        We have to make exceptions to bypass this "bug". But this is not really a bug, because it's an unmanaged state.

        It's for this reason that, first of all, I opened a ticket in UMIL tracker.
        But it turned out that the problem of "Umil" was not related to "Umil" but "phpBB".
        That's why Thumba25 has added a comment here.

        Maybe it can be seen as an improvement of set_config() function.

        Regards.

        Show
        Skouat Skouat added a comment - Andreas, For more understanding, read this https://www.phpbb.com/bugs/modteamtools/ticket.php?ticket_id=63314 If we (MOD authors) want to change the status of a config setting, we cannot do it by using the features actually provided. We have to make exceptions to bypass this "bug". But this is not really a bug, because it's an unmanaged state . It's for this reason that, first of all, I opened a ticket in UMIL tracker. But it turned out that the problem of "Umil" was not related to "Umil" but "phpBB". That's why Thumba25 has added a comment here. Maybe it can be seen as an improvement of set_config() function. Regards.
        Hide
        Oleg Oleg [X] (Inactive) added a comment -

        https://area51.phpbb.com/docs/code/30x/ says:

        set_config

        public void set_config(mixed config_name, mixed config_value, bool is_dynamic)

        Set config value. Creates missing config entry.

        Seems to me that the documentation should clearly state that changing is_dynamic is not allowed, if this indeed is the case. Same with passing correct is_dynamic.

        Show
        Oleg Oleg [X] (Inactive) added a comment - https://area51.phpbb.com/docs/code/30x/ says: set_config public void set_config(mixed config_name, mixed config_value, bool is_dynamic) Set config value. Creates missing config entry. Seems to me that the documentation should clearly state that changing is_dynamic is not allowed, if this indeed is the case. Same with passing correct is_dynamic.
        Hide
        bantu Andreas Fischer added a comment -

        As per https://www.phpbb.com/bugs/modteamtools/ticket.php?ticket_id=63314#post235228: Updating the is_dynamic value in the database is not sufficient in order to change the config value's "dynamicness". This is because you also have to update any is_dynamic parameters in set_config() calls. In the end this is a design error because is_dynamic could be fetched from the database instead allowing for easier changes of "dynamicness".

        Show
        bantu Andreas Fischer added a comment - As per https://www.phpbb.com/bugs/modteamtools/ticket.php?ticket_id=63314#post235228: Updating the is_dynamic value in the database is not sufficient in order to change the config value's "dynamicness". This is because you also have to update any is_dynamic parameters in set_config() calls. In the end this is a design error because is_dynamic could be fetched from the database instead allowing for easier changes of "dynamicness".

          People

          • Assignee:
            bantu Andreas Fischer
            Reporter:
            harmlessgoat22 harmlessgoat22
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development