Yet Another Related Posts Plugin (YARPP) - Version 3.2.1b4

Version Description

Download this release

Release Info

Developer mitchoyoshitaka
Plugin Icon 128x128 Yet Another Related Posts Plugin (YARPP)
Version 3.2.1b4
Comparing to
See all releases

Code changes from version 3.2.1b3 to 3.2.1b4

Files changed (2) hide show
  1. cache-tables.php +3 -3
  2. yarpp.php +3 -3
cache-tables.php CHANGED
@@ -50,13 +50,13 @@ class YARPP_Cache_Tables {
50
`score` float unsigned NOT NULL default '0',
51
`date` timestamp NOT NULL default CURRENT_TIMESTAMP,
52
PRIMARY KEY ( `reference_ID` , `ID` ),
53
- INDEX (`score`)
54
) ENGINE=MyISAM;");
55
}
56
57
function upgrade($last_version) {
58
global $wpdb;
59
- if (version_compare('3.2.1b2', $last_version) > 0) {
60
// Change primary key to be (reference_ID, ID) to ensure that we don't
61
// get duplicates.
62
// We unfortunately have to clear the cache first here, to ensure that there
@@ -65,7 +65,7 @@ class YARPP_Cache_Tables {
65
$wpdb->query('ALTER TABLE ' . $wpdb->prefix . YARPP_TABLES_RELATED_TABLE .
66
' DROP PRIMARY KEY ,' .
67
' ADD PRIMARY KEY ( `reference_ID` , `ID` ),' .
68
- ' ADD INDEX (`score`)');
69
}
70
}
71
50
`score` float unsigned NOT NULL default '0',
51
`date` timestamp NOT NULL default CURRENT_TIMESTAMP,
52
PRIMARY KEY ( `reference_ID` , `ID` ),
53
+ INDEX (`score`), INDEX (`ID`)
54
) ENGINE=MyISAM;");
55
}
56
57
function upgrade($last_version) {
58
global $wpdb;
59
+ if (version_compare('3.2.1b4', $last_version) > 0) {
60
// Change primary key to be (reference_ID, ID) to ensure that we don't
61
// get duplicates.
62
// We unfortunately have to clear the cache first here, to ensure that there
65
$wpdb->query('ALTER TABLE ' . $wpdb->prefix . YARPP_TABLES_RELATED_TABLE .
66
' DROP PRIMARY KEY ,' .
67
' ADD PRIMARY KEY ( `reference_ID` , `ID` ),' .
68
+ ' ADD INDEX (`score`), ADD INDEX (`ID`)');
69
}
70
}
71
yarpp.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Yet Another Related Posts Plugin
4
Plugin URI: http://mitcho.com/code/yarpp/
5
Description: Returns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. A templating feature allows customization of the display.
6
- Version: 3.2.1b3
7
Author: mitcho (Michael Yoshitaka Erlewine)
8
Author URI: http://mitcho.com/
9
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4DATK4999L&item_name=mitcho%2ecom%2fcode%3a%20donate%20to%20Michael%20Yoshitaka%20Erlewine&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&charset=UTF%2d8
@@ -13,7 +13,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4D
13
if (isset($_REQUEST['yarpp_debug']))
14
$yarpp_debug = true;
15
16
- define('YARPP_VERSION','3.2.1b3');
17
define('YARPP_DIR',dirname(__FILE__));
18
// 3.2.1: safer new version checking
19
add_action('wp_ajax_yarpp_version_json', 'yarpp_version_json');
@@ -31,7 +31,7 @@ if (!defined('YARPP_CACHE_TYPE'))
31
global $yarpp_cache, $yarpp_storage_class;
32
require_once(YARPP_DIR . '/cache-' . YARPP_CACHE_TYPE . '.php');
33
// For PHP 4, we have to pass this object by reference:
34
- $yarpp_cache =& new $yarpp_storage_class;
35
36
// Setup admin
37
add_action('admin_menu','yarpp_admin_menu');
3
Plugin Name: Yet Another Related Posts Plugin
4
Plugin URI: http://mitcho.com/code/yarpp/
5
Description: Returns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. A templating feature allows customization of the display.
6
+ Version: 3.2.1b4
7
Author: mitcho (Michael Yoshitaka Erlewine)
8
Author URI: http://mitcho.com/
9
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4DATK4999L&item_name=mitcho%2ecom%2fcode%3a%20donate%20to%20Michael%20Yoshitaka%20Erlewine&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&charset=UTF%2d8
13
if (isset($_REQUEST['yarpp_debug']))
14
$yarpp_debug = true;
15
16
+ define('YARPP_VERSION','3.2.1b4');
17
define('YARPP_DIR',dirname(__FILE__));
18
// 3.2.1: safer new version checking
19
add_action('wp_ajax_yarpp_version_json', 'yarpp_version_json');
31
global $yarpp_cache, $yarpp_storage_class;
32
require_once(YARPP_DIR . '/cache-' . YARPP_CACHE_TYPE . '.php');
33
// For PHP 4, we have to pass this object by reference:
34
+ $GLOBALS['yarpp_cache'] =& new $yarpp_storage_class;
35
36
// Setup admin
37
add_action('admin_menu','yarpp_admin_menu');