Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-13937

avatar driver get config name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 3.1.8-RC1
    • 3.1.4
    • Extensions
    • None

      Currently if one tries to create custom avatar driver in an extension, \phpbb\avatar\manager::get_driver_config_name() results in something like allow_avatar_vendor\avatardb\driver\db , which means the config value it would like to store in the database contains slashes, which isn't ideal.

      the get_driver_config_name() method uses this regex to remove the driver name prefix ^phpbb\avatar\driver, but it should also replace all non-alphanumeric characters with spaces, or at least allow drivers to define their own custom name (something like get_name(), but used for config). Or at the very least string replace "\" with "_".

      There is no real way to work around this as get_enabled_drivers() calls it as well, so even if the extension event cleaned up the config name, it still wouldn't enable the avatar driver.

            nicofuma nicofuma
            rfdy rfdy [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: