Blob Blame History Raw
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');