XPressME Integration Kit

Trac

source: branches/Ver3.0/xpressme_integration_kit/include/wp_check.php @ 749

Last change on this file since 749 was 749, checked in by toemon, 13 years ago

Database::getInstance()を使わずに、global $xoopsDB を使用する。(xoops3対策)

File size: 371 bytes
Line 
1<?php
2        function is_wpdb_installed(){
3                global $xoopsDB;
4                $mydirname = basename(dirname( dirname( __FILE__ ) )) ;
5               
6                $prefix_mod = $xoopsDB->prefix(preg_replace('/wordpress/','wp',$mydirname) . '_');
7                $sql = "SHOW TABLES LIKE '$prefix_mod%'";
8                if ($result = $xoopsDB->queryf($sql)){
9                        if($xoopsDB->getRowsNum($result))  return true;
10                }
11                return false;
12        }
Note: See TracBrowser for help on using the repository browser.