Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-18545

[patch] ezmultiupload handlers can't return errors or pick nodes

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Medium Medium
    • None
    • None
    • None
    • Operating System: Linux
      PHP Version: 5.2.11
      Database and version: MySQL 5.0.84
      Browser (and version): Firefox 3.6.18

    Description

      There's a bug that causes the $result parameter to be passed by value, not by reference, which means that any errors set by the handlers are not seen by the core code.

      Additionally, the core code does not allow the handlers to pick which node the uploaded file should be saved in, either as parent node for a new node or as an existing node to save the file in. (We need this for a client.) In fact, it doesn't even tell the handlers which parent node will be used.

      This patch addresses these issues by fixing the pass-by-value bug and adding two keys to the $result variable that is being passed around to the handlers, one for the parent node ID and the other for the existing node parameter (defaulting to false, for BC).

      Steps to reproduce

      Set up an eZP site with ezmultiupload, and create an ezmultiuploadhandler that wants to reuse existing nodes and needs to know where the file is being uploaded to. Notice that this is blocked by the current code. Make the handler set an error, and see that this is ignored by the core despite code that appears to protect against that.

      Attachments

        Activity

          People

            unknown unknown
            edorfaus edorfaus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: