From d0746644f08e2b9055832dcf098520773af017f2 Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 17 Mar 2011 00:04:30 +0000 Subject: fix strict semantic --- weave_storage.php | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/weave_storage.php b/weave_storage.php index c82873d..d02aae8 100644 --- a/weave_storage.php +++ b/weave_storage.php @@ -203,15 +203,15 @@ class WeaveStorage values (:username, :id, :collection, :parentid, :predecessorid, :sortindex, :modified, :payload, :payload_size, :depth)'; $sth = $this->_dbh->prepare($insert_stmt); $sth->bindParam(':username', $this->_username); - $sth->bindParam(':id', $wbo->id()); - $sth->bindParam(':collection', $wbo->collection()); - $sth->bindParam(':parentid', $wbo->parentid()); - $sth->bindParam(':predecessorid', $wbo->predecessorid()); - $sth->bindParam(':depth', $wbo->depth()); - $sth->bindParam(':sortindex', $wbo->sortindex()); - $sth->bindParam(':modified', $wbo->modified()); - $sth->bindParam(':payload', $wbo->payload()); - $sth->bindParam(':payload_size', $wbo->payload_size()); + $id=$wbo->id();$sth->bindParam(':id', $id); + $col=$wbo->collection();$sth->bindParam(':collection', $coll); + $parent=$wbo->parentid();$sth->bindParam(':parentid', $parent); + $pred=$wbo->predecessorid();$sth->bindParam(':predecessorid', $pred); + $depth=$wbo->depth();$sth->bindParam(':depth', $depth); + $sort=$wbo->sortindex();$sth->bindParam(':sortindex', $sort); + $modif=$wbo->modified();$sth->bindParam(':modified', $modif); + $payload=$wbo->payload();$sth->bindParam(':payload', $payload); + $size=$wbo->payload_size();$sth->bindParam(':payload_size', $size); $sth->execute(); @@ -674,7 +674,8 @@ class WeaveStorage $sth = $this->_dbh->prepare($create_statement); $sth->bindParam(':username', $username); - $sth->bindParam(':md5', md5($password)); + $hash = md5($password); + $sth->bindParam(':md5', $hash); $sth->execute(); } catch( PDOException $exception ) @@ -693,7 +694,8 @@ class WeaveStorage $sth = $this->_dbh->prepare($update_statement); $sth->bindParam(':username', $username); - $sth->bindParam(':md5', md5($password)); + $hash = md5($password); + $sth->bindParam(':md5', $hash); $sth->execute(); } catch( PDOException $exception ) @@ -711,7 +713,8 @@ class WeaveStorage $select_stmt = 'select username from users where username = :username and md5 = :md5'; $sth = $this->_dbh->prepare($select_stmt); $sth->bindParam(':username', $this->_username); - $sth->bindParam(':md5', md5($password)); + $hash = md5($password); + $sth->bindParam(':md5', $hash); $sth->execute(); } catch( PDOException $exception ) @@ -784,4 +787,4 @@ end; } - ?> \ No newline at end of file + ?> -- cgit v1.2.3