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

アーカイブの一覧に戻る

Minahito minah****@users*****
2005年 12月 28日 (水) 22:55:22 JST


Index: xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php
diff -u xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php:1.1.2.2 xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php:1.1.2.3
--- xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php:1.1.2.2	Mon Nov 28 22:44:32 2005
+++ xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php	Wed Dec 28 22:55:21 2005
@@ -95,6 +95,33 @@
 				}
 			}
 		}
+		
+		//
+		// Search help
+		//
+		if ($this->mAdaptee->hasHelp()) {
+			$root =& XCube_Root::getSingleton();
+			$language = $root->mController->getConfig('language');
+			$helpfile = $this->mAdaptee->getHelp();
+			$dir = XOOPS_MODULE_PATH . "/" . $this->mAdaptee->getVar('dirname') . "/language/" . $language;
+
+			if (!file_exists($dir . "/" . $helpfile)) {
+				$dir = XOOPS_MODULE_PATH . "/" . $this->mAdaptee->getVar('dirname') . "/language/" . $language;
+					if (!file_exists($dir . "/" . $helpfile)) {
+						return;
+					}
+			}
+			$lines = file($dir . "/" . $helpfile);
+			foreach ($lines as $line) {
+				foreach($eventArgs->getKeywords() as $word) {
+					if (strpos($line, $word) !== false) {
+						$url = XOOPS_MODULE_URL . "/base/admin/index.php?action=Help&dirname=" . $this->mAdaptee->getVar('dirname');
+						$eventArgs->addRecord($this->mAdaptee->getVar('name'), $url, _HELP);
+						return;
+					}
+				}
+			}
+		}
 	}
 }
 


xoops-cvslog メーリングリストの案内
アーカイブの一覧に戻る