PHP4 Compatablity

bobsomebody - September 3, 2007 - 17:31
Project:User Handshakes
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:bobsomebody
Status:closed
Description

My public host still uses PHP4.... grrr... so i made User Handshakes PHP4 Compatible for you :) It seems to work, though its not 100% tested, please review. Most of the changes had to do with $iusername, $ausername, and $username being listed like:

$username = db_fetch_object(db_query("SELECT name FROM {users} WHERE uid = %d", $uid))->name;

my "fix" was simple,

$username = db_fetch_object(db_query("SELECT name FROM {users} WHERE uid = %d", $uid));
$username = $username->name;

There was a couple other places in the menu where this got a little confusing, but i got all the errors removed from it for PHP4 while maintaining the functionality as far as i can tell. I will be doing further extensive testing later and post a new patch if i find one is needed.

Search the string "//PHP4 Modified:" to find my changes, theres about 15-25 i think, I didn't bother to count, but i flagged my changes for you.

#1

bobsomebody - September 3, 2007 - 17:42

sorry it didnt attach the file on the first go around :P

AttachmentSize
nf_handshake.module.txt 159.79 KB

#2

rconstantine - September 3, 2007 - 18:11
Status:needs review» duplicate

see http://drupal.org/node/167191

I just haven't had a chance to upload it yet. Will get to it soon.

#3

rconstantine - September 3, 2007 - 18:13
Status:duplicate» reviewed & tested by the community

oops, nevermind. i see i missed a couple that you got.

#4

rconstantine - September 3, 2007 - 18:22
Status:reviewed & tested by the community» fixed

done and uploaded. look for next dev after cron runs.

#5

Anonymous - September 17, 2007 - 18:32
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.