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

Back to archive index

Minahito minah****@users*****
2005年 6月 27日 (月) 23:43:30 JST


Index: xoops2jp/html/class/criteria.php
diff -u xoops2jp/html/class/criteria.php:1.2.6.1 xoops2jp/html/class/criteria.php:1.2.6.1.2.1
--- xoops2jp/html/class/criteria.php:1.2.6.1	Sat May 28 08:03:33 2005
+++ xoops2jp/html/class/criteria.php	Mon Jun 27 23:43:30 2005
@@ -1,5 +1,5 @@
 <?php
-// $Id: criteria.php,v 1.2.6.1 2005/05/27 23:03:33 onokazu Exp $
+// $Id: criteria.php,v 1.2.6.1.2.1 2005/06/27 14:43:30 minahito Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -378,4 +378,28 @@
         return empty($cond) ? '' : "WHERE $cond";
     }
 }
+
+/**
+ * @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