Missing use of db_prefix

Xen.dk - February 9, 2008 - 15:45
Project:Comment Notify
Version:5.x-1.4
Component:Code
Category:bug report
Priority:normal
Assigned:greggles
Status:closed
Description

In comment_notify_page:

<?php
      db_query
("UPDATE {comments} c, users u                                   
          SET c.notify = 0
          WHERE u.uid = c.uid                                                    
          AND md5(concat(c.mail, ifnull(u.mail, u.init), c.uid, c.name, c.nid))\
= '%s'"
,
       
$arg
     
);
?>

it should be "UPDATE {comments} c, {users} u" in order for the tables to be prefixed properly.

#1

greggles - February 12, 2008 - 21:12
Assigned to:Anonymous» greggles
Status:active» patch (code needs review)

How does this look?

AttachmentSize
db_prefix_219677.patch775 bytes

#2

greggles - February 12, 2008 - 22:42
Status:patch (code needs review)» fixed

xen commented that it looked fine in IRC so I've committed this.

#3

Xen.dk - February 12, 2008 - 22:45

Hear hear. I looked long and hard at it, and can't see any possibility for error..

#4

Anonymous (not verified) - February 26, 2008 - 22:51
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.