Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-9628

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0.8-RC1
    • 3.0.7-PL1
    • Update system
    • None

      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.

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

              Created:
              Updated:
              Resolved: