Broken Link Checker - Version 0.3.1

Version Description

Download this release

Release Info

Developer whiteshadow
Plugin Icon 128x128 Broken Link Checker
Version 0.3.1
Comparing to
See all releases

Code changes from version 0.2.5 to 0.3.1

Files changed (3) hide show
  1. broken-link-checker.php +4 -4
  2. readme.txt +1 -1
  3. wsblc_ajax.php +4 -0
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 posts for broken links and missing images and notifies you on the dashboard if any are found.
6
- Version: 0.3
7
  Author: Janis Elsts
8
  Author URI: http://w-shadow.com/blog/
9
  */
@@ -20,7 +20,7 @@ class ws_broken_link_checker {
20
  var $options_name='wsblc_options';
21
  var $postdata_name;
22
  var $linkdata_name;
23
- var $version='0.3';
24
  var $myfile='';
25
  var $myfolder='';
26
  var $mybasename='';
@@ -477,7 +477,7 @@ class ws_broken_link_checker {
477
  ?></h2>
478
  <br style="clear:both;" />
479
  <?php
480
- $sql="SELECT b.post_title, a.* FROM $this->linkdata_name a, $wpdb->posts b
481
  WHERE a.post_id=b.id AND a.broken=1 ORDER BY a.last_check DESC";
482
  $links=$wpdb->get_results($sql, OBJECT);
483
  if($links && (count($links)>0)){
@@ -508,7 +508,7 @@ class ws_broken_link_checker {
508
 
509
  <td>$link->link_text</td>
510
  <td><a href='$link->url'>".$this->mytruncate($link->url)."</a></td>
511
- <td><a href='".get_option('siteurl')."?p=".($link->post_id)."' class='edit'>View</a></td>
512
 
513
  <td><a href='post.php?action=edit&amp;post=$link->post_id' class='edit'>Edit Post</a></td>
514
  <td><a href='javascript:void(0);' class='delete'
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 posts for broken links and missing images and notifies you on the dashboard if any are found.
6
+ Version: 0.3.1
7
  Author: Janis Elsts
8
  Author URI: http://w-shadow.com/blog/
9
  */
20
  var $options_name='wsblc_options';
21
  var $postdata_name;
22
  var $linkdata_name;
23
+ var $version='0.3.1';
24
  var $myfile='';
25
  var $myfolder='';
26
  var $mybasename='';
477
  ?></h2>
478
  <br style="clear:both;" />
479
  <?php
480
+ $sql="SELECT b.post_title, a.*, b.guid FROM $this->linkdata_name a, $wpdb->posts b
481
  WHERE a.post_id=b.id AND a.broken=1 ORDER BY a.last_check DESC";
482
  $links=$wpdb->get_results($sql, OBJECT);
483
  if($links && (count($links)>0)){
508
 
509
  <td>$link->link_text</td>
510
  <td><a href='$link->url'>".$this->mytruncate($link->url)."</a></td>
511
+ <td><a href='".($link->guid)."' class='edit'>View</a></td>
512
 
513
  <td><a href='post.php?action=edit&amp;post=$link->post_id' class='edit'>Edit Post</a></td>
514
  <td><a href='javascript:void(0);' class='delete'
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: whiteshadow
3
  Tags: links, broken, maintenance
4
  Requires at least: 2.0.2
5
  Tested up to: 2.3.3
6
- Stable tag: 0.3
7
 
8
  This plugin will check your posts for broken links and missing images in background and notify you on the dashboard if any are found.
9
 
3
  Tags: links, broken, maintenance
4
  Requires at least: 2.0.2
5
  Tested up to: 2.3.3
6
+ Stable tag: 0.3.1
7
 
8
  This plugin will check your posts for broken links and missing images in background and notify you on the dashboard if any are found.
9
 
wsblc_ajax.php CHANGED
@@ -256,14 +256,18 @@
256
  curl_setopt($ch, CURLOPT_HEADER, true);
257
 
258
  $response = curl_exec($ch);
 
259
  $code=intval(curl_getinfo($ch, CURLINFO_HTTP_CODE));
 
260
 
261
  if ( (($code<200) || ($code>=400)) && $nobody) {
262
  curl_setopt($ch, CURLOPT_NOBODY, false);
263
  curl_setopt($ch, CURLOPT_HTTPGET, true);
264
  curl_setopt($ch, CURLOPT_RANGE, '0-1023');
265
  $response = curl_exec($ch);
 
266
  $code=intval(curl_getinfo($ch, CURLINFO_HTTP_CODE));
 
267
  }
268
 
269
  curl_close($ch);
256
  curl_setopt($ch, CURLOPT_HEADER, true);
257
 
258
  $response = curl_exec($ch);
259
+ //echo 'Response 1 : <pre>',$response,'</pre>';
260
  $code=intval(curl_getinfo($ch, CURLINFO_HTTP_CODE));
261
+ //echo "Code 1 : $code<br/>";
262
 
263
  if ( (($code<200) || ($code>=400)) && $nobody) {
264
  curl_setopt($ch, CURLOPT_NOBODY, false);
265
  curl_setopt($ch, CURLOPT_HTTPGET, true);
266
  curl_setopt($ch, CURLOPT_RANGE, '0-1023');
267
  $response = curl_exec($ch);
268
+ //echo 'Response 2 : <pre>',$response,'</pre>';
269
  $code=intval(curl_getinfo($ch, CURLINFO_HTTP_CODE));
270
+ //echo "Code 2 : $code<br/>";
271
  }
272
 
273
  curl_close($ch);