WordPress 4.4 “Clifford”

This commit is contained in:
Remi Collet 2015-12-09 17:24:26 +01:00
commit 5b3b5187e7
11 changed files with 129 additions and 154 deletions

1
.gitignore vendored
View file

@ -21,3 +21,4 @@ clog
/wordpress-4.2.4.tar.gz
/wordpress-4.3.tar.gz
/wordpress-4.3.1.tar.gz
/wordpress-4.4.tar.gz

View file

@ -1 +1 @@
de8004fa1035817435eaa780a681aaff wordpress-4.3.1.tar.gz
9b965ba1a1b0e033b4c090dd0b6d6ee7 wordpress-4.4.tar.gz

View file

@ -1,7 +1,7 @@
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
@@ -66,6 +66,19 @@ define('NONCE_SALT', 'put your uni
$table_prefix = 'wp_';
/**
@ -21,7 +21,7 @@ diff -up wordpress/wp-config.php.orig wordpress/wp-config.php
* 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);
@@ -83,7 +96,7 @@ define('WP_DEBUG', false);
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )

View file

@ -1,21 +0,0 @@
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 );

View file

@ -1,7 +1,7 @@
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
@@ -46,10 +46,6 @@ tinymce.PluginManager.add('media', funct
return 'video/ogg';
}
@ -12,7 +12,7 @@ diff -up wordpress/wp-includes/js/tinymce/plugins/media/plugin.js.rpm wordpress/
return '';
}
@@ -239,7 +235,7 @@ tinymce.PluginManager.add('media', funct
@@ -247,7 +243,7 @@ tinymce.PluginManager.add('media', funct
data.source1mime = guessMime(data.source1);
data.source2mime = guessMime(data.source2);
data.poster = editor.convertURL(data.poster, "poster");

File diff suppressed because one or more lines are too long

View file

@ -1,97 +0,0 @@
diff -up wordpress/wp-admin/includes/admin-filters.php.noupdate wordpress/wp-admin/includes/admin-filters.php
--- wordpress/wp-admin/includes/admin-filters.php.noupdate 2015-08-26 09:56:30.113424058 +0200
+++ wordpress/wp-admin/includes/admin-filters.php 2015-08-26 09:56:50.729529575 +0200
@@ -101,7 +101,6 @@ add_action( 'profile_update', 'default_p
add_action( 'admin_init', 'wp_plugin_update_rows' );
add_action( 'admin_init', 'wp_theme_update_rows' );
-add_action( 'admin_notices', 'update_nag', 3 );
add_action( 'admin_notices', 'maintenance_nag', 10 );
add_filter( 'update_footer', 'core_update_footer' );
diff -up wordpress/wp-admin/includes/class-wp-upgrader.php.noupdate wordpress/wp-admin/includes/class-wp-upgrader.php
--- wordpress/wp-admin/includes/class-wp-upgrader.php.noupdate 2015-07-29 16:57:25.000000000 +0200
+++ wordpress/wp-admin/includes/class-wp-upgrader.php 2015-08-26 09:55:58.269261073 +0200
@@ -2276,6 +2276,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;
@@ -2510,7 +2513,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/ms-admin-filters.php.noupdate wordpress/wp-admin/includes/ms-admin-filters.php
--- wordpress/wp-admin/includes/ms-admin-filters.php.noupdate 2015-08-26 09:57:03.337594106 +0200
+++ wordpress/wp-admin/includes/ms-admin-filters.php 2015-08-26 09:57:09.398625127 +0200
@@ -38,5 +38,4 @@ add_action( 'admin_notices', 'si
add_action( 'network_admin_notices', 'site_admin_notice' );
// Update Hooks
-add_action( 'network_admin_notices', 'update_nag', 3 );
add_action( 'network_admin_notices', 'maintenance_nag', 10 );
diff -up wordpress/wp-admin/includes/update.php.noupdate wordpress/wp-admin/includes/update.php
--- wordpress/wp-admin/includes/update.php.noupdate 2015-07-07 02:02:24.000000000 +0200
+++ wordpress/wp-admin/includes/update.php 2015-08-26 09:56:00.298271458 +0200
@@ -251,7 +251,7 @@ function update_right_now_message() {
$cur = get_preferred_from_update_core();
if ( isset( $cur->response ) && $cur->response == 'upgrade' )
- $msg .= '<a href="' . network_admin_url( 'update-core.php' ) . '" class="button" aria-describedby="wp-version">' . sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a> ';
+ $msg .= '';
}
$msg .= sprintf( '<span id="wp-version">' . __( 'WordPress %1$s running %2$s theme.' ) . '</span>', get_bloginfo( 'version', 'display' ), $theme_name );
diff -up wordpress/wp-includes/capabilities.php.noupdate wordpress/wp-includes/capabilities.php
--- wordpress/wp-includes/capabilities.php.noupdate 2015-08-14 00:31:24.000000000 +0200
+++ wordpress/wp-includes/capabilities.php 2015-08-26 09:56:00.299271463 +0200
@@ -1337,7 +1337,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';
@@ -1355,7 +1355,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.noupdate wordpress/wp-includes/update.php
--- wordpress/wp-includes/update.php.noupdate 2015-05-28 17:29:28.000000000 +0200
+++ wordpress/wp-includes/update.php 2015-08-26 09:56:00.299271463 +0200
@@ -636,9 +636,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');
@@ -680,8 +677,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' );

View file

@ -1,7 +1,6 @@
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
@@ -280,15 +280,6 @@
--- wordpress/wp-includes/script-loader.php.orig 2015-12-09 16:51:44.740328793 +0100
+++ wordpress/wp-includes/script-loader.php 2015-12-09 16:53:00.870701835 +0100
@@ -300,15 +300,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 );
@ -16,4 +15,4 @@ diff -up wordpress/wp-includes/script-loader.php.orig wordpress/wp-includes/scri
-
$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' );
$scripts->add( 'json2', "/wp-includes/js/json2$suffix.js", array(), '2015-05-03' );

View file

@ -0,0 +1,88 @@
diff -up wordpress/wp-admin/includes/admin-filters.php.orig wordpress/wp-admin/includes/admin-filters.php
--- wordpress/wp-admin/includes/admin-filters.php.orig 2015-10-15 00:35:24.000000000 +0200
+++ wordpress/wp-admin/includes/admin-filters.php 2015-12-09 17:08:00.945112230 +0100
@@ -100,7 +100,6 @@ add_action( 'profile_update', 'default_p
add_action( 'admin_init', 'wp_plugin_update_rows' );
add_action( 'admin_init', 'wp_theme_update_rows' );
-add_action( 'admin_notices', 'update_nag', 3 );
add_action( 'admin_notices', 'maintenance_nag', 10 );
add_filter( 'update_footer', 'core_update_footer' );
diff -up wordpress/wp-admin/includes/class-wp-upgrader.php.orig wordpress/wp-admin/includes/class-wp-upgrader.php
--- wordpress/wp-admin/includes/class-wp-upgrader.php.orig 2015-11-16 03:47:25.000000000 +0100
+++ wordpress/wp-admin/includes/class-wp-upgrader.php 2015-12-09 17:09:34.735571806 +0100
@@ -2386,6 +2386,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;
@@ -2627,7 +2630,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 ( wp_installing() )
diff -up wordpress/wp-admin/includes/update.php.orig wordpress/wp-admin/includes/update.php
--- wordpress/wp-admin/includes/update.php.orig 2015-12-09 17:08:00.946112235 +0100
+++ wordpress/wp-admin/includes/update.php 2015-12-09 17:10:27.642831054 +0100
@@ -251,7 +251,7 @@ function update_right_now_message() {
$cur = get_preferred_from_update_core();
if ( isset( $cur->response ) && $cur->response == 'upgrade' )
- $msg .= '<a href="' . network_admin_url( 'update-core.php' ) . '" class="button" aria-describedby="wp-version">' . sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a> ';
+ $msg .= '';
}
/* translators: 1: version number, 2: theme name */
diff -up wordpress/wp-includes/capabilities.php.orig wordpress/wp-includes/capabilities.php
--- wordpress/wp-includes/capabilities.php.orig 2015-11-29 03:27:18.000000000 +0100
+++ wordpress/wp-includes/capabilities.php 2015-12-09 17:08:00.946112235 +0100
@@ -308,7 +308,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';
@@ -326,7 +326,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.orig wordpress/wp-includes/update.php
--- wordpress/wp-includes/update.php.orig 2015-12-06 16:44:27.000000000 +0100
+++ wordpress/wp-includes/update.php 2015-12-09 17:12:09.038327895 +0100
@@ -637,9 +637,6 @@ function _maybe_update_themes() {
* @since 3.1.0
*/
function wp_schedule_update_checks() {
- if ( ! wp_next_scheduled( 'wp_version_check' ) && ! wp_installing() )
- wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
-
if ( ! wp_next_scheduled( 'wp_update_plugins' ) && ! wp_installing() )
wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
@@ -681,8 +678,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' );

View file

@ -0,0 +1,20 @@
--- wordpress/wp-admin/includes/media.php.orig 2015-12-09 17:01:52.453306607 +0100
+++ wordpress/wp-admin/includes/media.php 2015-12-09 17:05:31.477379833 +0100
@@ -2989,7 +2989,7 @@ function wp_read_video_metadata( $file )
}
if ( ! class_exists( 'getID3', false ) ) {
- require( ABSPATH . WPINC . '/ID3/getid3.php' );
+ require( '/usr/share/php/getid3/getid3.php' );
}
$id3 = new getID3();
$data = $id3->analyze( $file );
@@ -3050,7 +3050,7 @@ function wp_read_audio_metadata( $file )
}
if ( ! class_exists( 'getID3', false ) ) {
- require( ABSPATH . WPINC . '/ID3/getid3.php' );
+ require( '/usr/share/php/getid3/getid3.php' );
}
$id3 = new getID3();
$data = $id3->analyze( $file );

View file

@ -23,7 +23,7 @@
Summary: Blog tool and publishing platform
URL: http://www.wordpress.org
Name: wordpress
Version: 4.3.1
Version: 4.4
Group: Applications/Publishing
Release: 1%{?dist}
License: GPLv2
@ -40,15 +40,11 @@ Patch0: wordpress-debian_patches_hello.patch
# This patch doesnt 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-4.2-no_swfupload.patch
Patch2: wordpress-4.4-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-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-4.3-mediaelement-noflash_silverlight.patch
# RPM configuration:
# Path to installation
# Disable auto-updater
@ -57,9 +53,9 @@ Patch5: wordpress-4.0-config.patch
# disable version check and updated
# change DISALLOW_FILE_MODS default value to true
# ignore WP_AUTO_UPDATE_CORE (always false)
Patch6: wordpress-4.3-noupdate.patch
Patch6: wordpress-4.4-noupdate.patch
# Use system libraries
Patch7: wordpress-4.0-systemlibs.patch
Patch7: wordpress-4.4-systemlibs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@ -152,7 +148,10 @@ rm wp-content/plugins/akismet/.htaccess
#patch1 -p1 -b .rhbz522897
%patch2 -p1
%patch3 -p1
%patch4 -p0
# Adjust mediaelement not to use its SWF and Silverlight plugins. This
# changes 'plugins:["flash,"silverlight","youtube","vimeo"]' to
# 'plugins:["youtube","vimeo"]'
sed -s 's/"flash","silverlight",//' -i wp-includes/js/mediaelement/mediaelement-and-player.min.js
%if %{with_getid3}
%patch7 -p1
%endif
@ -288,6 +287,9 @@ rm -rf ${RPM_BUILD_ROOT}
%changelog
* Wed Dec 9 2015 Remi Collet <remi@fedoraproject.org> - 4.4-1
- WordPress 4.4 “Clifford”
* Wed Sep 16 2015 Remi Collet <remi@fedoraproject.org> - 4.3.1-1
- WordPress 4.3.1 Security and Maintenance Release