Re: cvs: pear /MDB2 MDB2.php

From: Date: Sun, 16 Oct 2005 20:51:29 +0000
Subject: Re: cvs: pear /MDB2 MDB2.php
References: 1 2  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-35607@lists.php.net to get a copy of this message
Lorenzo Alberton wrote:
Lukas Smith wrote:
lsmith        Fri Oct 14 18:39:03 2005 EDT
  Modified files:                  /pear/MDB2    MDB2.php   Log:
- quote sequence name http://cvs.php.net/diff.php/pear/MDB2/MDB2.php?r1=1.128&r2=1.129&ty=u Index: pear/MDB2/MDB2.php diff -u pear/MDB2/MDB2.php:1.128 pear/MDB2/MDB2.php:1.129
--- pear/MDB2/MDB2.php:1.128    Fri Oct 14 17:21:48 2005
+++ pear/MDB2/MDB2.php    Fri Oct 14 18:39:02 2005
@@ -43,7 +43,7 @@ // | Author: Lukas Smith
<smith@pooteeweet.org>                           |
 // +----------------------------------------------------------------------+
// -// $Id: MDB2.php,v 1.128 2005/10/14 21:21:48 quipo Exp $ +// $Id: MDB2.php,v 1.129 2005/10/14 22:39:02 lsmith Exp $ // /** @@ -2388,8 +2388,8 @@
      */
     function getSequenceName($sqn)
     {
-        return sprintf($this->options['seqname_format'],
-            preg_replace('/[^a-z0-9_]/i', '_', $sqn));
+        return $this->quoteIdentifier(sprintf($this->options['seqname_format'],
+            preg_replace('/[^a-z0-9_]/i', '_', $sqn)));
     }
      // }}}
why? The method is called "getSequenceName", not "getQuotedSequenceName"... I'm gonna revert this one, please quote the seq name outside this method and only when needed.
Ok .. I had a bad gut feeling when I made the change, but lazyness took over .. So where do we want to quote? Do we want to quote in nextID() ? Aside from this all cases are manager related where we want to quote .. except for _isSequenceName() .. regards, Lukas

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