|
From: FlorinCB <ory...@us...> - 2008-09-04 20:55:37
|
Update of /cvsroot/mxbb/mx_music/music_box/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23850 Modified Files: music_integration.php Log Message: mod_rewrite support added Index: music_integration.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/includes/music_integration.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** music_integration.php 29 Jan 2008 07:51:05 -0000 1.2 --- music_integration.php 4 Sep 2008 20:55:33 -0000 1.3 *************** *** 41,69 **** - // MX add-on // Generate paths for page and standalone mode // ...function based on original function written by Markus :-) ! function this_mo_mxurl($args = '', $force_standalone_mode = false) { ! global $mx_root_path, $phpbb_root_path, $module_root_path, $page_id, $music_index, $phpEx, $integration_enabled, $is_block; ! ! if( $force_standalone_mode || !$is_block ) ! { ! $mxurl = ( !MXBB_MODULE ) ? $phpbb_root_path . 'music.' . $phpEx . ($args == '' ? '' : '?' . $args) : $mx_root_path . 'modules/mx_music/' . 'music.' . $phpEx . ($args == '' ? '' : '?' . $args); ! } ! else { ! $mxurl = $mx_root_path . 'index.' . $phpEx; ! if( is_numeric($page_id) && !empty($page_id) ) { ! $mxurl .= '?page=' . $page_id . ($args == '' ? '' : '&' . $args); } else { ! $mxurl .= '?page=' . $music_index . ($args == '' ? '' : '&' . $args); } } - return $mxurl; } --- 41,93 ---- // MX add-on // Generate paths for page and standalone mode // ...function based on original function written by Markus :-) ! // This has mod_rewrite disabled ! if (!function_exists('this_mo_mxurl')) { ! function this_mo_mxurl($args = '', $force_standalone_mode = false, $new_pageid = '') { ! global $mx_root_path, $phpbb_root_path, $module_root_path, $mx_request_vars; ! global $music_index, $phpEx, $integration_enabled, $is_block, $mx_mod_rewrite; ! ! if (!$mx_request_vars->is_empty_request('dynamic_block')) { ! $dynamic_block = $mx_request_vars->request('dynamic_block', MX_TYPE_INT, ''); ! } ! elseif (!$mx_request_vars->is_empty_get('dynamic_block')) ! { ! $dynamic_block = $mx_request_vars->get('dynamic_block', MX_TYPE_INT, 0); ! } ! { ! $dynamic_block = ''; ! } ! ! $pageid = ($new_pageid) ? intval($new_pageid) : $mx_request_vars->request('page', MX_TYPE_INT, 1); ! ! $args .= ($args == '' ? '' : '&' ) . 'modrewrite=no'; ! ! $dynamicId = !empty($dynamic_block) ? ( $non_html_amp ? '&dynamic_block=' : '&dynamic_block=' ) . $dynamic_block : ''; ! ! ! if( $force_standalone_mode || !$is_block ) ! { ! $mxurl = ( !MXBB_MODULE ) ? $phpbb_root_path . 'music.' . $phpEx . ($args == '' ? '' : '?' . $args) : $mx_root_path . 'modules/mx_music/' . 'music.' . $phpEx . ($args == '' ? '' : '?' . $args); } else { ! $mxurl = $mx_root_path . 'index.' . $phpEx; ! if( is_numeric($page_id) && !empty($page_id) ) ! { ! $mxurl .= '?page=' . $pageid . $dynamicId. ($args == '' ? '' : '&' . $args); ! } ! else ! { ! $mxurl .= '?page=' . $music_index . ($args == '' ? '' : '&' . $args); ! } } + + return $mxurl; } } |