r54077 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54076‎ | r54077 | r54078 >
Date:08:22, 31 July 2009
Author:dale
Status:deferred
Tags:
Comment:
updated api path
Modified paths:
  • /trunk/phase3/js2/mwEmbed/mv_embed.js (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/mwEmbed/mv_embed.js
@@ -37,10 +37,6 @@
3838 if(!mv_java_iframe)
3939 var mv_java_iframe = true;
4040
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 -
4541 //the default height/width of the video (if no style or width attribute provided)
4642 if(!mv_default_video_size)
4743 var mv_default_video_size = '400x300';
@@ -1130,9 +1126,8 @@
11311127 }
11321128 }
11331129 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';
11371132 }
11381133 return false;
11391134 }
@@ -1328,6 +1323,8 @@
13291324 * sets the global mv_embed path based on the scripts location
13301325 */
13311326 function getMvEmbedPath(){
 1327+ if( _global['mv_embed_path'])
 1328+ return _global['mv_embed_path'];
13321329 var mv_embed_url = getMvEmbedURL();
13331330 if( mv_embed_url.indexOf('mv_embed.js') !== -1 ){
13341331 mv_embed_path = mv_embed_url.substr(0, mv_embed_url.indexOf('mv_embed.js'));
@@ -1349,6 +1346,7 @@
13501347 }
13511348 }
13521349 }
 1350+ _global['mv_embed_path'] = mv_embed_path;
13531351 return mv_embed_path;
13541352 }
13551353

Status & tagging log