install ignores system-wide table prefix

guidot - August 26, 2007 - 14:07
Project:Path Access
Version:5.x-1.1
Component:Code
Category:bug report
Priority:critical
Assigned:budda
Status:closed
Description

My install of Drupal uses a table prefix, which path_access_install() ignores. Instead of creating a table called myprefix_path_access it just created path_access, which lead to "Table drupal.myprefix_path_access doesn't exist"-errors.

I'm not into programming, but in comparison to other modules, i changed line 10 of path_access.install from

         db_query("CREATE TABLE `path_access` (    

to
         db_query("CREATE TABLE if not exists {path_access} (    

(I found the additional if not exists in other install-routines and think it is a good idea to check whether the table already exists or not bevor trying to create it.)

With that change the install went as expected.

Once I have figured out how to create a patch-file I'm gonna add it.

#1

budda - August 27, 2007 - 12:38
Assigned to:Anonymous» budda

Thanks for the notice. Don't know how that slipped through ;-)

No need for a patch file, i can amend the code based on your comments fine. Cheers!

#2

budda - August 27, 2007 - 13:51
Status:active» fixed

Fixed in CVS dev.

#3

Anonymous - September 10, 2007 - 14:01
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.