[xoops-cvslog 2398] CVS update: xoops2jp/html/modules/base/class

Back to archive index

Minahito minah****@users*****
2006年 3月 15日 (水) 19:20:21 JST


Index: xoops2jp/html/modules/base/class/Legacy_Validator.class.php
diff -u /dev/null xoops2jp/html/modules/base/class/Legacy_Validator.class.php:1.1.2.1
--- /dev/null	Wed Mar 15 19:20:21 2006
+++ xoops2jp/html/modules/base/class/Legacy_Validator.class.php	Wed Mar 15 19:20:21 2006
@@ -0,0 +1,24 @@
+<?php
+
+require_once XOOPS_ROOT_PATH . "/class/XCube_Validator.class.php";
+
+class XCube_ObjectExistValidator extends XCube_Validator
+{
+	function isValid(&$form, $vars)
+	{
+		if ($form->isNull()) {
+			return true;
+		}
+		else {
+			$handleName = $vars['handler'];
+			$moduleName = isset($vars['module']) ? $vars['module'] : null;
+			
+			$handler =& xoops_getmodulehandler($handleName);
+			$obj =& $handler->get($form->getValue());
+			
+			return is_object($obj);
+		}
+	}
+}
+
+?>
\ No newline at end of file


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