Ticket #19921: wp-load-require-once.diff

File wp-load-require-once.diff, 3.7 KB (added by convissor, 16 months ago)
Line 
1diff --git a/wp-activate.php b/wp-activate.php
2index d470772..8563f0d 100644
3--- a/wp-activate.php
4+++ b/wp-activate.php
5@@ -2,7 +2,7 @@
6 define( 'WP_INSTALLING', true );
7 
8 /** Sets up the WordPress Environment. */
9-require( dirname(__FILE__) . '/wp-load.php' );
10+require_once( dirname(__FILE__) . '/wp-load.php' );
11 
12 require( './wp-blog-header.php' );
13 
14@@ -99,4 +99,4 @@ get_header();
15        var key_input = document.getElementById('key');
16        key_input && key_input.focus();
17 </script>
18-<?php get_footer(); ?>
19\ No newline at end of file
20+<?php get_footer(); ?>
21diff --git a/wp-admin/upgrade.php b/wp-admin/upgrade.php
22index 251513a..e12a789 100644
23--- a/wp-admin/upgrade.php
24+++ b/wp-admin/upgrade.php
25@@ -15,7 +15,7 @@
26 define( 'WP_INSTALLING', true );
27 
28 /** Load WordPress Bootstrap */
29-require( '../wp-load.php' );
30+require_once( dirname(dirname(__FILE__)) . '/wp-load.php' );
31 
32 timer_start();
33 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
34diff --git a/wp-comments-post.php b/wp-comments-post.php
35index 66ae330..e591f3f 100644
36--- a/wp-comments-post.php
37+++ b/wp-comments-post.php
38@@ -13,7 +13,7 @@ if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) {
39 }
40 
41 /** Sets up the WordPress Environment. */
42-require( dirname(__FILE__) . '/wp-load.php' );
43+require_once( dirname(__FILE__) . '/wp-load.php' );
44 
45 nocache_headers();
46 
47diff --git a/wp-login.php b/wp-login.php
48index 97e5d48..54b5eb4 100644
49--- a/wp-login.php
50+++ b/wp-login.php
51@@ -9,7 +9,7 @@
52  */
53 
54 /** Make sure that the WordPress bootstrap has run before continuing. */
55-require( dirname(__FILE__) . '/wp-load.php' );
56+require_once( dirname(__FILE__) . '/wp-load.php' );
57 
58 // Redirect to https login if forced to use SSL
59 if ( force_ssl_admin() && !is_ssl() ) {
60diff --git a/wp-mail.php b/wp-mail.php
61index b75e3bb..c62a71a 100644
62--- a/wp-mail.php
63+++ b/wp-mail.php
64@@ -8,7 +8,7 @@
65  */
66 
67 /** Make sure that the WordPress bootstrap has run before continuing. */
68-require(dirname(__FILE__) . '/wp-load.php');
69+require_once( dirname(__FILE__) . '/wp-load.php' );
70 
71 if ( ! apply_filters( 'enable_post_by_email_configuration', true ) )
72        wp_die( __( 'This action has been disabled by the administrator.' ) );
73diff --git a/wp-pass.php b/wp-pass.php
74index 39ac448..73a546b 100644
75--- a/wp-pass.php
76+++ b/wp-pass.php
77@@ -7,7 +7,7 @@
78  */
79 
80 /** Make sure that the WordPress bootstrap has run before continuing. */
81-require( dirname( __FILE__ ) . '/wp-load.php');
82+require_once( dirname(__FILE__) . '/wp-load.php' );
83 
84 if ( empty( $wp_hasher ) ) {
85        require_once( ABSPATH . 'wp-includes/class-phpass.php');
86diff --git a/wp-register.php b/wp-register.php
87index a9062e0..1025362 100644
88--- a/wp-register.php
89+++ b/wp-register.php
90@@ -9,6 +9,6 @@
91  * @deprecated Use wp_register() to create a registration link instead
92  */
93 
94-require('./wp-load.php');
95+require_once( dirname(__FILE__) . '/wp-load.php' );
96 wp_redirect( site_url('wp-login.php?action=register') );
97 exit;
98diff --git a/wp-signup.php b/wp-signup.php
99index 3150f9a..55cb2d4 100644
100--- a/wp-signup.php
101+++ b/wp-signup.php
102@@ -1,7 +1,7 @@
103 <?php
104 
105 /** Sets up the WordPress Environment. */
106-require( dirname(__FILE__) . '/wp-load.php' );
107+require_once( dirname(__FILE__) . '/wp-load.php' );
108 
109 add_action( 'wp_head', 'wp_no_robots' );
110 
111diff --git a/xmlrpc.php b/xmlrpc.php
112index e4dafe7..a2d2019 100644
113--- a/xmlrpc.php
114+++ b/xmlrpc.php
115@@ -26,7 +26,7 @@ if ( isset($HTTP_RAW_POST_DATA) )
116        $HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA);
117 
118 /** Include the bootstrap for setting up WordPress environment */
119-include('./wp-load.php');
120+require_once( dirname(__FILE__) . '/wp-load.php' );
121 
122 if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd
123 header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);