Version Description
Download this release
Release Info
Developer | whiteshadow |
Plugin | Broken Link Checker |
Version | 0.5.16.1 |
Comparing to | |
See all releases |
Code changes from version 0.5.16 to 0.5.16.1
- broken-link-checker.php +1 -1
- core.php +3 -3
- link-classes.php +1 -1
- readme.txt +1 -1
- utility-class.php +38 -0
broken-link-checker.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Broken Link Checker
|
5 |
Plugin URI: http://w-shadow.com/blog/2007/08/05/broken-link-checker-for-wordpress/
|
6 |
Description: Checks your posts for broken links and missing images and notifies you on the dashboard if any are found.
|
7 |
-
Version: 0.5.16
|
8 |
Author: Janis Elsts
|
9 |
Author URI: http://w-shadow.com/blog/
|
10 |
*/
|
4 |
Plugin Name: Broken Link Checker
|
5 |
Plugin URI: http://w-shadow.com/blog/2007/08/05/broken-link-checker-for-wordpress/
|
6 |
Description: Checks your posts for broken links and missing images and notifies you on the dashboard if any are found.
|
7 |
+
Version: 0.5.16.1
|
8 |
Author: Janis Elsts
|
9 |
Author URI: http://w-shadow.com/blog/
|
10 |
*/
|
core.php
CHANGED
@@ -2383,7 +2383,7 @@ jQuery(function($){
|
|
2383 |
$debug['Snoopy'] = $data;
|
2384 |
|
2385 |
//Safe_mode status
|
2386 |
-
if (
|
2387 |
$debug['Safe mode'] = array(
|
2388 |
'state' => 'warning',
|
2389 |
'value' => 'On',
|
@@ -2397,10 +2397,10 @@ jQuery(function($){
|
|
2397 |
}
|
2398 |
|
2399 |
//Open_basedir status
|
2400 |
-
if (
|
2401 |
$debug['open_basedir'] = array(
|
2402 |
'state' => 'warning',
|
2403 |
-
'value' => 'On',
|
2404 |
'message' => 'Redirects may be detected as broken links when open_basedir is on.',
|
2405 |
);
|
2406 |
} else {
|
2383 |
$debug['Snoopy'] = $data;
|
2384 |
|
2385 |
//Safe_mode status
|
2386 |
+
if ( blcUtility::is_safe_mode() ){
|
2387 |
$debug['Safe mode'] = array(
|
2388 |
'state' => 'warning',
|
2389 |
'value' => 'On',
|
2397 |
}
|
2398 |
|
2399 |
//Open_basedir status
|
2400 |
+
if ( blcUtility::is_open_basedir() ){
|
2401 |
$debug['open_basedir'] = array(
|
2402 |
'state' => 'warning',
|
2403 |
+
'value' => 'On ( ' . ini_get('open_basedir') . ' )',
|
2404 |
'message' => 'Redirects may be detected as broken links when open_basedir is on.',
|
2405 |
);
|
2406 |
} else {
|
link-classes.php
CHANGED
@@ -158,7 +158,7 @@ class blcLink {
|
|
158 |
curl_setopt($ch, CURLOPT_REFERER, get_option('home'));
|
159 |
|
160 |
//Redirects don't work when safe mode or open_basedir is enabled.
|
161 |
-
if ( !
|
162 |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
163 |
}
|
164 |
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
|
158 |
curl_setopt($ch, CURLOPT_REFERER, get_option('home'));
|
159 |
|
160 |
//Redirects don't work when safe mode or open_basedir is enabled.
|
161 |
+
if ( !blcUtility::is_safe_mode() && !blcUtility::is_open_basedir() ) {
|
162 |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
163 |
}
|
164 |
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: whiteshadow
|
|
3 |
Tags: links, broken, maintenance, blogroll, custom fields, admin
|
4 |
Requires at least: 2.7.0
|
5 |
Tested up to: 2.9
|
6 |
-
Stable tag: 0.5.16
|
7 |
|
8 |
This plugin will check your posts, custom fields and the blogroll for broken links and missing images and notify you if any are found.
|
9 |
|
3 |
Tags: links, broken, maintenance, blogroll, custom fields, admin
|
4 |
Requires at least: 2.7.0
|
5 |
Tested up to: 2.9
|
6 |
+
Stable tag: 0.5.16.1
|
7 |
|
8 |
This plugin will check your posts, custom fields and the blogroll for broken links and missing images and notify you if any are found.
|
9 |
|
utility-class.php
CHANGED
@@ -167,6 +167,44 @@ class blcUtility {
|
|
167 |
);
|
168 |
}
|
169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
}//class
|
172 |
|
167 |
);
|
168 |
}
|
169 |
|
170 |
+
/**
|
171 |
+
* blcUtility::is_safe_mode()
|
172 |
+
* Checks if PHP is running in safe mode
|
173 |
+
*
|
174 |
+
* @return bool
|
175 |
+
*/
|
176 |
+
function is_safe_mode(){
|
177 |
+
$safe_mode = ini_get('safe_mode');
|
178 |
+
//Null, 0, '', '0' and so on count as false
|
179 |
+
if ( !$safe_mode ) return false;
|
180 |
+
//Test for some textual true/false variations
|
181 |
+
switch ( strtolower($safe_mode) ){
|
182 |
+
case 'on':
|
183 |
+
case 'true':
|
184 |
+
case 'yes':
|
185 |
+
return true;
|
186 |
+
|
187 |
+
case 'off':
|
188 |
+
case 'false':
|
189 |
+
case 'no':
|
190 |
+
return false;
|
191 |
+
|
192 |
+
default: //Let PHP handle anything else
|
193 |
+
return (bool)(int)$safe_mode;
|
194 |
+
}
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* blcUtility::is_open_basedir()
|
199 |
+
* Checks if open_basedir is enabled
|
200 |
+
*
|
201 |
+
* @return bool
|
202 |
+
*/
|
203 |
+
function is_open_basedir(){
|
204 |
+
$open_basedir = ini_get('open_basedir');
|
205 |
+
return $open_basedir && ( strtolower($open_basedir) != 'none' );
|
206 |
+
}
|
207 |
+
|
208 |
|
209 |
}//class
|
210 |
|