Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-2205

Improve handling of plugin filetypes

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • None
    • None
    • Import/Export
    • Medium

    Description

      In IndexController::pluginpublicAction is a list of filetypes.
      The basic filetypes are:

      'js' => 'text/javascript',
      'css' => 'text/css',
      'jpg' => 'image/jpeg',
      'png' => 'image/png',
      'gif' => 'image/gif',

      With VisualReview some additionals are added:

      'svg' => 'image/svg',
      'woff' => 'application/woff',
      'woff2' => 'application/woff2',
      'ttf' => 'application/ttf',
      'eot' => 'application/eot',
      'html'=> 'text/html'

      Also was added a new plugin functionality

      $this->addPublicFileTypes('image/svg');
      $this->addPublicFileTypes('application/woff');
      $this->addPublicFileTypes('application/woff2');
      $this->addPublicFileTypes('application/ttf');
      $this->addPublicFileTypes('application/eot');

      which is used in VisualReview_Init::init method.

      Both ways should be combined, that means in IndexController::pluginpublicAction the additional types should NOT be added anymore.
      But they should come from a plugin internal list (either static in abstract_plugin or from plugin manager) since they were added with the addPublicFileTypes calls there anyway.

      Attachments

        Activity

          People

            aleksandar Aleksandar Mitrev
            tlauria Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: