Active
Project:
OG Teampage
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Apr 2008 at 16:50 UTC
Updated:
27 Apr 2008 at 17:19 UTC
Jump to comment: Most recent file
The db_query calls aren't using printf syntax. One of the effects of this is including any apostrophes in the member descriptions causes a DB error. I fixed this one by changing:
$res = db_query("INSERT INTO {og_teampage_members} SET weight='".$value['weight']."', uid='".$uid."', gid='".$gid."', hidden='".$value['hidden']."', name='".$value['name']."', description='".$value['description']."', picture1='".$newfilename."'");
in og_teampage_admin_members_form_submit to:
$res = db_query("INSERT INTO {og_teampage_members} SET weight=%d, uid=%d, gid=%d, hidden=%d, name='%s', description='%s', picture1='%s'",
$value['weight'], $uid, $gid, $value['hidden'], $value['name'], $value['description'], $newfilename);
These changes should be made in general throughout the module. I might have time to do this later...
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | og_teampage_db_query_repairs.patch | 5.67 KB | gcassie |
Comments
Comment #1
gcassie commentedHere's a patch that I think catches them all.