* fixed height for captions for small videos / audio
* to ensure that client-side caches do not keep obsolete copies of global
* styles.
*/
* to ensure that client-side caches do not keep obsolete copies of global
* styles.
*/
-$wgStyleVersion = '252';
+$wgStyleVersion = '253';
function doScriptLoader() {
global $wgJSAutoloadClasses, $wgJSAutoloadLocalClasses, $IP,
function doScriptLoader() {
global $wgJSAutoloadClasses, $wgJSAutoloadLocalClasses, $IP,
- $wgEnableScriptMinify, $wgUseFileCache, $wgExtensionMessagesFiles;
+ $wgEnableScriptMinify, $wgUseFileCache, $wgExtensionMessagesFiles;
//load the ExtensionMessagesFiles
$wgExtensionMessagesFiles['mwEmbed'] = realpath( dirname( __FILE__ ) ) . '/php/languages/mwEmbed.i18n.php';
//load the ExtensionMessagesFiles
$wgExtensionMessagesFiles['mwEmbed'] = realpath( dirname( __FILE__ ) ) . '/php/languages/mwEmbed.i18n.php';
if ( $wgUseFileCache && !$this->debug ) {
$status = $this->sFileCache->saveToFileCache( $this->jsout );
if ( $status !== true )
if ( $wgUseFileCache && !$this->debug ) {
$status = $this->sFileCache->saveToFileCache( $this->jsout );
if ( $status !== true )
- $this->error_msg .= $status;
+ $this->error_msg .= $status;
}
// Check for an error msg
if ( $this->error_msg != '' ) {
}
// Check for an error msg
if ( $this->error_msg != '' ) {
if ( in_array( strtolower( $skin ), $skinNames ) ) {
// If in debug mode, add a comment with wiki title and rev:
if ( $this->debug )
if ( in_array( strtolower( $skin ), $skinNames ) ) {
// If in debug mode, add a comment with wiki title and rev:
if ( $this->debug )
- $jsout .= "\n/**\n* GenerateUserJs: \n*/\n";
+ $jsout .= "\n/**\n* GenerateUserJs: \n*/\n";
return $jsout . $sk->generateUserJs( $skin ) . "\n";
}
} else {
return $jsout . $sk->generateUserJs( $skin ) . "\n";
}
} else {
if ( $a->getID() !== 0 ) {
// If in debug mode, add a comment with wiki title and rev:
if ( $this->debug )
if ( $a->getID() !== 0 ) {
// If in debug mode, add a comment with wiki title and rev:
if ( $this->debug )
- $jsout .= "\n/**\n* WikiJSPage: " . htmlspecialchars( $title_block ) . " rev: " . $a->getID() . " \n*/\n";
+ $jsout .= "\n/**\n* WikiJSPage: " . htmlspecialchars( $title_block ) . " rev: " . $a->getID() . " \n*/\n";
return $jsout . $a->getContent() . "\n";
}
return $jsout . $a->getContent() . "\n";
}
if ( trim( $file_name ) != '' ) {
if ( $this->debug )
if ( trim( $file_name ) != '' ) {
if ( $this->debug )
- $jsout .= "\n/**\n* File: " . htmlspecialchars( $file_name ) . "\n*/\n";
+ $jsout .= "\n/**\n* File: " . htmlspecialchars( $file_name ) . "\n*/\n";
$jsFileStr = $this->doGetJsFile( $file_name ) . "\n";
if( $jsFileStr ){
$jsFileStr = $this->doGetJsFile( $file_name ) . "\n";
if( $jsFileStr ){
- //if we did not return some js
+ //if we did not return some js
$this->error_msg .= "\nUnknown error\n";
return false;
}
$this->error_msg .= "\nUnknown error\n";
return false;
}
$m = array();
if( preg_match(
'/\bgzip(?:;(q)=([0-9]+(?:\.[0-9]+)))?\b/',
$m = array();
if( preg_match(
'/\bgzip(?:;(q)=([0-9]+(?:\.[0-9]+)))?\b/',
- $_SERVER['HTTP_ACCEPT_ENCODING'],
- $m ) ) {
+ $_SERVER['HTTP_ACCEPT_ENCODING'],
+ $m ) ) {
if( isset( $m[2] ) && ( $m[1] == 'q' ) && ( $m[2] == 0 ) )
if( isset( $m[2] ) && ( $m[1] == 'q' ) && ( $m[2] == 0 ) )
//no gzip support found
return true;
}
//no gzip support found
return true;
}
//make sure its a valid wikipage before doing processing
$t = Title::newFromDBkey( substr( $reqClass, 3) );
if( $t->exists()
//make sure its a valid wikipage before doing processing
$t = Title::newFromDBkey( substr( $reqClass, 3) );
if( $t->exists()
- && ( $t->getNamespace() == NS_MEDIAWIKI
- || $t->getNamespace() == NS_USER ) ){
- $doAddWT = true;
+ && ( $t->getNamespace() == NS_MEDIAWIKI
+ || $t->getNamespace() == NS_USER ) ){
+ $doAddWT = true;
function doProcessJs( $str ){
global $wgEnableScriptLocalization;
// Strip out js_log debug lines. Not much luck with this regExp yet:
function doProcessJs( $str ){
global $wgEnableScriptLocalization;
// Strip out js_log debug lines. Not much luck with this regExp yet:
- // if( !$this->debug )
- // $str = preg_replace('/\n\s*js_log\s*\([^\)]([^;]|\n])*;/', "\n", $str);
+ if( !$this->debug )
+ $str = preg_replace('/\n\s*js_log\(([^\)]*\))*\s*[\;\n]/U', "\n", $str);
// Do language swap by index:
if ( $wgEnableScriptLocalization ){
// Do language swap by index:
if ( $wgEnableScriptLocalization ){
switch( $char ) {
case '"':
$inquote = !$inquote;
switch( $char ) {
case '"':
$inquote = !$inquote;
case '}':
if( ! $inquote){
$returnIndex['e'] =$i;
return $returnIndex;
}
case '}':
if( ! $inquote){
$returnIndex['e'] =$i;
return $returnIndex;
}
case '\\':
if ( $inquote ) $ignorenext = true;
case '\\':
if ( $inquote ) $ignorenext = true;
$inx = self::getLoadGmIndex( $str );
if(!$inx)
$inx = self::getLoadGmIndex( $str );
if(!$inx)
return FormatJson::decode( '{' . substr($str, $inx['s'], ($inx['e']-$inx['s'])) . '}', true);
}
static public function getMsgKeys(& $jmsg, $langCode = false){
global $wgContLanguageCode;
if(!$langCode)
return FormatJson::decode( '{' . substr($str, $inx['s'], ($inx['e']-$inx['s'])) . '}', true);
}
static public function getMsgKeys(& $jmsg, $langCode = false){
global $wgContLanguageCode;
if(!$langCode)
- $langCode = $wgContLanguageCode;
+ $langCode = $wgContLanguageCode;
//get the msg keys for the a json array
foreach ( $jmsg as $msgKey => $default_en_value ) {
$jmsg[$msgKey] = wfMsgGetKey( $msgKey, true, $langCode, false );
//get the msg keys for the a json array
foreach ( $jmsg as $msgKey => $default_en_value ) {
$jmsg[$msgKey] = wfMsgGetKey( $msgKey, true, $langCode, false );
// Check for defined files::
if( is_file( $this->filename ) )
// Check for defined files::
if( is_file( $this->filename ) )
- return $this->filename;
+ return $this->filename;
if( is_file( $this->filename .'.gz') ){
$this->filename.='.gz';
if( is_file( $this->filename .'.gz') ){
$this->filename.='.gz';
}
//check the update the name based on the $wgUseGzip config var
if ( isset($wgUseGzip) && $wgUseGzip )
}
//check the update the name based on the $wgUseGzip config var
if ( isset($wgUseGzip) && $wgUseGzip )
- $this->filename.='.gz';
+ $this->filename.='.gz';
}
public function isFileCached() {
}
public function isFileCached() {
$m = array();
if ( preg_match(
'/\bgzip(?:;(q)=([0-9]+(?:\.[0-9]+)))?\b/',
$m = array();
if ( preg_match(
'/\bgzip(?:;(q)=([0-9]+(?:\.[0-9]+)))?\b/',
- $_SERVER['HTTP_ACCEPT_ENCODING'],
- $m ) ) {
+ $_SERVER['HTTP_ACCEPT_ENCODING'],
+ $m ) ) {
if ( isset( $m[2] ) && ( $m[1] == 'q' ) && ( $m[2] == 0 ) )
if ( isset( $m[2] ) && ( $m[1] == 'q' ) && ( $m[2] == 0 ) )
return 'Error: Called saveToFileCache with $wgUseFileCache off';
}
if ( strcmp( $text, '' ) == 0 )
return 'Error: Called saveToFileCache with $wgUseFileCache off';
}
if ( strcmp( $text, '' ) == 0 )
- return 'saveToFileCache: empty output file';
+ return 'saveToFileCache: empty output file';
if ( $wgUseGzip ) {
$outputText = gzencode( trim( $text ) );
if ( $wgUseGzip ) {
$outputText = gzencode( trim( $text ) );
$status = $this->checkCacheDirs();
if ( $status !== true )
$status = $this->checkCacheDirs();
if ( $status !== true )
$f = fopen( $this->filename, 'w' );
if ( $f ) {
fwrite( $f, $outputText );
$f = fopen( $this->filename, 'w' );
if ( $f ) {
fwrite( $f, $outputText );
//set the action to the api url:
$j(_this.editForm).attr('action', _this.api_url );
//set the action to the api url:
$j(_this.editForm).attr('action', _this.api_url );
- js_log('do iframe form submit to: ' + $j(_this.editForm).attr('target')
- + ' destName:' + $j(_this.editForm).find("[name='filename']").val() );
+ js_log('do iframe form submit to: ' + $j(_this.editForm).attr('target') );
+ js_log(' destName:' + $j(_this.editForm).find("[name='filename']").val() );
//@@todo support position config
var loc = $j(this).position();
if($j('#metaBox_'+this.id).length==0){
//@@todo support position config
var loc = $j(this).position();
if($j('#metaBox_'+this.id).length==0){
+ var theight = (parseInt( this.height ) < 200) ? 200 : this.height;
$j(this).after('<div class="ui-widget ui-widget-content ui-corner-all" style="position:absolute;z-index:10;'+
'top:' + (loc.top) + 'px;' +
$j(this).after('<div class="ui-widget ui-widget-content ui-corner-all" style="position:absolute;z-index:10;'+
'top:' + (loc.top) + 'px;' +
- 'left:' + (parseInt( loc.left ) + parseInt(this.width) + 10 )+'px;' +
- 'height:'+ parseInt( this.height )+'px;width:400px;' +
+ 'left:' + (parseInt( loc.left ) + parseInt(this.width) + 10 ) + 'px;' +
+ 'height:' + theight + 'px;width:400px;' +
'display:none;" ' +
'id="metaBox_' + this.id + '">'+
mv_get_loading_img() +
'display:none;" ' +
'id="metaBox_' + this.id + '">'+
mv_get_loading_img() +
//check for skin overrides for ctrlBuilder
if( _global[ embedObj.skin_name + 'Config'] ){
//check for skin overrides for ctrlBuilder
if( _global[ embedObj.skin_name + 'Config'] ){
- //clone as to not overide prototype:
+ //clone as to not override prototype:
var _this = $j.extend(true, {}, this, _global[ embedObj.skin_name + 'Config']);
return _this;
}
var _this = $j.extend(true, {}, this, _global[ embedObj.skin_name + 'Config']);
return _this;
}
$j('#dc_'+ embedObj.id).hover(
function(){
if($j('#gnp_' + embedObj.id).length==0){
$j('#dc_'+ embedObj.id).hover(
function(){
if($j('#gnp_' + embedObj.id).length==0){
+ var toppos = ( embedObj.instanceOf == 'mvPlayList')?25:10;
$j(this).append('<div id="gnp_' + embedObj.id + '" class="ui-state-highlight ui-corner-all" ' +
$j(this).append('<div id="gnp_' + embedObj.id + '" class="ui-state-highlight ui-corner-all" ' +
- 'style="position:absolute;display:none;background:#FFF;top:10px;left:10px;right:10px;">' +
+ 'style="position:absolute;display:none;background:#FFF;top:'+toppos+'px;left:10px;right:10px;">' +
gM('mwe-for_best_experience') +
'<br><input id="ffwarn_'+embedObj.id+'" type=\"checkbox\">' +
gM('mwe-do_not_warn_again') +
gM('mwe-for_best_experience') +
'<br><input id="ffwarn_'+embedObj.id+'" type=\"checkbox\">' +
gM('mwe-do_not_warn_again') +
$j('#ffwarn_'+embedObj.id).click(function(){
if( $j(this).is(':checked') ){
//set up a cookie for 7 days:
$j('#ffwarn_'+embedObj.id).click(function(){
if( $j(this).is(':checked') ){
//set up a cookie for 7 days:
- $j.cookie('dismissNativeWarn', true, { expires: 5 });
+ $j.cookie('dismissNativeWarn', true, { expires: 7 });
//set the current instance
_global['dismissNativeWarn'] = true;
$j('#gnp_' + embedObj.id).fadeOut('slow');
//set the current instance
_global['dismissNativeWarn'] = true;
$j('#gnp_' + embedObj.id).fadeOut('slow');
$j('#' +embedObj.id).get(0).fullscreen();
});
$j('#' +embedObj.id).get(0).fullscreen();
});
- js_log(" should add slider binding: " + $tp.find('.play_head').length) ;
+ js_log(" should add slider binding: " + $tp.find('.play_head').length);
$tp.find('.play_head').slider({
range: "min",
value: 0,
$tp.find('.play_head').slider({
range: "min",
value: 0,
var urlparts = getRemoteEmbedPath();
var mwEmbedHostPath = urlparts[0];
var urlparts = getRemoteEmbedPath();
var mwEmbedHostPath = urlparts[0];
-var mwRemoteVersion = 58776;
+var mwRemoteVersion = '1.0';
reqArguments = urlparts[1];
reqArguments = urlparts[1];
if( vidIdList.length != 0 ){
setTimeout( function(){
procVidId( vidIdList.pop() )
if( vidIdList.length != 0 ){
setTimeout( function(){
procVidId( vidIdList.pop() )