[xoops-cvslog 3609] CVS update: xoops2jp/html/modules/base/kernel

Back to archive index

Minahito minah****@users*****
2006年 7月 19日 (水) 19:17:35 JST


Index: xoops2jp/html/modules/base/kernel/Legacy_ContentManager.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_ContentManager.class.php:1.1.2.2 xoops2jp/html/modules/base/kernel/Legacy_ContentManager.class.php:removed
--- xoops2jp/html/modules/base/kernel/Legacy_ContentManager.class.php:1.1.2.2	Tue Mar 28 22:30:15 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_ContentManager.class.php	Wed Jul 19 19:17:35 2006
@@ -1,77 +0,0 @@
-<?php
-
-if (!defined('XOOPS_ROOT_PATH')) exit();
-
-require_once XOOPS_ROOT_PATH."/kernel/XCube_Content.class.php";
-
-/**
- * WARNING : THIS IS TEST CLASS
- *
- * @see XCube_ContentObjectManager
- */
-class Legacy_ContentManager extends XCube_ContentObjectManager
-{
-	function fetchContent($modId,$className,$dataId)
-	{
-		$db=&$this->mRoot->mController->getDB();
-
-		$table=$db->prefix("legacy_contents");
-		
-		$strFlag=false;
-
-		if(is_int($dataId)) {
-			$sql="SELECT * FROM ${table} WHERE mod_id=? AND class_name=? AND data_id=?";
-			$db->prepare($sql);
-			$db->bind_param("isi",$modId,$className,$dataId);
-		}
-		else {
-			$sql="SELECT * FROM ${table} WHERE mod_id=? AND class_name=? AND data_str_id=?";
-			$db->prepare($sql);
-			$db->bind_param("iss",$modId,$className,$dataId);
-			$strFlag=true;
-		}
-
-		$result=$db->execute();
-		if(!$result) {
-			die("You can not access to content manage data resource.");
-		}
-
-		if($row=$db->fetchArray($result)) {
-			if($strFlag) {
-				$ret=new XCube_ContentObject($row['id'],$row['mod_id'],$row['class_name'],$row['data_str_id']);
-			}
-			else {
-				$ret=new XCube_ContentObject($row['id'],$row['mod_id'],$row['class_name'],$row['data_id']);
-			}
-
-			return $ret;
-		}
-
-		//
-		// Because we can't get content id, we have to register this parameter
-		// to object manager. 
-		//
-		// TODO the follow process depends on mysql database.
-		//
-
-		if($strFlag) {
-			$db->prepare("INSERT INTO ${table} ( mod_id, class_name, data_str_id ) VALUES ( ?, ?, ? )");
-			$db->bind_param("iss",$modId,$className,$dataId);
-		}
-		else {
-			$db->prepare("INSERT INTO ${table} ( mod_id, class_name, data_id ) VALUES ( ?, ?, ? )");
-			$db->bind_param("isi",$modId,$className,$dataId);
-		}
-
-		$result=$db->executeF();
-		if(!$result) {
-			die("OH MY GOD");
-		}
-
-		$ret = new XCube_ContentObject($db->getInsertId(),$modId,$className,$dataId);
-
-		return $ret;
-	}
-}
-
-?>
\ No newline at end of file


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