source:
branches/Ver3.0/xpressme_integration_kit/include/wp_check.php
@
744
Last change on this file since 744 was 744, checked in by toemon, 14 years ago | |
---|---|
File size: 392 bytes |
Line | |
---|---|
1 | <?php |
2 | function is_wpdb_installed(){ |
3 | $mydirname = basename(dirname( dirname( __FILE__ ) )) ; |
4 | $prefix_mod = XOOPS_DB_PREFIX .'_' . preg_replace('/wordpress/','wp',$mydirname) . '_'; |
5 | $xoopsDB =& Database::getInstance(); |
6 | $sql = "SHOW TABLES LIKE '$prefix_mod%'"; |
7 | if ($result = $xoopsDB->queryf($sql)){ |
8 | if($xoopsDB->getRowsNum($result)) return true; |
9 | } |
10 | return false; |
11 | } |
Note: See TracBrowser
for help on using the repository browser.