Changeset 757 for branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php
- Timestamp:
- May 23, 2011, 3:03:57 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php
r658 r757 1 1 <?php 2 global $ xoops_config;3 if (!is_object($ xoops_config)){ // is call other modules4 require_once dirname(dirname(dirname(dirname(dirname( __FILE__ ))))) .'/class/ config_from_xoops.class.php' ;5 $ xoops_config= new ConfigFromXoops;2 global $modInfo; 3 if (!is_object($modInfo)){ // is call other modules 4 require_once dirname(dirname(dirname(dirname(dirname( __FILE__ ))))) .'/class/modInfoClass.php' ; 5 $modInfo = new ConfigFromXoops; 6 6 } 7 7 … … 14 14 global $xoops_db; 15 15 16 $modules_db = get_xoops_prefix() . 'modules'; 16 $module_handler =& xoops_gethandler('module'); 17 $module =& $module_handler->getByDirname($mydirname); 18 $moduleID = $module->getVar('mid'); 19 17 20 $config_db = get_xoops_prefix() . 'config'; 18 19 $moduleID = $xoops_db->get_var("SELECT mid FROM $modules_db WHERE dirname = '$module_dir'");20 21 if (empty($moduleID)) return null; 21 22 $conf_value = $xoops_db->get_var("SELECT conf_value FROM $config_db WHERE (conf_modid = $moduleID) AND (conf_name = '$config_name')"); … … 46 47 function get_xoops_prefix() 47 48 { 48 global $ xoops_config;49 $ret = $xoops_config->xoops_db_prefix . '_';49 global $modInfo; 50 $ret = $modInfo->get_xoops_db_prefix(); 50 51 return $ret; 51 52 } … … 53 54 function get_xoops_trust_path() 54 55 { 55 global $ xoops_config;56 $ret =$ xoops_config->xoops_trust_path;56 global $modInfo; 57 $ret =$modInfo->get_xoops_trust_path(); 57 58 return $ret; 58 59 } … … 60 61 function get_xoops_root_path() 61 62 { 62 global $ xoops_config;63 $ret =$ xoops_config->xoops_root_path;63 global $modInfo; 64 $ret =$modInfo->get_xoops_root_path(); 64 65 return $ret; 65 66 } … … 72 73 function get_xoops_url() 73 74 { 74 global $ xoops_config;75 $ret =$ xoops_config->xoops_url;75 global $modInfo; 76 $ret =$modInfo->get_xoops_url() ; 76 77 return $ret; 77 78 } … … 79 80 function get_xpress_url() 80 81 { 81 global $ xoops_config;82 $ret =$ xoops_config->module_url;82 global $modInfo; 83 $ret =$modInfo->get_module_url() ; 83 84 return $ret; 84 85 } … … 86 87 function get_xpress_modid() 87 88 { 88 global $xoops_db; 89 90 $modulename = get_xpress_dir_name(); 91 $sql = "SELECT mid FROM " . get_xoops_prefix() . "modules WHERE dirname = '$modulename'"; 92 $mid = $xoops_db->get_var($sql); 93 return $mid; 89 global $modInfo; 90 91 $modulename = get_xpress_dir_name(); 92 $mid = $modInfo->get_moduleID_ByDirname($modulename); 93 return $mid; 94 94 } 95 95 … … 369 369 function get_block_file_path($mydirname,$file_name) 370 370 { 371 global $ xoops_config, $xpress_config;372 $mydirpath = $ xoops_config->xoops_root_path. '/modules/' . $mydirname;371 global $modInfo, $xpress_config; 372 $mydirpath = $modInfo->get_xoops_root_path() . '/modules/' . $mydirname; 373 373 $select_theme = xpress_ThemeTemplate(get_xpress_theme_name($mydirname)); 374 374 $xpress_default_theme = 'xpress_default';
Note: See TracChangeset
for help on using the changeset viewer.