[Frameworkspider-svn] spider-commit [76] DATAディレクトリ検索機能部分の不具合を修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 6月 25日 (木) 10:24:58 JST


Revision: 76
          http://sourceforge.jp/projects/frameworkspider/svn/view?view=rev&revision=76
Author:   m_nakashima
Date:     2009-06-25 10:24:58 +0900 (Thu, 25 Jun 2009)

Log Message:
-----------
DATAディレクトリ検索機能部分の不具合を修正
コマンド用メインファイルでspider_HttpRequestオブジェクトをグローバル生成するように追加
DoCoMo2.0のファイルがなかったらDoCoMo1.0を見るように定義を追加

Modified Paths:
--------------
    current/DATA/define.inc.php
    current/DATA/spider_command.inc.php
    current/WWW_PUBLIC/spider.inc.php


-------------- next part --------------
Modified: current/DATA/define.inc.php
===================================================================
--- current/DATA/define.inc.php	2009-06-17 05:06:47 UTC (rev 75)
+++ current/DATA/define.inc.php	2009-06-25 01:24:58 UTC (rev 76)
@@ -21,6 +21,7 @@
 $GLOBALS['SPIDER_USER_AGENT_CLASS_ALT_HASH']	= array(
 	'au'			=> 'docomo2',
 	'softbank'		=> 'docomo2',
+	'docomo2'		=> 'docomo',
 );
 // ユーザーエージェント正規表現による分岐タイプ 正規表現=>分類ID
 $GLOBALS['SPIDER_USER_AGENT_CLASS_REGX_HASH']	= array(

Modified: current/DATA/spider_command.inc.php
===================================================================
--- current/DATA/spider_command.inc.php	2009-06-17 05:06:47 UTC (rev 75)
+++ current/DATA/spider_command.inc.php	2009-06-25 01:24:58 UTC (rev 76)
@@ -33,6 +33,11 @@
 	die;
 }
 
+require_once( DIR_PATH_LIB
+	. DIRECTORY_SEPARATOR . "spider"
+	. DIRECTORY_SEPARATOR . "HttpRequest.class.php" );
+$GLOBALS['request']	= new spider_HttpRequest();
+
 mb_language('japanese');
 mb_internal_encoding('UTF-8');
 ob_start('mb_output_handler');

Modified: current/WWW_PUBLIC/spider.inc.php
===================================================================
--- current/WWW_PUBLIC/spider.inc.php	2009-06-17 05:06:47 UTC (rev 75)
+++ current/WWW_PUBLIC/spider.inc.php	2009-06-25 01:24:58 UTC (rev 76)
@@ -29,12 +29,26 @@
 		$rootPathLength	= 3;
 	}
 	while( strlen($targetDir) > $rootPathLength ) {
-		$DIR_PATH_SPIDER_DATA	= $targetDir.DIRECTORY_SEPARATOR.'DATA';
+		$DIR_PATH_SPIDER_DATA	= $targetDir.DIRECTORY_SEPARATOR.'spider';
 		if( is_dir( $DIR_PATH_SPIDER_DATA ) ) {
 			break;
+		} else {
+			$DIR_PATH_SPIDER_DATA	= null;
 		}
 		$targetDir	= dirname($targetDir);
 	}
+	if( is_null($DIR_PATH_SPIDER_DATA) ) {
+		$targetDir				= dirname(__FILE__);
+		while( strlen($targetDir) > $rootPathLength ) {
+			$DIR_PATH_SPIDER_DATA	= $targetDir.DIRECTORY_SEPARATOR.'DATA';
+			if( is_dir( $DIR_PATH_SPIDER_DATA ) ) {
+				break;
+			} else {
+				$DIR_PATH_SPIDER_DATA	= null;
+			}
+			$targetDir	= dirname($targetDir);
+		}
+	}
 	unset($targetDir);
 	unset($rootPathLength);
 	if( is_null( $DIR_PATH_SPIDER_DATA ) ) {



Frameworkspider-svn メーリングリストの案内
Back to archive index