Changeset 474
- Timestamp:
- Dec 3, 2009, 3:36:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/include/onupdate.php
r462 r474 42 42 $site_url= XOOPS_URL."/modules/".$mydirname; 43 43 xpress_put_siteurl($mydirname,$site_url); 44 xpress_put_home($mydirname,$site_url); 45 44 $home = get_xpress_option($mydirname,'home'); 45 $home_check = 'home option is right'; 46 if (strcmp($site_url,$home) !== 0 ){ 47 if (!@fclose(@fopen($home . '/xoops_version.php', "r"))){ 48 xpress_put_home($mydirname,$site_url); 49 $home_check = 'Change home option $home to $site_url'; 50 } 51 } 52 $msgs[] = $home_check; 46 53 // XPressME orignal table update 47 54 $t_mess = xpress_table_make($module , $mydirname); … … 101 108 endif; 102 109 110 if( ! function_exists( 'get_xpress_option' ) ) { 111 function get_xpress_option($mydirname,$option_name){ 112 global $xoopsModule; 113 $wp_prefix = $mydirname; 114 if ($wp_prefix == 'wordpress'){ 115 $wp_prefix = 'wp'; 116 } 117 $xoopsDB =& Database::getInstance(); 118 $option_table = $xoopsDB->prefix($wp_prefix . '_options'); 119 120 $sql = "SELECT option_value FROM $option_table WHERE option_name = '" . $option_name . "'"; 121 122 $result = $xoopsDB->query($sql, 0, 0); 123 if ($xoopsDB->getRowsNum($result) > 0){ 124 $row = $xoopsDB->fetchArray($result); 125 return $row['option_value']; 126 } 127 return 0; 128 } 129 } 103 130 104 131 if( ! function_exists( 'xpress_message_append_onupdate' ) ) :
Note: See TracChangeset
for help on using the changeset viewer.