Version Description
- Another attempt to fix the "database not up to date" that some users are still experiencing even with 1.6.1.
Download this release
Release Info
| Developer | whiteshadow |
| Plugin | |
| Version | 1.6.2 |
| Comparing to | |
| See all releases | |
Code changes from version 1.6.1 to 1.6.2
- broken-link-checker.php +1 -1
- core/core.php +0 -37
- core/init.php +6 -0
- includes/module-base.php +3 -2
- modules/containers/custom_field.php +5 -5
- readme.txt +7 -1
broken-link-checker.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: Broken Link Checker
|
| 4 |
Plugin URI: http://w-shadow.com/blog/2007/08/05/broken-link-checker-for-wordpress/
|
| 5 |
Description: Checks your blog for broken links and missing images and notifies you on the dashboard if any are found.
|
| 6 |
-
Version: 1.6.
|
| 7 |
Author: Janis Elsts
|
| 8 |
Author URI: http://w-shadow.com/blog/
|
| 9 |
Text Domain: broken-link-checker
|
| 3 |
Plugin Name: Broken Link Checker
|
| 4 |
Plugin URI: http://w-shadow.com/blog/2007/08/05/broken-link-checker-for-wordpress/
|
| 5 |
Description: Checks your blog for broken links and missing images and notifies you on the dashboard if any are found.
|
| 6 |
+
Version: 1.6.2
|
| 7 |
Author: Janis Elsts
|
| 8 |
Author URI: http://w-shadow.com/blog/
|
| 9 |
Text Domain: broken-link-checker
|
core/core.php
CHANGED
|
@@ -403,8 +403,6 @@ class wsBrokenLinkChecker {
|
|
| 403 |
|
| 404 |
$moduleManager = blcModuleManager::getInstance();
|
| 405 |
|
| 406 |
-
$this->ensure_database_validity();
|
| 407 |
-
|
| 408 |
//Prior to 1.5.2 (released 2012-05-27), there was a bug that would cause the donation flag to be
|
| 409 |
//set incorrectly. So we'll unset the flag in that case.
|
| 410 |
$reset_donation_flag =
|
|
@@ -1198,8 +1196,6 @@ class wsBrokenLinkChecker {
|
|
| 1198 |
|
| 1199 |
$blc_link_query = blcLinkQuery::getInstance();
|
| 1200 |
|
| 1201 |
-
$this->ensure_database_validity();
|
| 1202 |
-
|
| 1203 |
//Cull invalid and missing modules so that we don't get dummy links/instances showing up.
|
| 1204 |
$moduleManager = blcModuleManager::getInstance();
|
| 1205 |
$moduleManager->validate_active_modules();
|
|
@@ -1343,33 +1339,6 @@ class wsBrokenLinkChecker {
|
|
| 1343 |
|
| 1344 |
?></div><?php
|
| 1345 |
}
|
| 1346 |
-
|
| 1347 |
-
/**
|
| 1348 |
-
* Ensure that the plugin's database is at the required version.
|
| 1349 |
-
*
|
| 1350 |
-
* @param bool $upgradeOnFailure If true, will attempt to upgrade the DB is out of date.
|
| 1351 |
-
* @param bool $silent Output nothing
|
| 1352 |
-
* @return bool
|
| 1353 |
-
*/
|
| 1354 |
-
private function ensure_database_validity($upgradeOnFailure = true, $silent = false) {
|
| 1355 |
-
//Sanity check : Make sure the plugin's tables are all set up.
|
| 1356 |
-
if ( $this->db_version != $this->conf->options['current_db_version'] ) {
|
| 1357 |
-
if ( $upgradeOnFailure ) {
|
| 1358 |
-
require_once BLC_DIRECTORY . '/includes/admin/db-upgrade.php';
|
| 1359 |
-
blcDatabaseUpgrader::upgrade_database();
|
| 1360 |
-
return $this->ensure_database_validity(false, $silent);
|
| 1361 |
-
} else if ( !$silent ) {
|
| 1362 |
-
printf(
|
| 1363 |
-
__("Error: The plugin's database tables are not up to date! (Current version : %d, expected : %d)", 'broken-link-checker'),
|
| 1364 |
-
$this->conf->options['current_db_version'],
|
| 1365 |
-
$this->db_version
|
| 1366 |
-
);
|
| 1367 |
-
echo '<br>', __('Try deactivating and then reactivating the plugin.', 'broken-link-checker');
|
| 1368 |
-
}
|
| 1369 |
-
return false;
|
| 1370 |
-
}
|
| 1371 |
-
return true;
|
| 1372 |
-
}
|
| 1373 |
|
| 1374 |
/**
|
| 1375 |
* Create a custom link filter using params passed in $_POST.
|
|
@@ -2028,12 +1997,6 @@ class wsBrokenLinkChecker {
|
|
| 2028 |
function work(){
|
| 2029 |
global $wpdb;
|
| 2030 |
|
| 2031 |
-
//Sanity check : make sure the DB is all set up
|
| 2032 |
-
if ( !$this->ensure_database_validity(true, false) ) {
|
| 2033 |
-
//FB::error("The plugin's database tables are not up to date! Stop.");
|
| 2034 |
-
return;
|
| 2035 |
-
}
|
| 2036 |
-
|
| 2037 |
if ( !$this->acquire_lock() ){
|
| 2038 |
//FB::warn("Another instance of BLC is already working. Stop.");
|
| 2039 |
return;
|
| 403 |
|
| 404 |
$moduleManager = blcModuleManager::getInstance();
|
| 405 |
|
|
|
|
|
|
|
| 406 |
//Prior to 1.5.2 (released 2012-05-27), there was a bug that would cause the donation flag to be
|
| 407 |
//set incorrectly. So we'll unset the flag in that case.
|
| 408 |
$reset_donation_flag =
|
| 1196 |
|
| 1197 |
$blc_link_query = blcLinkQuery::getInstance();
|
| 1198 |
|
|
|
|
|
|
|
| 1199 |
//Cull invalid and missing modules so that we don't get dummy links/instances showing up.
|
| 1200 |
$moduleManager = blcModuleManager::getInstance();
|
| 1201 |
$moduleManager->validate_active_modules();
|
| 1339 |
|
| 1340 |
?></div><?php
|
| 1341 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1342 |
|
| 1343 |
/**
|
| 1344 |
* Create a custom link filter using params passed in $_POST.
|
| 1997 |
function work(){
|
| 1998 |
global $wpdb;
|
| 1999 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2000 |
if ( !$this->acquire_lock() ){
|
| 2001 |
//FB::warn("Another instance of BLC is already working. Stop.");
|
| 2002 |
return;
|
core/init.php
CHANGED
|
@@ -267,6 +267,12 @@ if ( $blc_config_manager->options['installation_complete'] ){
|
|
| 267 |
}
|
| 268 |
$init_done = true;
|
| 269 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 270 |
//Load the base classes and utilities
|
| 271 |
require_once BLC_DIRECTORY . '/includes/links.php';
|
| 272 |
require_once BLC_DIRECTORY . '/includes/link-query.php';
|
| 267 |
}
|
| 268 |
$init_done = true;
|
| 269 |
|
| 270 |
+
//Ensure the database is up to date
|
| 271 |
+
if ($blc_config_manager->options['current_db_version'] != BLC_DATABASE_VERSION) {
|
| 272 |
+
require_once BLC_DIRECTORY . '/includes/admin/db-upgrade.php';
|
| 273 |
+
blcDatabaseUpgrader::upgrade_database(); //Also updates the DB ver. in options['current_db_version'].
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
//Load the base classes and utilities
|
| 277 |
require_once BLC_DIRECTORY . '/includes/links.php';
|
| 278 |
require_once BLC_DIRECTORY . '/includes/link-query.php';
|
includes/module-base.php
CHANGED
|
@@ -15,7 +15,8 @@
|
|
| 15 |
class blcModule {
|
| 16 |
|
| 17 |
var $module_id; //The ID of this module. Usually a lowercase string.
|
| 18 |
-
var $cached_header; //An associative array containing the header data of the module file.
|
|
|
|
| 19 |
var $plugin_conf; //A reference to the plugin's global configuration object.
|
| 20 |
var $module_manager; //A reference to the module manager.
|
| 21 |
|
|
@@ -24,7 +25,7 @@ class blcModule {
|
|
| 24 |
*
|
| 25 |
* @param string $module_id
|
| 26 |
* @param array $cached_header
|
| 27 |
-
* @param
|
| 28 |
* @param blcModuleManager $module_manager
|
| 29 |
* @return void
|
| 30 |
*/
|
| 15 |
class blcModule {
|
| 16 |
|
| 17 |
var $module_id; //The ID of this module. Usually a lowercase string.
|
| 18 |
+
var $cached_header; //An associative array containing the header data of the module file.
|
| 19 |
+
/** @var blcConfigurationManager $plugin__conf */
|
| 20 |
var $plugin_conf; //A reference to the plugin's global configuration object.
|
| 21 |
var $module_manager; //A reference to the module manager.
|
| 22 |
|
| 25 |
*
|
| 26 |
* @param string $module_id
|
| 27 |
* @param array $cached_header
|
| 28 |
+
* @param blcConfigurationManager $plugin_conf
|
| 29 |
* @param blcModuleManager $module_manager
|
| 30 |
* @return void
|
| 31 |
*/
|
modules/containers/custom_field.php
CHANGED
|
@@ -286,7 +286,7 @@ class blcPostMeta extends blcContainer {
|
|
| 286 |
$this->container_id
|
| 287 |
)
|
| 288 |
);
|
| 289 |
-
}
|
| 290 |
}
|
| 291 |
}
|
| 292 |
|
|
@@ -324,7 +324,7 @@ class blcPostMeta extends blcContainer {
|
|
| 324 |
$this->container_id
|
| 325 |
)
|
| 326 |
);
|
| 327 |
-
}
|
| 328 |
}
|
| 329 |
|
| 330 |
function current_user_can_delete(){
|
|
@@ -350,7 +350,7 @@ class blcPostMetaManager extends blcContainerManager {
|
|
| 350 |
add_action( "updated_{$this->meta_type}_meta", array(&$this, 'meta_modified'), 10, 4 );
|
| 351 |
add_action( "deleted_{$this->meta_type}_meta", array(&$this, 'meta_modified'), 10, 4 );
|
| 352 |
//Also intercept the equivalent actions used in /wp-admin/includes/post.php.
|
| 353 |
-
//(WP is bloody
|
| 354 |
//but have different argument counts)
|
| 355 |
add_action( "added_{$this->meta_type}meta", array(&$this, 'meta_modified'), 10, 4 );
|
| 356 |
add_action( "deleted_{$this->meta_type}meta", array(&$this, 'meta_modified'), 10, 1 );//NB : 1 argument!
|
|
@@ -427,7 +427,7 @@ class blcPostMetaManager extends blcContainerManager {
|
|
| 427 |
* @return void
|
| 428 |
*/
|
| 429 |
function resynch($forced = false){
|
| 430 |
-
global $wpdb;
|
| 431 |
global $blclog;
|
| 432 |
|
| 433 |
if ( $forced ){
|
|
@@ -492,7 +492,7 @@ class blcPostMetaManager extends blcContainerManager {
|
|
| 492 |
* @return void
|
| 493 |
*/
|
| 494 |
function meta_modified($meta_id, $object_id = 0, $meta_key= '', $meta_value = ''){
|
| 495 |
-
global $wpdb;
|
| 496 |
|
| 497 |
//If object_id isn't specified then the hook was probably called from the
|
| 498 |
//stupidly inconsistent delete_meta() function in /wp-admin/includes/post.php.
|
| 286 |
$this->container_id
|
| 287 |
)
|
| 288 |
);
|
| 289 |
+
}
|
| 290 |
}
|
| 291 |
}
|
| 292 |
|
| 324 |
$this->container_id
|
| 325 |
)
|
| 326 |
);
|
| 327 |
+
}
|
| 328 |
}
|
| 329 |
|
| 330 |
function current_user_can_delete(){
|
| 350 |
add_action( "updated_{$this->meta_type}_meta", array(&$this, 'meta_modified'), 10, 4 );
|
| 351 |
add_action( "deleted_{$this->meta_type}_meta", array(&$this, 'meta_modified'), 10, 4 );
|
| 352 |
//Also intercept the equivalent actions used in /wp-admin/includes/post.php.
|
| 353 |
+
//(WP is bloody inconsistent. The action names differ by a single character
|
| 354 |
//but have different argument counts)
|
| 355 |
add_action( "added_{$this->meta_type}meta", array(&$this, 'meta_modified'), 10, 4 );
|
| 356 |
add_action( "deleted_{$this->meta_type}meta", array(&$this, 'meta_modified'), 10, 1 );//NB : 1 argument!
|
| 427 |
* @return void
|
| 428 |
*/
|
| 429 |
function resynch($forced = false){
|
| 430 |
+
global $wpdb; /** @var wpdb $wpdb */
|
| 431 |
global $blclog;
|
| 432 |
|
| 433 |
if ( $forced ){
|
| 492 |
* @return void
|
| 493 |
*/
|
| 494 |
function meta_modified($meta_id, $object_id = 0, $meta_key= '', $meta_value = ''){
|
| 495 |
+
global $wpdb; /** @var wpdb $wpdb */
|
| 496 |
|
| 497 |
//If object_id isn't specified then the hook was probably called from the
|
| 498 |
//stupidly inconsistent delete_meta() function in /wp-admin/includes/post.php.
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
| 4 |
Tags: links, broken, maintenance, blogroll, custom fields, admin, comments, posts
|
| 5 |
Requires at least: 3.2
|
| 6 |
Tested up to: 3.4.1
|
| 7 |
-
Stable tag: 1.6.
|
| 8 |
|
| 9 |
This plugin will check your posts, comments and other content for broken links and missing images, and notify you if any are found.
|
| 10 |
|
|
@@ -91,6 +91,9 @@ To upgrade your installation
|
|
| 91 |
|
| 92 |
== Changelog ==
|
| 93 |
|
|
|
|
|
|
|
|
|
|
| 94 |
= 1.6.1 =
|
| 95 |
* Fixed the "database not up to date" bug. Now the plugin should properly upgrade the DB.
|
| 96 |
|
|
@@ -602,6 +605,9 @@ To upgrade your installation
|
|
| 602 |
|
| 603 |
== Upgrade Notice ==
|
| 604 |
|
|
|
|
|
|
|
|
|
|
| 605 |
= 1.4 =
|
| 606 |
Adds an option to send post authors notifications about broken links in their posts and the the ability to sort links by URL, as well as a number of other updates and fixes.
|
| 607 |
|
| 4 |
Tags: links, broken, maintenance, blogroll, custom fields, admin, comments, posts
|
| 5 |
Requires at least: 3.2
|
| 6 |
Tested up to: 3.4.1
|
| 7 |
+
Stable tag: 1.6.2
|
| 8 |
|
| 9 |
This plugin will check your posts, comments and other content for broken links and missing images, and notify you if any are found.
|
| 10 |
|
| 91 |
|
| 92 |
== Changelog ==
|
| 93 |
|
| 94 |
+
= 1.6.2 =
|
| 95 |
+
* Another attempt to fix the "database not up to date" that some users are still experiencing even with 1.6.1.
|
| 96 |
+
|
| 97 |
= 1.6.1 =
|
| 98 |
* Fixed the "database not up to date" bug. Now the plugin should properly upgrade the DB.
|
| 99 |
|
| 605 |
|
| 606 |
== Upgrade Notice ==
|
| 607 |
|
| 608 |
+
= 1.6.2 =
|
| 609 |
+
Attempts to fix the "database not up to date" bug that some users are still experiencing with 1.6.1. If you have not encountered this bug, you can skip this update.
|
| 610 |
+
|
| 611 |
= 1.4 =
|
| 612 |
Adds an option to send post authors notifications about broken links in their posts and the the ability to sort links by URL, as well as a number of other updates and fixes.
|
| 613 |
|
