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

Rewrite code for group permission checking so it doesn't use any temporary tables

    XMLWordPrintable

Details

    Description

      ... in eZContentObjectTreeNode::createPermissionCheckingSQL().

      Creating temporary tables consumes quite some time.

      Can be done with 1 additonal table and IN():

      FROM ... ezcontentobject_tree owner_cobjt ...
      WHERE
      ... ezcontentobject.owner_id=owner_cobjt.contentobject_id
      AND
      owner_cobjt.parent_node_id IN (" implode( ', ', $parentList ) ")
      

      or with 2 additional tables:

      FROM ... ezcontentobject_tree owner_cobjt, ezcontentobject_tree current_user_cobjt ...
      WHERE
      ... ezcontentobject.owner_id=owner_cobjt.contentobject_id
      AND
      owner_cobjt.parent_node_id = current_user_cobjt.parent_node_id AND
      current_user_cobjt.contentobject_id=" . $currentUserID . "
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: