Project

General

Profile

Actions

Bug #3052

closed

replacePrefix not working properly in some cases

Added by krileon about 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Target version:
Start date:
30 November 2011
Due date:
% Done:

100%

Estimated time:
2:00 h

Description

When using getTableStatus or getTableList it's failing to replace the prefix resulting in #__ instead of the prefix being sent with the query. This causes getTableStatus for example to return nothing. Confirmed by GJ 2.4 as it causes the check for GJ 1.8 database tables to always fail.


Files

3052.patch (827 Bytes) 3052.patch krileon, 30 November 2011 20:35
cb.database.php (37.9 KB) cb.database.php krileon, 30 November 2011 20:35
Actions #1

Updated by krileon about 13 years ago

Was able to confirm is due to the regex expecting something before the string. However, both those functions just pass the tablename and nothing else so the regex fails.

Updated by krileon about 13 years ago

This was only a problem when the beginning of $pattern started with #__, which is the case for getTableStatus. As there is nothing to lookbehind the regex fails. The proposed fix adds an OR case to see if the beginning of the string starts with #__ resolving the issue. Fix does not appear to have any adverse affects and confirmed it resolves GJs table check issue.

Actions #3

Updated by beat almost 13 years ago

Committed as proposed in r1658 .

Actions #4

Updated by beat almost 13 years ago

  • Status changed from Resolved to Closed
  • Target version set to CB 1.8
Actions #5

Updated by beat almost 13 years ago

  • Estimated time set to 2:00 h
Actions

Also available in: Atom PDF