WordPress 4.6 “Pepper”
This commit is contained in:
parent
7f1973e176
commit
1566c78f92
6 changed files with 111 additions and 176 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -29,3 +29,4 @@ clog
|
|||
/wordpress-4.5.1.tar.gz
|
||||
/wordpress-4.5.2.tar.gz
|
||||
/wordpress-4.5.3.tar.gz
|
||||
/wordpress-debian_patches_hello.patch
|
||||
|
|
|
|||
|
|
@ -1,61 +0,0 @@
|
|||
From 777aa69bd4689ea9d31d944acde2d5bd06a2ec88 Mon Sep 17 00:00:00 2001
|
||||
From: Remi Collet <fedora@famillecollet.com>
|
||||
Date: Mon, 27 Jun 2016 06:49:31 +0200
|
||||
Subject: [PATCH] clean split usage and ereg dependency
|
||||
|
||||
---
|
||||
wp-includes/atomlib.php | 10 ++++++----
|
||||
wp-includes/rss.php | 2 +-
|
||||
2 files changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/wp-includes/atomlib.php b/wp-includes/atomlib.php
|
||||
index 271635f..f9862f9 100644
|
||||
--- a/wp-includes/atomlib.php
|
||||
+++ b/wp-includes/atomlib.php
|
||||
@@ -159,7 +159,8 @@ class AtomParser {
|
||||
|
||||
function start_element($parser, $name, $attrs) {
|
||||
|
||||
- $tag = array_pop(split(":", $name));
|
||||
+ $tag = explode(":", $name);
|
||||
+ $tag = array_pop($tag);
|
||||
|
||||
switch($name) {
|
||||
case $this->NS . ':feed':
|
||||
@@ -238,7 +239,8 @@ class AtomParser {
|
||||
|
||||
function end_element($parser, $name) {
|
||||
|
||||
- $tag = array_pop(split(":", $name));
|
||||
+ $tag = explode(":", $name);
|
||||
+ $tag = array_pop($tag);
|
||||
|
||||
$ccount = count($this->in_content);
|
||||
|
||||
@@ -312,8 +314,8 @@ class AtomParser {
|
||||
|
||||
|
||||
function ns_to_prefix($qname, $attr=false) {
|
||||
- # split 'http://www.w3.org/1999/xhtml:div' into ('http','//www.w3.org/1999/xhtml','div')
|
||||
- $components = split(":", $qname);
|
||||
+ # explode 'http://www.w3.org/1999/xhtml:div' into ('http','//www.w3.org/1999/xhtml','div')
|
||||
+ $components = explode(":", $qname);
|
||||
|
||||
# grab the last one (e.g 'div')
|
||||
$name = array_pop($components);
|
||||
diff --git a/wp-includes/rss.php b/wp-includes/rss.php
|
||||
index 548ccf2..71146ed 100644
|
||||
--- a/wp-includes/rss.php
|
||||
+++ b/wp-includes/rss.php
|
||||
@@ -114,7 +114,7 @@ class MagpieRSS {
|
||||
// check for a namespace, and split if found
|
||||
$ns = false;
|
||||
if ( strpos( $element, ':' ) ) {
|
||||
- list($ns, $el) = split( ':', $element, 2);
|
||||
+ list($ns, $el) = explode( ':', $element, 2);
|
||||
}
|
||||
if ( $ns and $ns != 'rdf' ) {
|
||||
$this->current_namespace = $ns;
|
||||
--
|
||||
2.5.5
|
||||
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
6cd70fcceb7050bfe22fc03e801e0305 wordpress-4.5.3.tar.gz
|
||||
550ed1b2b5c8bd585e7bb1b548cb6215 wordpress-debian_patches_hello.patch
|
||||
|
|
|
|||
|
|
@ -1,108 +0,0 @@
|
|||
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
|
||||
@@ -2465,6 +2465,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;
|
||||
@@ -2706,7 +2709,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
|
||||
@@ -310,7 +310,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';
|
||||
@@ -328,7 +328,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
|
||||
@@ -653,9 +653,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');
|
||||
|
||||
@@ -683,8 +680,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' );
|
||||
--- wordpress/wp-admin/includes/translation-install.php.orig 2016-03-25 14:48:58.616147092 +0100
|
||||
+++ wordpress/wp-admin/includes/translation-install.php 2016-03-25 14:50:43.841612441 +0100
|
||||
@@ -181,7 +181,7 @@ function wp_download_language_pack( $dow
|
||||
return $download;
|
||||
}
|
||||
|
||||
- if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) {
|
||||
+ if ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ function wp_download_language_pack( $dow
|
||||
* @return bool Returns true on success, false on failure.
|
||||
*/
|
||||
function wp_can_install_language_pack() {
|
||||
- if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) {
|
||||
+ if ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
103
wordpress-4.6-noupdate.patch
Normal file
103
wordpress-4.6-noupdate.patch
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
diff -up wordpress/wp-admin/includes/admin-filters.php.rpm wordpress/wp-admin/includes/admin-filters.php
|
||||
--- wordpress/wp-admin/includes/admin-filters.php.rpm 2016-09-03 07:50:51.812312381 +0200
|
||||
+++ wordpress/wp-admin/includes/admin-filters.php 2016-09-03 07:51:39.070577518 +0200
|
||||
@@ -106,7 +106,6 @@ add_action( 'profile_update', 'default_p
|
||||
add_action( 'load-plugins.php', 'wp_plugin_update_rows', 20 ); // After wp_update_plugins() is called.
|
||||
add_action( 'load-themes.php', 'wp_theme_update_rows', 20 ); // After wp_update_themes() is called.
|
||||
|
||||
-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-core-upgrader.php.rpm wordpress/wp-admin/includes/class-core-upgrader.php
|
||||
--- wordpress/wp-admin/includes/class-core-upgrader.php.rpm 2016-09-03 07:59:45.832367671 +0200
|
||||
+++ wordpress/wp-admin/includes/class-core-upgrader.php 2016-09-03 07:59:50.160392833 +0200
|
||||
@@ -236,6 +236,9 @@ class Core_Upgrader extends WP_Upgrader
|
||||
* @return bool True if we should update to the offered version, otherwise false.
|
||||
*/
|
||||
public static function should_update_to_version( $offered_ver ) {
|
||||
+ // RPM: nether allow core update
|
||||
+ return false;
|
||||
+
|
||||
include( ABSPATH . WPINC . '/version.php' ); // $wp_version; // x.y.z
|
||||
|
||||
$current_branch = implode( '.', array_slice( preg_split( '/[.-]/', $wp_version ), 0, 2 ) ); // x.y
|
||||
diff -up wordpress/wp-admin/includes/class-wp-automatic-updater.php.rpm wordpress/wp-admin/includes/class-wp-automatic-updater.php
|
||||
--- wordpress/wp-admin/includes/class-wp-automatic-updater.php.rpm 2016-09-03 08:00:15.810540773 +0200
|
||||
+++ wordpress/wp-admin/includes/class-wp-automatic-updater.php 2016-09-03 08:00:28.915616106 +0200
|
||||
@@ -31,7 +31,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/translation-install.php.rpm wordpress/wp-admin/includes/translation-install.php
|
||||
--- wordpress/wp-admin/includes/translation-install.php.rpm 2016-05-22 20:01:30.000000000 +0200
|
||||
+++ wordpress/wp-admin/includes/translation-install.php 2016-09-03 07:50:51.813312387 +0200
|
||||
@@ -181,7 +181,7 @@ function wp_download_language_pack( $dow
|
||||
return $download;
|
||||
}
|
||||
|
||||
- if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) {
|
||||
+ if ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ function wp_download_language_pack( $dow
|
||||
* @return bool Returns true on success, false on failure.
|
||||
*/
|
||||
function wp_can_install_language_pack() {
|
||||
- if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) {
|
||||
+ if ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
diff -up wordpress/wp-admin/includes/update.php.rpm wordpress/wp-admin/includes/update.php
|
||||
--- wordpress/wp-admin/includes/update.php.rpm 2016-08-10 21:06:31.000000000 +0200
|
||||
+++ wordpress/wp-admin/includes/update.php 2016-09-03 07:50:51.812312381 +0200
|
||||
@@ -271,7 +271,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.rpm wordpress/wp-includes/capabilities.php
|
||||
--- wordpress/wp-includes/capabilities.php.rpm 2016-06-30 03:02:29.000000000 +0200
|
||||
+++ wordpress/wp-includes/capabilities.php 2016-09-03 07:50:51.812312381 +0200
|
||||
@@ -330,7 +330,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';
|
||||
@@ -348,7 +348,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 2016-05-25 21:36:28.000000000 +0200
|
||||
+++ wordpress/wp-includes/update.php 2016-09-03 07:50:51.813312387 +0200
|
||||
@@ -653,9 +653,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');
|
||||
|
||||
|
|
@ -25,9 +25,9 @@
|
|||
Summary: Blog tool and publishing platform
|
||||
URL: http://www.wordpress.org
|
||||
Name: wordpress
|
||||
Version: 4.5.3
|
||||
Version: 4.6
|
||||
Group: Applications/Publishing
|
||||
Release: 2%{?dist}
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2
|
||||
|
||||
Source0: http://wordpress.org/%{name}-%{version}%{?prever:-%{prever}}.tar.gz
|
||||
|
|
@ -56,11 +56,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.5-noupdate.patch
|
||||
Patch6: wordpress-4.6-noupdate.patch
|
||||
# Use system libraries
|
||||
Patch7: wordpress-4.4-systemlibs.patch
|
||||
# Drop ereg, see https://core.trac.wordpress.org/ticket/37194
|
||||
Patch8: 0001-clean-split-usage-and-ereg-dependency.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildArch: noarch
|
||||
|
|
@ -168,7 +166,6 @@ sed -s 's/"flash","silverlight",//' -i wp-includes/js/mediaelement/mediaelement-
|
|||
%if %{with_getid3}
|
||||
%patch7 -p1
|
||||
%endif
|
||||
%patch8 -p1
|
||||
|
||||
# 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
|
||||
|
|
@ -306,6 +303,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||
|
||||
|
||||
%changelog
|
||||
* Sat Sep 3 2016 Remi Collet <remi@fedoraproject.org> - 4.6-1
|
||||
- WordPress 4.6 “Pepper”
|
||||
|
||||
* Mon Jun 27 2016 Remi Collet <remi@fedoraproject.org> - 4.5.3-2
|
||||
- add patch to drop ereg dependency, see
|
||||
https://core.trac.wordpress.org/ticket/37194
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue