[xoops-cvslog 215] CVS update: xoops2jp/html/class

Back to archive index

Minahito minah****@users*****
2005年 6月 28日 (火) 20:09:57 JST


Index: xoops2jp/html/class/criteria.php
diff -u xoops2jp/html/class/criteria.php:1.2.6.1.2.1 xoops2jp/html/class/criteria.php:1.2.6.1.2.2
--- xoops2jp/html/class/criteria.php:1.2.6.1.2.1	Mon Jun 27 23:43:30 2005
+++ xoops2jp/html/class/criteria.php	Tue Jun 28 20:09:57 2005
@@ -1,5 +1,5 @@
 <?php
-// $Id: criteria.php,v 1.2.6.1.2.1 2005/06/27 14:43:30 minahito Exp $
+// $Id: criteria.php,v 1.2.6.1.2.2 2005/06/28 11:09:57 minahito Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -339,7 +339,7 @@
      * @return  string
      **/
     function render() {
-        if (is_numeric($this->value) || in_array(strtoupper($this->operator), array('IN', 'NOT IN'))) {
+        if (in_array(strtoupper($this->operator), array('IN', 'NOT IN'))) {
             $value = $this->value;
         } else {
             if ( '' === ($value = trim($this->value)) ) {
@@ -379,27 +379,4 @@
     }
 }
 
-/**
- * @Deprecated
- */
-class CriteriaString extends Criteria {
-    function render() {
-        if (is_numeric($this->value) || in_array(strtoupper($this->operator), array('IN', 'NOT IN'))) {
-            $value = "'".$this->value."'";
-        } else {
-            if ( '' === ($value = trim($this->value)) ) {
-                return '';
-            }
-            if ( (substr($value, 0, 1) != '`') && (substr($value, -1) != '`') ) {
-                $value = "'$value'";
-            }
-        }
-        $clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column;
-        if ( !empty($this->function) ) {
-            $clause = sprintf($this->function, $clause);
-        }
-        $clause .= " {$this->operator} $value";
-        return $clause;
-    }
-}
 ?>


xoops-cvslog メーリングリストの案内
Back to archive index