Stripping prefix from table name should only happen at start of string

Bug #1850749 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Unassigned
20.04
Fix Released
Medium
Unassigned
20.10
Fix Released
Medium
Unassigned

Bug Description

In case the prefix also matches another part of table name we should explicitly indicate removing it from the beginning of the string - as a prefix can only be at the beginning

Robert Lyon (robertl-9)
Changed in mahara:
status: New → Confirmed
milestone: none → 19.10.1
milestone: 19.10.1 → 20.04.0
status: Confirmed → In Progress
Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :
no longer affects: mahara/19.10
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/10549
Committed: https://git.mahara.org/mahara/mahara/commit/207353c46bd24e0d6c22efb0da42c3e9998966bd
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 207353c46bd24e0d6c22efb0da42c3e9998966bd
Author: Robert Lyon <email address hidden>
Date: Thu Oct 31 18:50:05 2019 +1300

Bug 1850749: Should strip prefix from start of table name

In case the prefix matches part of core table name itself

And we also need to remove 'dbprefix' in
the function 'get_table_from_query'
instead of removing it in 'pseudo_trigger' and 'table_need_trigger'

behatnotneeded

Change-Id: Ic3726e0aa8b85a038f0bb6297c7e0f5667776572
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "20.04_STABLE" branch: https://reviews.mahara.org/11117

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/11117
Committed: https://git.mahara.org/mahara/mahara/commit/59dc96a65ac59eac28d09d6855c448ba65b6f100
Submitter: Robert Lyon (<email address hidden>)
Branch: 20.04_STABLE

commit 59dc96a65ac59eac28d09d6855c448ba65b6f100
Author: Robert Lyon <email address hidden>
Date: Thu Oct 31 18:50:05 2019 +1300

Bug 1850749: Should strip prefix from start of table name

In case the prefix matches part of core table name itself

And we also need to remove 'dbprefix' in
the function 'get_table_from_query'
instead of removing it in 'pseudo_trigger' and 'table_need_trigger'

behatnotneeded

Change-Id: Ic3726e0aa8b85a038f0bb6297c7e0f5667776572
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 207353c46bd24e0d6c22efb0da42c3e9998966bd)

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 20.10.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.