Postie and 2.3
-
As I can’t post any comments on the Postie blog (https://www.economysizegeek.com/wp-mail), I post here my correction for Postie and the categories problem :
config_form.php Line 138
replace :
$categories = $wpdb->get_results(”SELECT * FROM $wpdb->categories ORDER BY cat_name”);
by
$categories = get_categories(array(’orderby’ =>’name’));
and on postie.functions.php, line 1526, replace :
$sql_name = ‘SELECT cat_ID FROM ‘ . $wpdb->categories. ‘ WHERE cat_name=\” . addslashes($match) . ‘\”; $sql_id = ‘SELECT cat_ID FROM ‘ . $wpdb->categories. ‘ WHERE cat_ID=\” . addslashes($match) . ‘\”; $sql_sub_name = ‘SELECT cat_ID FROM ‘ . $wpdb->categories. ‘ WHERE cat_name LIKE \” . addslashes($match) . ‘%\’ limit 1′; if ( $category = $wpdb->get_var($sql_name) ) { //then category is a named and found } elseif ( $category = $wpdb->get_var($sql_id) ) { //then cateogry was an ID and found } elseif ( $category = $wpdb->get_var($sql_sub_name) ) { //then cateogry is a start of a name and found } if ($category) { $post_categories[] = $category; }
by
$categories = get_categories(array(’orderby’ =>’name’)); foreach ($categories as $category) { if ($match == $category->cat_name) { $post_categories[] = $category->cat_ID; continue; } if ($match == $category->cat_ID) { $post_categories[] = $category->cat_ID; continue; } if (strpos($category->cat_name,$match) !== false) { $post_categories[] = $category->cat_ID; } }
Not related with 2.3 but there is a bug in postieIMAP.php, line 70 :
the correct line is :
if (eregi(”google”,$server)) {
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Postie and 2.3’ is closed to new replies.