Index: trunk/phase3/js2/mwEmbed/mv_embed.js |
— | — | @@ -37,10 +37,6 @@ |
38 | 38 | if(!mv_java_iframe) |
39 | 39 | var mv_java_iframe = true; |
40 | 40 | |
41 | | -//media_server mv_embed_path (the path on media servers to mv_embed for java iframe with leading and trailing slashes) |
42 | | -if(!mv_media_iframe_path) |
43 | | - var mv_media_iframe_path = '/mv_embed/'; |
44 | | - |
45 | 41 | //the default height/width of the video (if no style or width attribute provided) |
46 | 42 | if(!mv_default_video_size) |
47 | 43 | var mv_default_video_size = '400x300'; |
— | — | @@ -1130,9 +1126,8 @@ |
1131 | 1127 | } |
1132 | 1128 | } |
1133 | 1129 | function mwGetLocalApiUrl(url){ |
1134 | | - if (wgServer && wgScript){ |
1135 | | - url = wgServer + wgScript; |
1136 | | - return url.replace(/index.php/, 'api.php'); |
| 1130 | + if (wgServer && wgScriptPath){ |
| 1131 | + return wgServer + wgScriptPath + '/api.php'; |
1137 | 1132 | } |
1138 | 1133 | return false; |
1139 | 1134 | } |
— | — | @@ -1328,6 +1323,8 @@ |
1329 | 1324 | * sets the global mv_embed path based on the scripts location |
1330 | 1325 | */ |
1331 | 1326 | function getMvEmbedPath(){ |
| 1327 | + if( _global['mv_embed_path']) |
| 1328 | + return _global['mv_embed_path']; |
1332 | 1329 | var mv_embed_url = getMvEmbedURL(); |
1333 | 1330 | if( mv_embed_url.indexOf('mv_embed.js') !== -1 ){ |
1334 | 1331 | mv_embed_path = mv_embed_url.substr(0, mv_embed_url.indexOf('mv_embed.js')); |
— | — | @@ -1349,6 +1346,7 @@ |
1350 | 1347 | } |
1351 | 1348 | } |
1352 | 1349 | } |
| 1350 | + _global['mv_embed_path'] = mv_embed_path; |
1353 | 1351 | return mv_embed_path; |
1354 | 1352 | } |
1355 | 1353 | |