[xoops-cvslog 3218] CVS update: xoops2jp/html/modules/base/actions

Back to archive index

Minahito minah****@users*****
2006年 5月 29日 (月) 13:51:51 JST


Index: xoops2jp/html/modules/base/actions/SearchAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/actions/SearchAction.class.php:1.1.2.1
--- /dev/null	Mon May 29 13:51:51 2006
+++ xoops2jp/html/modules/base/actions/SearchAction.class.php	Mon May 29 13:51:51 2006
@@ -0,0 +1,44 @@
+<?php
+
+if (!defined('XOOPS_ROOT_PATH')) exit();
+
+require_once XOOPS_MODULE_PATH . "/base/actions/SearchResultsAction.class.php";
+require_once XOOPS_MODULE_PATH . "/base/forms/SearchResultsForm.class.php";
+
+class Legacy_SearchAction extends Legacy_SearchResultsAction
+{
+	function getDefaultView(&$controller, &$xoopsUser)
+	{
+		$this->_makeModuleList($xoopsUser);
+		
+		return LEGACY_FRAME_VIEW_INDEX;
+	}
+	
+	function _getSelectedMids()
+	{
+		$ret = array();
+		foreach(array_keys($this->mModules) as $key) {
+			$ret[] = $this->mModules[$key]->get('mid');
+		}
+		
+		return $ret;
+	}
+	
+	function executeViewIndex(&$controller, &$xoopsUser, &$render)
+	{
+		$render->setTemplateName("legacy_search_form.html");
+	
+		$render->setAttribute('actionForm', $this->mActionForm);
+			
+		$render->setAttribute('moduleArr', $this->mModules);
+
+		//
+		// If the request include $mids, setAttribute it. If it don't include, 
+		// setAttribute $mid or $this->mModules.
+		//		
+		$render->setAttribute('selectedMidArr', $this->_getSelectedMids());
+		$render->setAttribute('searchRuleMessage', @sprintf(_SR_KEYTOOSHORT, $this->mConfig['keyword_min']));
+	}
+}
+
+?>


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