diff --git a/.gitignore b/.gitignore index baa16c5..db9fba7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,42 +1,14 @@ *spec~ clog -wordpress-3.0.1.tar.gz -/wordpress-3.0.2.tar.gz -/wordpress-3.0.3.tar.gz -/wordpress-3.0.4.tar.gz -/wordpress-3.1.tar.gz -/wordpress-3.1.1.tar.gz -/wordpress-3.1.2.tar.gz -/wordpress-3.1.3.tar.gz -/wordpress-3.2-RC1.zip -/wordpress-3.2-RC3.zip -/wordpress-3.2.tar.gz -/wordpress-3.2.1.tar.gz -/wordpress-3.3-beta2.tar.gz -/wordpress-3.3-beta3.tar.gz -/wordpress-3.3-beta4.tar.gz -/wordpress-3.3-RC1.tar.gz -/wordpress-3.3-RC2.tar.gz -/wordpress-3.3.tar.gz -/wordpress-3.3.1.tar.gz -/wordpress-3.4-beta1.tar.gz -/wordpress-3.4-beta2.tar.gz -/wordpress-3.4-beta3.tar.gz -/wordpress-3.4-beta4.tar.gz -/wordpress-3.4-RC1.tar.gz -/wordpress-3.4-RC2.tar.gz -/wordpress-3.4-RC3.tar.gz -/wordpress-3.4.tar.gz -/wordpress-3.4.1.tar.gz -/wordpress-3.4.2.tar.gz -/wordpress-3.5-beta-1.tar.gz -/wordpress-3.5-beta2.tar.gz -/wordpress-3.5-beta3.tar.gz -/wordpress-3.5-RC1.tar.gz -/wordpress-3.5-RC2.tar.gz -/wordpress-3.5-RC3.tar.gz -/wordpress-3.5.tar.gz -/wordpress-3.5.1.tar.gz -/wordpress-3.5.2.tar.gz -/wordpress-3.6.tar.gz - +/wordpress-3.7.tar.gz +/wordpress-3.7.1.tar.gz +/wordpress-3.8.tar.gz +/wordpress-3.8.1.tar.gz +/wordpress-3.8.2.tar.gz +/wordpress-3.8.3.tar.gz +/wordpress-3.9.tar.gz +/wordpress-3.9.1.tar.gz +/wordpress-3.9.2.tar.gz +/wordpress-4.0.tar.gz +/wordpress-4.0.1.tar.gz +/wordpress-4.1.tar.gz diff --git a/README.fedora.wordpress b/README.fedora.wordpress index 20f8739..7fdb058 100644 --- a/README.fedora.wordpress +++ b/README.fedora.wordpress @@ -1,3 +1,5 @@ +------------------------------------------------------------------------------- + Wordpress is a database driven blogging program designed to make it exceedingly easy to publish an online blog, sometimes also called a weblog or journal. @@ -44,6 +46,8 @@ open a web browser to http://localhost/wordpress/wp-admin/install.php and follow the instructions given to you on the pages you see to set up the database tables and begin publishing your blog. +------------------------------------------------------------------------------- + Wordpress ships with Flash and Silverlight plugins for the 'plupload' file uploader and the 'mediaelement' media player embedder. The idea is to try and be able to provide a multi-file uploader and an embedded video player when @@ -64,3 +68,19 @@ b) If you try to embed media into a Wordpress post using the [video] and a browser that has HTML5 support for the media format in question; if not, the 'Download Media' link will be offered. No Flash or Silverlight-based player element will be included. + +------------------------------------------------------------------------------- + +Optional dependencies: + +You may wish to install the following packages: + + php-pecl-imagick: optimize image transformation + php-pecl-ssh2: for file transfert using ssh + +An opcode cache is also recommended: + php 5.5: php-opcache + php 5.4: php-pecl-zendopcache + php 5.3: php-pecl-apc + +------------------------------------------------------------------------------- diff --git a/sources b/sources index 36c9fae..9f84c78 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ddbe1549dc27a260d28b47ad32eadd34 wordpress-3.6.tar.gz +5adac1bfc61b793a1ca9bcb4d67b4d28 wordpress-4.1.tar.gz diff --git a/wordpress-3.6-mediaelement-noflash_silverlight.patch b/wordpress-3.6-mediaelement-noflash_silverlight.patch deleted file mode 100644 index 0e9f67b..0000000 --- a/wordpress-3.6-mediaelement-noflash_silverlight.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- wordpress/wp-includes/js/mediaelement/mediaelement-and-player.min.js 2013-08-01 06:47:23.000000000 -0700 -+++ wordpress/wp-includes/js/mediaelement/mediaelement-and-player.min.js.new 2013-08-23 16:02:01.491295485 -0700 -@@ -37,7 +37,7 @@ - this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){if(this.hasAttribute(a))return this.attributes[a];return""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id);mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id)}}; - mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b;this.htmlMediaElements[a]=c},unregisterPluginElement:function(a){delete this.pluginMediaElements[a];delete this.htmlMediaElements[a]},initPlugin:function(a){var b=this.pluginMediaElements[a],c=this.htmlMediaElements[a];if(b){switch(b.pluginType){case "flash":b.pluginElement=b.pluginApi=document.getElementById(a);break;case "silverlight":b.pluginElement=document.getElementById(b.id); - b.pluginApi=b.pluginElement.Content.MediaElementJS}b.pluginApi!=null&&b.success&&b.success(b,c)}},fireEvent:function(a,b,c){var d,e;if(a=this.pluginMediaElements[a]){b={type:b,target:a};for(d in c){a[d]=c[d];b[d]=c[d]}e=c.bufferedTime||0;b.target.buffered=b.buffered={start:function(){return 0},end:function(){return e},length:1};a.dispatchEvent(b.type,b)}}}; --mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:false,httpsBasicAuthSite:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",enablePluginSmoothing:false,enablePseudoStreaming:false,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480, -+mejs.MediaElementDefaults={mode:"auto",plugins:["youtube","vimeo"],enablePluginDebug:false,httpsBasicAuthSite:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",enablePluginSmoothing:false,enablePseudoStreaming:false,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480, - defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:0.8,success:function(){},error:function(){}};mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)}; - mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase(),f=e==="audio"||e==="video",g=f?d.getAttribute("src"):d.getAttribute("href");e=d.getAttribute("poster");var h=d.getAttribute("autoplay"),l=d.getAttribute("preload"),j=d.getAttribute("controls"),k;for(k in b)c[k]=b[k];g=typeof g=="undefined"||g===null||g==""?null:g;e=typeof e=="undefined"||e===null?"":e;l=typeof l=="undefined"||l===null||l==="false"? - "none":l;h=!(typeof h=="undefined"||h===null||h==="false");j=!(typeof j=="undefined"||j===null||j==="false");k=this.determinePlayback(d,c,mejs.MediaFeatures.supportsMediaTag,f,g);k.url=k.url!==null?mejs.Utility.absolutizeUrl(k.url):"";if(k.method=="native"){if(mejs.MediaFeatures.isBustedAndroid){d.src=k.url;d.addEventListener("click",function(){d.play()},false)}return this.updateNative(k,c,h,l)}else if(k.method!=="")return this.createPlugin(k,c,e,h,l,j);else{this.createErrorMessage(k,c,e);return this}}, diff --git a/wordpress-3.6-tinymce_noflash.patch b/wordpress-3.6-tinymce_noflash.patch deleted file mode 100644 index a5d0a7f..0000000 --- a/wordpress-3.6-tinymce_noflash.patch +++ /dev/null @@ -1,6 +0,0 @@ ---- wordpress/wp-includes/js/tinymce/plugins/media/editor_plugin.js 2012-07-07 09:22:53.000000000 -0700 -+++ wordpress/wp-includes/js/tinymce/plugins/media/editor_plugin.js.new 2013-08-23 11:57:22.032012144 -0700 -@@ -1 +1 @@ --(function(){var b=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),a=tinymce.makeMap(b.join(",")),f=tinymce.html.Node,d,i,h=tinymce.util.JSON,g;d=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function e(j){return typeof(j)=="string"?j.replace(/[^0-9%]/g,""):j}function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(s){return s&&s.nodeName==="IMG"&&n.dom.hasClass(s,"mceItemMedia")}r.editor=n;r.url=j;i="";for(m=0;m0){O+=(O?"&":"")+P+"="+escape(Q)}});if(O.length){G.params.flashvars=O}L=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(L,function(Q,P){G.params[P]=""+Q})}}G=z.attr("data-mce-json");if(!G){return}G=h.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}G.width=z.attr("width")||G.width;G.height=z.attr("height")||G.height;if(q.name==="Iframe"){x=new f("iframe",1);tinymce.each(b,function(n){var J=z.attr(n);if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&J.length>0){x.attr(n,J)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new f("script",1).attr("type","text/javascript");y=new f("#text",3);y.value="write"+q.name+"("+h.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new f("video",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A0){O+=(O?"&":"")+P+"="+escape(Q)}});if(O.length){G.params.flashvars=O}L=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(L,function(Q,P){G.params[P]=""+Q})}}G=z.attr("data-mce-json");if(!G){return}G=h.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}G.width=z.attr("width")||G.width;G.height=z.attr("height")||G.height;if(q.name==="Iframe"){x=new f("iframe",1);tinymce.each(b,function(n){var J=z.attr(n);if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&J.length>0){x.attr(n,J)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new f("script",1).attr("type","text/javascript");y=new f("#text",3);y.value="write"+q.name+"("+h.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new f("video",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;Aadd( 'wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array('plupload-all', 'jquery', 'json2', 'media-models'), false, 1 ); +diff -up wordpress/wp-includes/script-loader.php.orig wordpress/wp-includes/script-loader.php +--- wordpress/wp-includes/script-loader.php.orig 2014-05-07 15:55:26.485228222 +0200 ++++ wordpress/wp-includes/script-loader.php 2014-05-07 15:55:18.019198073 +0200 +@@ -273,15 +273,6 @@ function wp_default_scripts( &$scripts ) + $scripts->add( 'wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array( 'plupload', 'jquery', 'json2', 'media-models' ), false, 1 ); did_action( 'init' ) && $scripts->localize( 'wp-plupload', 'pluploadL10n', $uploader_l10n ); - // keep 'swfupload' for back-compat. @@ -13,6 +14,6 @@ - $scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20110524'); - did_action( 'init' ) && $scripts->localize( 'swfupload-handlers', 'swfuploadL10n', $uploader_l10n ); - - $scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js" ); + $scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js", array(), false, 1 ); $scripts->add( 'json2', "/wp-includes/js/json2$suffix.js", array(), '2011-02-23'); diff --git a/wordpress-4.0-config.patch b/wordpress-4.0-config.patch new file mode 100644 index 0000000..c2579b2 --- /dev/null +++ b/wordpress-4.0-config.patch @@ -0,0 +1,32 @@ +diff -up wordpress/wp-config.php.orig wordpress/wp-config.php +--- wordpress/wp-config.php.orig 2014-09-08 13:12:36.525908423 +0200 ++++ wordpress/wp-config.php 2014-09-08 13:14:33.583402525 +0200 +@@ -62,6 +62,19 @@ define('NONCE_SALT', 'put your uni + $table_prefix = 'wp_'; + + /** ++ * See http://make.wordpress.org/core/2013/10/25/the-definitive-guide-to-disabling-auto-updates-in-wordpress-3-7 ++ */ ++ ++/* Disable all file change, as RPM base installation are read-only */ ++define('DISALLOW_FILE_MODS', true); ++ ++/* Disable automatic updater, in case you want to allow ++ above FILE_MODS for plugins, themes, ... */ ++define('AUTOMATIC_UPDATER_DISABLED', true); ++ ++/* Core update is always disabled, WP_AUTO_UPDATE_CORE value is ignore */ ++ ++/** + * For developers: WordPress debugging mode. + * + * Change this to true to enable the display of notices during development. +@@ -74,7 +87,7 @@ define('WP_DEBUG', false); + + /** Absolute path to the WordPress directory. */ + if ( !defined('ABSPATH') ) +- define('ABSPATH', dirname(__FILE__) . '/'); ++ define('ABSPATH', '/usr/share/wordpress'); + + /** Sets up WordPress vars and included files. */ + require_once(ABSPATH . 'wp-settings.php'); diff --git a/wordpress-4.0-systemlibs.patch b/wordpress-4.0-systemlibs.patch new file mode 100644 index 0000000..9d16ee6 --- /dev/null +++ b/wordpress-4.0-systemlibs.patch @@ -0,0 +1,21 @@ +diff -up wordpress/wp-admin/includes/media.php.old wordpress/wp-admin/includes/media.php +--- wordpress/wp-admin/includes/media.php.old 2014-09-30 08:54:21.666519693 +0200 ++++ wordpress/wp-admin/includes/media.php 2014-09-30 08:55:11.247757421 +0200 +@@ -2907,7 +2907,7 @@ function wp_read_video_metadata( $file ) + $metadata = array(); + + if ( ! class_exists( 'getID3' ) ) +- require( ABSPATH . WPINC . '/ID3/getid3.php' ); ++ require( '/usr/share/php/getid3/getid3.php' ); + $id3 = new getID3(); + $data = $id3->analyze( $file ); + +@@ -2962,7 +2962,7 @@ function wp_read_audio_metadata( $file ) + $metadata = array(); + + if ( ! class_exists( 'getID3' ) ) +- require( ABSPATH . WPINC . '/ID3/getid3.php' ); ++ require( '/usr/share/php/getid3/getid3.php' ); + $id3 = new getID3(); + $data = $id3->analyze( $file ); + diff --git a/wordpress-4.0-tinymce_noflash.patch b/wordpress-4.0-tinymce_noflash.patch new file mode 100644 index 0000000..605df1c --- /dev/null +++ b/wordpress-4.0-tinymce_noflash.patch @@ -0,0 +1,23 @@ +diff -up wordpress/wp-includes/js/tinymce/plugins/media/plugin.js.rpm wordpress/wp-includes/js/tinymce/plugins/media/plugin.js +--- wordpress/wp-includes/js/tinymce/plugins/media/plugin.js.rpm 2014-08-22 01:53:18.000000000 +0200 ++++ wordpress/wp-includes/js/tinymce/plugins/media/plugin.js 2014-09-08 13:10:15.717314458 +0200 +@@ -44,10 +44,6 @@ tinymce.PluginManager.add('media', funct + return 'video/ogg'; + } + +- if (url.indexOf('.swf') != -1) { +- return 'application/x-shockwave-flash'; +- } +- + return ''; + } + +@@ -239,7 +235,7 @@ tinymce.PluginManager.add('media', funct + data.source1mime = guessMime(data.source1); + data.source2mime = guessMime(data.source2); + data.poster = editor.convertURL(data.poster, "poster"); +- data.flashPlayerUrl = editor.convertURL(url + '/moxieplayer.swf', "movie"); ++ data.flashPlayerUrl = false; + + tinymce.each(urlPatterns, function(pattern) { + var match, i, url; diff --git a/wordpress-4.1-mediaelement-noflash_silverlight.patch b/wordpress-4.1-mediaelement-noflash_silverlight.patch new file mode 100644 index 0000000..125eec4 --- /dev/null +++ b/wordpress-4.1-mediaelement-noflash_silverlight.patch @@ -0,0 +1,11 @@ +--- wordpress/wp-includes/js/mediaelement/mediaelement-and-player.min.js.orig 2014-12-22 06:38:12.716225091 +0100 ++++ wordpress/wp-includes/js/mediaelement/mediaelement-and-player.min.js 2014-12-22 06:39:30.045517161 +0100 +@@ -12,7 +12,7 @@ + * License: MIT + * + */ +-function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}var mejs=mejs||{};mejs.version="2.16.2",mejs.meIndex=0,mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/youtube","video/x-youtube","application/x-mpegURL"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo","video/x-vimeo"]}]},mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&").split("<").join("<").split('"').join(""")},absolutizeUrl:function(a){var b=document.createElement("div");return b.innerHTML='x',b.firstChild.href},getScriptPath:function(a){for(var b,c,d,e,f,g,h=0,i="",j="",k=document.getElementsByTagName("script"),l=k.length,m=a.length;l>h;h++){for(e=k[h].src,c=e.lastIndexOf("/"),c>-1?(g=e.substring(c+1),f=e.substring(0,c+1)):(g=e,f=""),b=0;m>b;b++)if(j=a[b],d=g.indexOf(j),d>-1){i=f;break}if(""!==i)break}return i},secondsToTimeCode:function(a,b,c,d){"undefined"==typeof c?c=!1:"undefined"==typeof d&&(d=25);var e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60),h=Math.floor((a%1*d).toFixed(3)),i=(b||e>0?(10>e?"0"+e:e)+":":"")+(10>f?"0"+f:f)+":"+(10>g?"0"+g:g)+(c?":"+(10>h?"0"+h:h):"");return i},timeCodeToSeconds:function(a,b,c,d){"undefined"==typeof c?c=!1:"undefined"==typeof d&&(d=25);var e=a.split(":"),f=parseInt(e[0],10),g=parseInt(e[1],10),h=parseInt(e[2],10),i=0,j=0;return c&&(i=parseInt(e[3])/d),j=3600*f+60*g+h+i},convertSMPTEtoSeconds:function(a){if("string"!=typeof a)return!1;a=a.replace(",",".");var b=0,c=-1!=a.indexOf(".")?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e0&&(d=Math.pow(60,e)),b+=Number(a[e])*d;return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);b&&/object|embed/i.test(b.nodeName)&&(mejs.MediaFeatures.isIE?(b.style.display="none",function(){4==b.readyState?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))},removeObjectInIE:function(a){var b=document.getElementById(a);if(b){for(var c in b)"function"==typeof b[c]&&(b[c]=null);b.parentNode.removeChild(b)}}},mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];return b[1]=b[1]||0,b[2]=b[2]||0,c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?!0:!1},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e,f,g,h=[0,0,0];if("undefined"!=typeof this.nav.plugins&&"object"==typeof this.nav.plugins[a]){if(e=this.nav.plugins[a].description,e&&("undefined"==typeof this.nav.mimeTypes||!this.nav.mimeTypes[b]||this.nav.mimeTypes[b].enabledPlugin))for(h=e.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split("."),f=0;f0;)this.removeChild(b[0]);if("string"==typeof a)this.src=a;else{var c,d;for(c=0;c0&&null!==q[0].url&&this.getTypeFromFile(q[0].url).indexOf("audio")>-1&&(r.isVideo=!1),mejs.MediaFeatures.isBustedAndroid&&(a.canPlayType=function(a){return null!==a.match(/video\/(mp4|m4v)/gi)?"maybe":""}),!(!c||"auto"!==b.mode&&"auto_plugin"!==b.mode&&"native"!==b.mode||mejs.MediaFeatures.isBustedNativeHTTPS&&b.httpsBasicAuthSite===!0)){for(d||(o=document.createElement(r.isVideo?"video":"audio"),a.parentNode.insertBefore(o,a),a.style.display="none",r.htmlMediaElement=a=o),f=0;f0&&(r.url=q[0].url),r)},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.split("?")[0];var b=a.substring(a.lastIndexOf(".")+1).toLowerCase();return(/(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(b)?"video":"audio")+"/"+this.getTypeFromExtension(b)},getTypeFromExtension:function(a){switch(a){case"mp4":case"m4v":case"m4a":return"mp4";case"webm":case"webma":case"webmv":return"webm";case"ogg":case"oga":case"ogv":return"ogg";default:return a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div");e.className="me-cannotplay";try{e.style.width=d.width+"px",e.style.height=d.height+"px"}catch(f){}e.innerHTML=b.customError?b.customError:""!==c?'':''+mejs.i18n.t("Download File")+"",d.parentNode.insertBefore(e,d),d.style.display="none",b.error(d)},createPlugin:function(a,b,c,d,e,f){var g,h,i,j=a.htmlMediaElement,k=1,l=1,m="me_"+a.method+"_"+mejs.meIndex++,n=new mejs.PluginMediaElement(m,a.method,a.url),o=document.createElement("div");n.tagName=j.tagName;for(var p=0;p0?b.pluginWidth:b.videoWidth>0?b.videoWidth:null!==j.getAttribute("width")?j.getAttribute("width"):b.defaultVideoWidth,l=b.pluginHeight>0?b.pluginHeight:b.videoHeight>0?b.videoHeight:null!==j.getAttribute("height")?j.getAttribute("height"):b.defaultVideoHeight,k=mejs.Utility.encodeUrl(k),l=mejs.Utility.encodeUrl(l)):b.enablePluginDebug&&(k=320,l=240),n.success=b.success,mejs.MediaPluginBridge.registerPluginElement(m,n,j),o.className="me-plugin",o.id=m+"_container",a.isVideo?j.parentNode.insertBefore(o,j):document.body.insertBefore(o,document.body.childNodes[0]),i=["id="+m,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+k,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+l,"pseudostreamstart="+b.pseudoStreamingStartQueryParam],null!==a.url&&i.push("flash"==a.method?"file="+mejs.Utility.encodeUrl(a.url):"file="+a.url),b.enablePluginDebug&&i.push("debug=true"),b.enablePluginSmoothing&&i.push("smoothing=true"),b.enablePseudoStreaming&&i.push("pseudostreaming=true"),f&&i.push("controls=true"),b.pluginVars&&(i=i.concat(b.pluginVars)),a.method){case"silverlight":o.innerHTML='';break;case"flash":mejs.MediaFeatures.isIE?(g=document.createElement("div"),o.appendChild(g),g.outerHTML=''):o.innerHTML='';break;case"youtube":var r;-1!=a.url.lastIndexOf("youtu.be")?(r=a.url.substr(a.url.lastIndexOf("/")+1),-1!=r.indexOf("?")&&(r=r.substr(0,r.indexOf("?")))):r=a.url.substr(a.url.lastIndexOf("=")+1),youtubeSettings={container:o,containerId:o.id,pluginMediaElement:n,pluginId:m,videoId:r,height:l,width:k},mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case"vimeo":var s=m+"_player";if(n.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1),o.innerHTML='',"function"==typeof $f){var t=$f(o.childNodes[0]);t.addEvent("ready",function(){function a(a,b,c,d){var e={type:c,target:b};"timeupdate"==c&&(b.currentTime=e.currentTime=d.seconds,b.duration=e.duration=d.duration),b.dispatchEvent(e.type,e)}$.extend(t,{playVideo:function(){t.api("play")},stopVideo:function(){t.api("unload")},pauseVideo:function(){t.api("pause")},seekTo:function(a){t.api("seekTo",a)},setVolume:function(a){t.api("setVolume",a)},setMuted:function(a){a?(t.lastVolume=t.api("getVolume"),t.api("setVolume",0)):(t.api("setVolume",t.lastVolume),delete t.lastVolume)}}),t.addEvent("play",function(){a(t,n,"play"),a(t,n,"playing")}),t.addEvent("pause",function(){a(t,n,"pause")}),t.addEvent("finish",function(){a(t,n,"ended")}),t.addEvent("playProgress",function(b){a(t,n,"timeupdate",b)}),n.pluginElement=o,n.pluginApi=t,mejs.MediaPluginBridge.initPlugin(m)})}else console.warn("You need to include froogaloop for vimeo to work")}return j.style.display="none",j.removeAttribute("autoplay"),n},updateNative:function(a,b){var c,d=a.htmlMediaElement;for(c in mejs.HtmlMediaElement)d[c]=mejs.HtmlMediaElement[c];return b.success(d,d),d}},mejs.YouTubeApi={isIframeStarted:!1,isIframeLoaded:!1,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="//www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b),this.isIframeStarted=!0}},iframeQueue:[],enqueueIframe:function(a){this.isLoaded?this.createIframe(a):(this.loadIframeApi(),this.iframeQueue.push(a))},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId,{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c,mejs.MediaPluginBridge.initPlugin(a.pluginId),setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(a){mejs.YouTubeApi.handleStateChange(a.data,c,b)}}})},createEvent:function(a,b,c){var d={type:c,target:b};if(a&&a.getDuration){b.currentTime=d.currentTime=a.getCurrentTime(),b.duration=d.duration=a.getDuration(),d.paused=b.paused,d.ended=b.ended,d.muted=a.isMuted(),d.volume=a.getVolume()/100,d.bytesTotal=a.getVideoBytesTotal(),d.bufferedBytes=a.getVideoBytesLoaded();var e=d.bufferedBytes/d.bytesTotal*d.duration;d.target.buffered=d.buffered={start:function(){return 0},end:function(){return e},length:1}}b.dispatchEvent(d.type,d)},iFrameReady:function(){for(this.isLoaded=!0,this.isIframeLoaded=!0;this.iframeQueue.length>0;){var a=this.iframeQueue.pop();this.createIframe(a)}},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=a;var b,c="//www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+a.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";mejs.MediaFeatures.isIE?(b=document.createElement("div"),a.container.appendChild(b),b.outerHTML=''):a.container.innerHTML=''},flashReady:function(a){var b=this.flashPlayers[a],c=document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c,mejs.MediaPluginBridge.initPlugin(a),c.cueVideoById(b.videoId);var e=b.containerId+"_callback";window[e]=function(a){mejs.YouTubeApi.handleStateChange(a,c,d)},c.addEventListener("onStateChange",e),setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250),mejs.YouTubeApi.createEvent(c,d,"canplay")},handleStateChange:function(a,b,c){switch(a){case-1:c.paused=!0,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=!1,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=!1,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"play"),mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=!0,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress");break;case 5:}}},window.mejs=mejs,window.MediaElement=mejs.MediaElement,function(a,b){"use strict";var c={locale:{language:b.i18n&&b.i18n.locale.language||"",strings:b.i18n&&b.i18n.locale.strings||{}},ietf_lang_regex:/^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/,methods:{}};c.getLanguage=function(){var a=c.locale.language||window.navigator.userLanguage||window.navigator.language;return c.ietf_lang_regex.exec(a)?a:null},"undefined"!=typeof mejsL10n&&(c.locale.language=mejsL10n.language),c.methods.checkPlain=function(a){var b,c,d={"&":"&",'"':""","<":"<",">":">"};a=String(a);for(b in d)d.hasOwnProperty(b)&&(c=new RegExp(b,"g"),a=a.replace(c,d[b]));return a},c.methods.t=function(a,b){return c.locale.strings&&c.locale.strings[b.context]&&c.locale.strings[b.context][a]&&(a=c.locale.strings[b.context][a]),c.methods.checkPlain(a)},c.t=function(a,b){if("string"==typeof a&&a.length>0){var d=c.getLanguage();return b=b||{context:d},c.methods.t(a,b)}throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."}},b.i18n=c}(document,mejs),function(a){"use strict";"undefined"!=typeof mejsL10n&&(a[mejsL10n.language]=mejsL10n.strings)}(mejs.i18n.locale.strings),/*! ++function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}var mejs=mejs||{};mejs.version="2.16.2",mejs.meIndex=0,mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/youtube","video/x-youtube","application/x-mpegURL"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo","video/x-vimeo"]}]},mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&").split("<").join("<").split('"').join(""")},absolutizeUrl:function(a){var b=document.createElement("div");return b.innerHTML='x',b.firstChild.href},getScriptPath:function(a){for(var b,c,d,e,f,g,h=0,i="",j="",k=document.getElementsByTagName("script"),l=k.length,m=a.length;l>h;h++){for(e=k[h].src,c=e.lastIndexOf("/"),c>-1?(g=e.substring(c+1),f=e.substring(0,c+1)):(g=e,f=""),b=0;m>b;b++)if(j=a[b],d=g.indexOf(j),d>-1){i=f;break}if(""!==i)break}return i},secondsToTimeCode:function(a,b,c,d){"undefined"==typeof c?c=!1:"undefined"==typeof d&&(d=25);var e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60),h=Math.floor((a%1*d).toFixed(3)),i=(b||e>0?(10>e?"0"+e:e)+":":"")+(10>f?"0"+f:f)+":"+(10>g?"0"+g:g)+(c?":"+(10>h?"0"+h:h):"");return i},timeCodeToSeconds:function(a,b,c,d){"undefined"==typeof c?c=!1:"undefined"==typeof d&&(d=25);var e=a.split(":"),f=parseInt(e[0],10),g=parseInt(e[1],10),h=parseInt(e[2],10),i=0,j=0;return c&&(i=parseInt(e[3])/d),j=3600*f+60*g+h+i},convertSMPTEtoSeconds:function(a){if("string"!=typeof a)return!1;a=a.replace(",",".");var b=0,c=-1!=a.indexOf(".")?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e0&&(d=Math.pow(60,e)),b+=Number(a[e])*d;return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);b&&/object|embed/i.test(b.nodeName)&&(mejs.MediaFeatures.isIE?(b.style.display="none",function(){4==b.readyState?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))},removeObjectInIE:function(a){var b=document.getElementById(a);if(b){for(var c in b)"function"==typeof b[c]&&(b[c]=null);b.parentNode.removeChild(b)}}},mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];return b[1]=b[1]||0,b[2]=b[2]||0,c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?!0:!1},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e,f,g,h=[0,0,0];if("undefined"!=typeof this.nav.plugins&&"object"==typeof this.nav.plugins[a]){if(e=this.nav.plugins[a].description,e&&("undefined"==typeof this.nav.mimeTypes||!this.nav.mimeTypes[b]||this.nav.mimeTypes[b].enabledPlugin))for(h=e.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split("."),f=0;f0;)this.removeChild(b[0]);if("string"==typeof a)this.src=a;else{var c,d;for(c=0;c0&&null!==q[0].url&&this.getTypeFromFile(q[0].url).indexOf("audio")>-1&&(r.isVideo=!1),mejs.MediaFeatures.isBustedAndroid&&(a.canPlayType=function(a){return null!==a.match(/video\/(mp4|m4v)/gi)?"maybe":""}),!(!c||"auto"!==b.mode&&"auto_plugin"!==b.mode&&"native"!==b.mode||mejs.MediaFeatures.isBustedNativeHTTPS&&b.httpsBasicAuthSite===!0)){for(d||(o=document.createElement(r.isVideo?"video":"audio"),a.parentNode.insertBefore(o,a),a.style.display="none",r.htmlMediaElement=a=o),f=0;f0&&(r.url=q[0].url),r)},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.split("?")[0];var b=a.substring(a.lastIndexOf(".")+1).toLowerCase();return(/(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(b)?"video":"audio")+"/"+this.getTypeFromExtension(b)},getTypeFromExtension:function(a){switch(a){case"mp4":case"m4v":case"m4a":return"mp4";case"webm":case"webma":case"webmv":return"webm";case"ogg":case"oga":case"ogv":return"ogg";default:return a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div");e.className="me-cannotplay";try{e.style.width=d.width+"px",e.style.height=d.height+"px"}catch(f){}e.innerHTML=b.customError?b.customError:""!==c?'':''+mejs.i18n.t("Download File")+"",d.parentNode.insertBefore(e,d),d.style.display="none",b.error(d)},createPlugin:function(a,b,c,d,e,f){var g,h,i,j=a.htmlMediaElement,k=1,l=1,m="me_"+a.method+"_"+mejs.meIndex++,n=new mejs.PluginMediaElement(m,a.method,a.url),o=document.createElement("div");n.tagName=j.tagName;for(var p=0;p0?b.pluginWidth:b.videoWidth>0?b.videoWidth:null!==j.getAttribute("width")?j.getAttribute("width"):b.defaultVideoWidth,l=b.pluginHeight>0?b.pluginHeight:b.videoHeight>0?b.videoHeight:null!==j.getAttribute("height")?j.getAttribute("height"):b.defaultVideoHeight,k=mejs.Utility.encodeUrl(k),l=mejs.Utility.encodeUrl(l)):b.enablePluginDebug&&(k=320,l=240),n.success=b.success,mejs.MediaPluginBridge.registerPluginElement(m,n,j),o.className="me-plugin",o.id=m+"_container",a.isVideo?j.parentNode.insertBefore(o,j):document.body.insertBefore(o,document.body.childNodes[0]),i=["id="+m,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+k,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+l,"pseudostreamstart="+b.pseudoStreamingStartQueryParam],null!==a.url&&i.push("flash"==a.method?"file="+mejs.Utility.encodeUrl(a.url):"file="+a.url),b.enablePluginDebug&&i.push("debug=true"),b.enablePluginSmoothing&&i.push("smoothing=true"),b.enablePseudoStreaming&&i.push("pseudostreaming=true"),f&&i.push("controls=true"),b.pluginVars&&(i=i.concat(b.pluginVars)),a.method){case"silverlight":o.innerHTML='';break;case"flash":mejs.MediaFeatures.isIE?(g=document.createElement("div"),o.appendChild(g),g.outerHTML=''):o.innerHTML='';break;case"youtube":var r;-1!=a.url.lastIndexOf("youtu.be")?(r=a.url.substr(a.url.lastIndexOf("/")+1),-1!=r.indexOf("?")&&(r=r.substr(0,r.indexOf("?")))):r=a.url.substr(a.url.lastIndexOf("=")+1),youtubeSettings={container:o,containerId:o.id,pluginMediaElement:n,pluginId:m,videoId:r,height:l,width:k},mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case"vimeo":var s=m+"_player";if(n.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1),o.innerHTML='',"function"==typeof $f){var t=$f(o.childNodes[0]);t.addEvent("ready",function(){function a(a,b,c,d){var e={type:c,target:b};"timeupdate"==c&&(b.currentTime=e.currentTime=d.seconds,b.duration=e.duration=d.duration),b.dispatchEvent(e.type,e)}$.extend(t,{playVideo:function(){t.api("play")},stopVideo:function(){t.api("unload")},pauseVideo:function(){t.api("pause")},seekTo:function(a){t.api("seekTo",a)},setVolume:function(a){t.api("setVolume",a)},setMuted:function(a){a?(t.lastVolume=t.api("getVolume"),t.api("setVolume",0)):(t.api("setVolume",t.lastVolume),delete t.lastVolume)}}),t.addEvent("play",function(){a(t,n,"play"),a(t,n,"playing")}),t.addEvent("pause",function(){a(t,n,"pause")}),t.addEvent("finish",function(){a(t,n,"ended")}),t.addEvent("playProgress",function(b){a(t,n,"timeupdate",b)}),n.pluginElement=o,n.pluginApi=t,mejs.MediaPluginBridge.initPlugin(m)})}else console.warn("You need to include froogaloop for vimeo to work")}return j.style.display="none",j.removeAttribute("autoplay"),n},updateNative:function(a,b){var c,d=a.htmlMediaElement;for(c in mejs.HtmlMediaElement)d[c]=mejs.HtmlMediaElement[c];return b.success(d,d),d}},mejs.YouTubeApi={isIframeStarted:!1,isIframeLoaded:!1,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="//www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b),this.isIframeStarted=!0}},iframeQueue:[],enqueueIframe:function(a){this.isLoaded?this.createIframe(a):(this.loadIframeApi(),this.iframeQueue.push(a))},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId,{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c,mejs.MediaPluginBridge.initPlugin(a.pluginId),setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(a){mejs.YouTubeApi.handleStateChange(a.data,c,b)}}})},createEvent:function(a,b,c){var d={type:c,target:b};if(a&&a.getDuration){b.currentTime=d.currentTime=a.getCurrentTime(),b.duration=d.duration=a.getDuration(),d.paused=b.paused,d.ended=b.ended,d.muted=a.isMuted(),d.volume=a.getVolume()/100,d.bytesTotal=a.getVideoBytesTotal(),d.bufferedBytes=a.getVideoBytesLoaded();var e=d.bufferedBytes/d.bytesTotal*d.duration;d.target.buffered=d.buffered={start:function(){return 0},end:function(){return e},length:1}}b.dispatchEvent(d.type,d)},iFrameReady:function(){for(this.isLoaded=!0,this.isIframeLoaded=!0;this.iframeQueue.length>0;){var a=this.iframeQueue.pop();this.createIframe(a)}},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=a;var b,c="//www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+a.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";mejs.MediaFeatures.isIE?(b=document.createElement("div"),a.container.appendChild(b),b.outerHTML=''):a.container.innerHTML=''},flashReady:function(a){var b=this.flashPlayers[a],c=document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c,mejs.MediaPluginBridge.initPlugin(a),c.cueVideoById(b.videoId);var e=b.containerId+"_callback";window[e]=function(a){mejs.YouTubeApi.handleStateChange(a,c,d)},c.addEventListener("onStateChange",e),setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250),mejs.YouTubeApi.createEvent(c,d,"canplay")},handleStateChange:function(a,b,c){switch(a){case-1:c.paused=!0,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=!1,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=!1,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"play"),mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=!0,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress");break;case 5:}}},window.mejs=mejs,window.MediaElement=mejs.MediaElement,function(a,b){"use strict";var c={locale:{language:b.i18n&&b.i18n.locale.language||"",strings:b.i18n&&b.i18n.locale.strings||{}},ietf_lang_regex:/^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/,methods:{}};c.getLanguage=function(){var a=c.locale.language||window.navigator.userLanguage||window.navigator.language;return c.ietf_lang_regex.exec(a)?a:null},"undefined"!=typeof mejsL10n&&(c.locale.language=mejsL10n.language),c.methods.checkPlain=function(a){var b,c,d={"&":"&",'"':""","<":"<",">":">"};a=String(a);for(b in d)d.hasOwnProperty(b)&&(c=new RegExp(b,"g"),a=a.replace(c,d[b]));return a},c.methods.t=function(a,b){return c.locale.strings&&c.locale.strings[b.context]&&c.locale.strings[b.context][a]&&(a=c.locale.strings[b.context][a]),c.methods.checkPlain(a)},c.t=function(a,b){if("string"==typeof a&&a.length>0){var d=c.getLanguage();return b=b||{context:d},c.methods.t(a,b)}throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."}},b.i18n=c}(document,mejs),function(a){"use strict";"undefined"!=typeof mejsL10n&&(a[mejsL10n.language]=mejsL10n.strings)}(mejs.i18n.locale.strings),/*! + * + * MediaElementPlayer + * http://mediaelementjs.com/ diff --git a/wordpress-4.1-noupdate.patch b/wordpress-4.1-noupdate.patch new file mode 100644 index 0000000..9578b76 --- /dev/null +++ b/wordpress-4.1-noupdate.patch @@ -0,0 +1,86 @@ +diff -up wordpress/wp-admin/includes/class-wp-upgrader.php.rpm wordpress/wp-admin/includes/class-wp-upgrader.php +--- wordpress/wp-admin/includes/class-wp-upgrader.php.rpm 2014-12-16 20:54:23.000000000 +0100 ++++ wordpress/wp-admin/includes/class-wp-upgrader.php 2014-12-22 06:46:28.487097611 +0100 +@@ -2141,6 +2141,9 @@ class Core_Upgrader extends WP_Upgrader + } + } + ++ // RPM: nether allow core update ++ return false; ++ + // 1: If we're already on that version, not much point in updating? + if ( $offered_ver == $wp_version ) + return false; +@@ -2372,7 +2375,7 @@ class WP_Automatic_Updater { + */ + public function is_disabled() { + // Background updates are disabled if you don't want file changes. +- if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) ++ if ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS ) + return true; + + if ( defined( 'WP_INSTALLING' ) ) +diff -up wordpress/wp-admin/includes/update.php.rpm wordpress/wp-admin/includes/update.php +--- wordpress/wp-admin/includes/update.php.rpm 2014-11-30 12:28:24.000000000 +0100 ++++ wordpress/wp-admin/includes/update.php 2014-12-22 06:46:28.487097611 +0100 +@@ -211,8 +211,6 @@ function update_nag() { + } + echo "
$msg
"; + } +-add_action( 'admin_notices', 'update_nag', 3 ); +-add_action( 'network_admin_notices', 'update_nag', 3 ); + + // Called directly from dashboard + function update_right_now_message() { +@@ -227,7 +225,7 @@ function update_right_now_message() { + $cur = get_preferred_from_update_core(); + + if ( isset( $cur->response ) && $cur->response == 'upgrade' ) +- $msg .= " " . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . ''; ++ $msg .= ''; + } + + echo "

$msg

"; +diff -up wordpress/wp-includes/capabilities.php.rpm wordpress/wp-includes/capabilities.php +--- wordpress/wp-includes/capabilities.php.rpm 2014-12-01 02:34:24.000000000 +0100 ++++ wordpress/wp-includes/capabilities.php 2014-12-22 06:46:28.487097611 +0100 +@@ -1255,7 +1255,7 @@ function map_meta_cap( $cap, $user_id ) + // Disallow the file editors. + if ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT ) + $caps[] = 'do_not_allow'; +- elseif ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) ++ elseif ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS ) + $caps[] = 'do_not_allow'; + elseif ( is_multisite() && ! is_super_admin( $user_id ) ) + $caps[] = 'do_not_allow'; +@@ -1273,7 +1273,7 @@ function map_meta_cap( $cap, $user_id ) + case 'update_core': + // Disallow anything that creates, deletes, or updates core, plugin, or theme files. + // Files in uploads are excepted. +- if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) { ++ if ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS ) { + $caps[] = 'do_not_allow'; + } elseif ( is_multisite() && ! is_super_admin( $user_id ) ) { + $caps[] = 'do_not_allow'; +diff -up wordpress/wp-includes/update.php.rpm wordpress/wp-includes/update.php +--- wordpress/wp-includes/update.php.rpm 2014-12-22 06:48:34.883575009 +0100 ++++ wordpress/wp-includes/update.php 2014-12-22 06:48:44.144609988 +0100 +@@ -626,9 +626,6 @@ function _maybe_update_themes() { + * @since 3.1.0 + */ + function wp_schedule_update_checks() { +- if ( !wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING') ) +- wp_schedule_event(time(), 'twicedaily', 'wp_version_check'); +- + if ( !wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING') ) + wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins'); + +@@ -671,8 +668,6 @@ if ( ( ! is_main_site() && ! is_network_ + } + + add_action( 'admin_init', '_maybe_update_core' ); +-add_action( 'wp_version_check', 'wp_version_check' ); +-add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 ); + + add_action( 'load-plugins.php', 'wp_update_plugins' ); + add_action( 'load-update.php', 'wp_update_plugins' ); diff --git a/wordpress-FSF-address.patch b/wordpress-FSF-address.patch deleted file mode 100644 index 8992779..0000000 --- a/wordpress-FSF-address.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up wordpress/wp-includes/kses.php.FSFaddr wordpress/wp-includes/kses.php ---- wordpress/wp-includes/kses.php.FSFaddr 2011-05-25 23:54:34.347025847 +0200 -+++ wordpress/wp-includes/kses.php 2011-05-25 23:56:18.403727954 +0200 -@@ -15,7 +15,7 @@ - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., -- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit -+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * http://www.gnu.org/licenses/gpl.html - * - * [kses strips evil scripts!] diff --git a/wordpress.spec b/wordpress.spec index e3d91c9..2dd32ad 100644 --- a/wordpress.spec +++ b/wordpress.spec @@ -1,19 +1,31 @@ +%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} %global wp_content %{_datadir}/wordpress/wp-content -%global betatag RC3 -Summary: Blog tool and publishing platform -URL: http://www.wordpress.org -Name: wordpress -Version: 3.6 -Group: Applications/Publishing -#Release: 0.5.%{betatag}%{?dist} -Release: 1%{?dist} -License: GPLv2 -#Source0: http://wordpress.org/%{name}-%{version}-%{betatag}.tar.gz -Source0: http://wordpress.org/%{name}-%{version}.tar.gz -Source1: wordpress-httpd-conf -Source2: README.fedora.wordpress -Source3: README.fedora.wordpress-mu +%if 0%{?rhel} == 5 +%global with_cacert 0 +%else +%global with_cacert 1 +%endif +# https://bugzilla.redhat.com/1147817 php53-getid3 review +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6 +%global with_getid3 1 +%else +%global with_getid3 0 +%endif + +Summary: Blog tool and publishing platform +URL: http://www.wordpress.org +Name: wordpress +Version: 4.1 +Group: Applications/Publishing +Release: 1%{?dist} +License: GPLv2 + +Source0: http://wordpress.org/%{name}-%{version}.tar.gz +Source1: wordpress-httpd-conf +Source2: README.fedora.wordpress +Source3: README.fedora.wordpress-mu + # Patch out copyrighted text of Hello, Dolly # (and replace it with Free Software Song) Patch0: wordpress-debian_patches_hello.patch @@ -21,15 +33,26 @@ Patch0: wordpress-debian_patches_hello.patch # This patch doesn’t work well, see bugzilla.redhat.com/522897 Patch1: wordpress-move-wp-content.patch # Drop swfupload: not built from source, not reasonably possible to do -Patch2: wordpress-3.6-no_swfupload.patch +Patch2: wordpress-3.9-no_swfupload.patch # Adjust tinymce's media plugin not to use its SWF plugin. This changes # 'p.getParam("flash_video_player_url",u.convertUrl(u.url+"/moxieplayer.swf"))' # to 'false' -Patch3: wordpress-3.6-tinymce_noflash.patch +Patch3: wordpress-4.0-tinymce_noflash.patch # Adjust mediaelement not to use its SWF and Silverlight plugins. This # changes 'plugins:["flash,"silverlight","youtube","vimeo"]' to # 'plugins:["youtube","vimeo"]' -Patch4: wordpress-3.6-mediaelement-noflash_silverlight.patch +Patch4: wordpress-4.1-mediaelement-noflash_silverlight.patch +# RPM configuration: +# Path to installation +# Disable auto-updater +Patch5: wordpress-4.0-config.patch +# RPM are readonly +# disable version check and updated +# change DISALLOW_FILE_MODS default value to true +# ignore WP_AUTO_UPDATE_CORE (always false) +Patch6: wordpress-4.1-noupdate.patch +# Use system libraries +Patch7: wordpress-4.0-systemlibs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -37,19 +60,26 @@ BuildArch: noarch %if 0%{?rhel} == 5 Requires: php53 >= 5.2.4 Requires: php53-simplepie >= 1.3.1 +%if %{with_getid3} +Requires: php53-getid3 +%endif %else Requires: php >= 5.2.4 Requires: php-simplepie >= 1.3.1 +%if %{with_getid3} +Requires: php-getid3 %endif -# Required php extension (detected by phpci) +%endif +# From phpcompatinfo report for version 3.8 Requires: php-curl Requires: php-date Requires: php-dom Requires: php-enchant -# not yet available for RHEL Requires: php-ereg +Requires: php-ereg Requires: php-exif Requires: php-fileinfo -# not yet available for RHEL Requires: php-filter +Requires: php-ftp +Requires: php-gd Requires: php-gettext Requires: php-hash Requires: php-iconv @@ -59,18 +89,20 @@ Requires: php-mbstring Requires: php-mysql Requires: php-openssl Requires: php-pcre -Requires: php-pdo Requires: php-posix -Requires: php-reflection Requires: php-simplexml Requires: php-sockets Requires: php-spl Requires: php-tokenizer +Requires: php-xml Requires: php-zip Requires: php-zlib # Unbundled libraries Requires: php-PHPMailer -Requires: webserver +Requires: httpd +%if %{with_cacert} +Requires: ca-certificates +%endif Provides: wordpress-mu = %{version}-%{release} Obsoletes: wordpress-mu < 2.9.3 @@ -78,6 +110,9 @@ Obsoletes: wordpress-mu < 2.9.3 Wordpress is an online publishing / weblog package that makes it very easy, almost trivial, to get information out to people on the web. +Important information in %{_pkgdocdir}/README.fedora + + %prep %setup -q -n wordpress @@ -94,43 +129,69 @@ almost trivial, to get information out to people on the web. # and draw a non-functional button. - AdamW, 2013/08 # https://fedoraproject.org/wiki/Packaging:Guidelines#No_inclusion_of_pre-built_binaries_or_libraries -rm -f wp-includes/js/mediaelement/silverlightmediaelement.xap -rm -f wp-includes/js/mediaelement/flashmediaelement.sw -rm -f wp-includes/js/tinymce/plugins/media/moxieplayer.swf -rm -f wp-includes/js/plupload/plupload.silverlight.xap -rm -f wp-includes/js/plupload/plupload.silverlight.js -rm -f wp-includes/js/plupload/plupload.flash.swf -rm -f wp-includes/js/plupload/plupload.flash.js +rm wp-includes/js/mediaelement/silverlightmediaelement.xap +rm wp-includes/js/mediaelement/flashmediaelement.swf +rm wp-includes/js/tinymce/plugins/media/moxieplayer.swf +rm wp-includes/js/plupload/plupload.silverlight.xap +rm wp-includes/js/plupload/plupload.flash.swf # swfupload can just die in its entirety rm -rf wp-includes/js/swfupload +# remove .htaccess, protected by httpd config file +rm wp-content/plugins/akismet/.htaccess + %patch0 -p1 -b .dolly -#%patch1 -p1 -b .rhbz522897 +#patch1 -p1 -b .rhbz522897 %patch2 -p1 %patch3 -p1 %patch4 -p1 +%if %{with_getid3} +%patch7 -p1 +%endif + +# We patch a .js file, used patched file instead of unpatch minified one +ln -sf plugin.js wp-includes/js/tinymce/plugins/media/plugin.min.js + +# Re-Generated the archive +arc=wp-includes/js/tinymce/wp-tinymce.js +gunzip -dc $arc.gz | \ + grep "^// Source" | \ + while read a b c +do + if [ -f $c ]; then + echo -e "\n$a $b $c" + cat $c + else + exit 1 + fi +done >$arc +gzip --force $arc +ls -l $arc.gz + +# Create RPM configuration +cp wp-config-sample.php wp-config.php +%patch5 -p1 +%patch6 -p1 -# disable wp_version_check, updates are always installed via rpm -sed -i -e "s,\(.*\)'wp_version_check'\(.*\),#\1'wp_version_check'\2,g" \ - wp-includes/update.php -# disable update_nag() function -sed -i -e "s,\(.*\)'update_nag'\(.*\),#\1'update_nag'\2,g; \ - s,\(.*\)\$msg .=\(.*\),\1\$msg .= '';,g;" \ - wp-admin/includes/update.php # fix file encoding sed -i -e 's/\r//' license.txt + %build %install -mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/wordpress -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/wordpress +# Apache configuration install -m 0644 -D -p %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/wordpress.conf + +# Application +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/wordpress cp -pr * ${RPM_BUILD_ROOT}%{_datadir}/wordpress -cat wp-config-sample.php | sed -e "s|dirname(__FILE__).'/'|'/usr/share/wordpress/'|g" > \ - ${RPM_BUILD_ROOT}%{_sysconfdir}/wordpress/wp-config.php + +# Configuration +install -m 0644 -D wp-config.php ${RPM_BUILD_ROOT}%{_sysconfdir}/wordpress/wp-config.php /bin/ln -sf ../../../etc/wordpress/wp-config.php ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-config.php + /bin/cp %{SOURCE2} ./README.fedora /bin/cp %{SOURCE3} ./README.fedora-multiuser @@ -143,12 +204,12 @@ find ${RPM_BUILD_ROOT} -type f -empty -exec rm -vf {} \; rm -f ${RPM_BUILD_ROOT}%{_datadir}/wordpress/{license.txt,readme.html} # Remove bundled php-simplepie and link to system copy -rm ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/class-simplepie.php -rm -rf ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/SimplePie +rm ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/class-simplepie.php +rm -r ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/SimplePie %if 0%{?rhel} == 5 -ln -sf /usr/share/php/php53-simplepie/autoloader.php \ +ln -s /usr/share/php/php53-simplepie/autoloader.php \ %else -ln -sf /usr/share/php/php-simplepie/autoloader.php \ +ln -s /usr/share/php/php-simplepie/autoloader.php \ %endif ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/class-simplepie.php @@ -160,8 +221,20 @@ for fic in phpmailer smtp; do ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/class-$fic.php done +%if %{with_getid3} +# Remove bundled php-getid3 +rm -r ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/ID3 +%endif + +# Remove bundled ca-bundle.crt +%if %{with_cacert} +rm ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/certificates/ca-bundle.crt +ln -s /etc/pki/tls/certs/ca-bundle.crt \ + ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/certificates/ca-bundle.crt +%endif + # Remove backup copies of patches -find ${RPM_BUILD_ROOT} \( -name \*.dolly -o -name \*.rhbz522897 -o -name \*.FSFaddr \) \ +find ${RPM_BUILD_ROOT} \( -name \*.dolly -o -name \*.rhbz522897 -o -name \*.orig \) \ -print -delete ## Move wp-content directory to /var/www location @@ -177,6 +250,7 @@ find ${RPM_BUILD_ROOT} \( -name \*.dolly -o -name \*.rhbz522897 -o -name \*.FSFa #/sbin/restorecon -R %{_localstatedir}/www/wordpress/ #fi + %clean rm -rf ${RPM_BUILD_ROOT} @@ -195,16 +269,79 @@ rm -rf ${RPM_BUILD_ROOT} %dir %attr(0775,apache,ftp) %{wp_content}/uploads %{wp_content}/plugins/* %{wp_content}/themes/* -%doc license.txt +%{!?_licensedir:%global license %%doc} +%license license.txt %doc readme.html %doc README.fedora %doc README.fedora-multiuser %{_datadir}/wordpress/wp-*.php -%config(noreplace) %{_sysconfdir}/wordpress/wp-config.php +%attr(750,root,apache) %dir %{_sysconfdir}/wordpress +%attr(640,root,apache) %config(noreplace) %{_sysconfdir}/wordpress/wp-config.php %{_datadir}/wordpress/xmlrpc.php -%dir %{_sysconfdir}/wordpress %changelog +* Mon Dec 22 2014 Remi Collet - 4.1-1 +- WordPress 4.1 “Dinah” + +* Fri Nov 21 2014 Remi Collet - 4.0.1-1 +- WordPress 4.0.1 Security Release +- use system php-getid3 when available #1145574 + +* Mon Sep 8 2014 Remi Collet - 4.0-1 +- WordPress 4.0 “Benny” + +* Fri Aug 8 2014 Remi Collet - 3.9.2-3 +- config dir only readable by apache group, better fix for #1124582 +- fix license handling + +* Thu Aug 7 2014 Remi Collet - 3.9.2-2 +- update to 3.9.2 Security Release #1127547 +- config file only readable by apache user (httpd or php-fpm) #1124582 + +* Fri May 9 2014 Remi Collet - 3.9.1-1 +- update to 3.9.1 Maintenance Release + +* Wed May 7 2014 Remi Collet - 3.9-1 +- update to 3.9 “Smith” + +* Tue Apr 15 2014 Remi Collet - 3.8.3-1 +- update to 3.8.3 Maintenance Release + http://wordpress.org/news/2014/04/wordpress-3-8-3/ + +* Wed Apr 9 2014 Remi Collet - 3.8.2-1 +- update to 3.8.2 Security Release +- fix privilege escalation issue CVE-2014-0165 +- fix authentication bypass issue CVE-2014-0166 + +* Sat Jan 25 2014 Remi Collet - 3.8.1-3 +- ignore WP_AUTO_UPDATE_CORE (always false) + +* Fri Jan 24 2014 Remi Collet - 3.8.1-2 +- comment provided configuration about auto-updater +- disable auto-updater on default configuration #1057521 +- switch some sed to patch (more robust) + +* Thu Jan 23 2014 Adam Williamson - 3.8.1-1 +- new upstream release 3.8.1 (bugfixes) + +* Mon Dec 16 2013 Remi Collet - 3.8-1 +- update to 3.8 “Parker” #1043104 +- link to README.fedora in package description +- add note about optional packages #1037516 +- add php dependencies: ereg, ftp, gd, xml +- del php dependencies: pdo, reflection + +* Wed Oct 30 2013 Remi Collet - 3.7.1-1 +- update to 3.7.1 (bugfixes) + +* Fri Oct 25 2013 Remi Collet - 3.7-1 +- update to 3.7 +- requires ca-certificates for ca-bundle.crt + +* Thu Sep 12 2013 Paul Wouters - 3.6.1-1 +- update to 3.6.1, various bugs and security fixes: + CVE-2013-4338 CVE-2013-4339 CVE-2013-4340 + * Thu Aug 22 2013 Adam Williamson - 3.6.0-1 - update to 3.6.0 - drop pre-compiled Flash and Silverlight binaries - #1000267