cvs: php4 /pear DB.php

From: Date: Wed, 11 Jul 2001 11:03:27 +0000
Subject: cvs: php4 /pear DB.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-257@lists.php.net to get a copy of this message
cox Wed Jul 11 07:03:27 2001 EDT Modified files: /php4/pear DB.php Log: added LOCK/UNLOCK to mainps queries (reported by Erik Hjortsberg) Index: php4/pear/DB.php diff -u php4/pear/DB.php:1.67 php4/pear/DB.php:1.68 --- php4/pear/DB.php:1.67 Tue Jul 10 17:49:51 2001 +++ php4/pear/DB.php Wed Jul 11 07:03:27 2001 @@ -17,7 +17,7 @@ // | Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: DB.php,v 1.67 2001/07/10 21:49:51 cox Exp $ +// $Id: DB.php,v 1.68 2001/07/11 11:03:27 cox Exp $ // // Database independent query interface. // @@ -297,7 +297,9 @@ */ function isManip($query) { - if (preg_match('/^\s*"?(INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|ALTER|GRANT|REVOKE)\s+/i', $query)) { + $manips = 'INSERT|UPDATE|DELETE|'.'REPLACE|CREATE|DROP|'. + 'ALTER|GRANT|REVOKE|'.'LOCK|UNLOCK'; + if (preg_match('/^\s*"?('.$manips.')\s+/i', $query)) { return true; } return false;

« previous php.pear.cvs (#257) next »