XPressME Integration Kit

Trac

Changeset 357


Ignore:
Timestamp:
Aug 4, 2009, 9:11:32 AM (15 years ago)
Author:
toemon
Message:

システム情報の「XPressMEがXOOPSより取得した設定値」が設定値の取得エラーを検出できないバグ修正 fixes #198

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/class/config_from_xoops.class.php

    r331 r357  
    6262        $this->xp_config_file_path = $this->module_path . '/xp-config.php'; 
    6363         
     64        // start /admin/index.php page detect 
     65        $php_script_name = $_SERVER['SCRIPT_NAME']; 
     66                $php_query_string = $_SERVER['QUERY_STRING']; 
     67                $admin_page =   basename(dirname(dirname(__FILE__))) . '/admin/index.php'; 
     68                $is_xoops_module_admin = false; 
     69                if (strstr($php_script_name,$admin_page) !== false) $is_xoops_module_admin = true; 
     70                if (strstr($php_query_string,$admin_page) !== false) $is_xoops_module_admin = true; 
     71        // end of /admin/index.php page detect 
     72         
    6473        if (file_exists($this->xp_config_file_path)){   // file exists xp-config.php 
    6574                $this->_get_value_by_xp_config_file(); 
    66         } else if (defined('XOOPS_MAINFILE_INCLUDED')){ // loaded XOOPS mainfile.php 
     75        }else if (defined('XOOPS_MAINFILE_INCLUDED') && !$is_xoops_module_admin){ // loaded XOOPS mainfile.php 
    6776                $this->_get_value_by_xoops_define(); 
    6877        } else {  // A set value is acquired from mainfile.php by the pattern match. 
Note: See TracChangeset for help on using the changeset viewer.