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

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

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.7-PL1
    • Fix Version/s: 3.0.8-RC1
    • Component/s: Update system
    • Labels:
      None

      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
                Reporter:
                nickvergessen Joas Schilling
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: