Last change
on this file since 755 was
749,
checked in by toemon, 14 years ago
|
Database::getInstance()を使わずに、global $xoopsDB を使用する。(xoops3対策)
|
File size:
371 bytes
|
Rev | Line | |
---|
[744] | 1 | <?php
|
---|
| 2 | function is_wpdb_installed(){
|
---|
[749] | 3 | global $xoopsDB;
|
---|
[744] | 4 | $mydirname = basename(dirname( dirname( __FILE__ ) )) ;
|
---|
[749] | 5 |
|
---|
| 6 | $prefix_mod = $xoopsDB->prefix(preg_replace('/wordpress/','wp',$mydirname) . '_');
|
---|
[744] | 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.