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

Add module function does not correctly insert a module after the specified one

    XMLWordPrintable

    Details

      Description

      As per title.

      Reason:

      			$sql = 'SELECT COUNT(module_id) as num_modules
      				FROM ' . MODULES_TABLE . "
      				WHERE module_class = '" . $db->sql_escape($module_data['class']) . "'
      					AND parent_id = {$parent_id}
      					AND left_id BETWEEN {$first_left_id} AND {$module_row['left_id']}
      				GROUP BY left_id
      				ORDER BY left_id";


      The modules are grouped by left_id so num_modules is always one (hopefully), but the number of rows is the actual value we'd like to know. Removing the GROUP BY resolves the issue.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nickvergessen Joas Schilling [X] (Inactive)
              Reporter:
              nickvergessen Joas Schilling [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: