Package: wordpress
Version: 1.5.1-1
Severity: normal
Tags: patch

Our wordpress installation (at http://bart-massey.com and
http://bart-massey.com/uplift/) is a bit complex.  After
cleaning up some cruft that was probably our fault in
/etc/wordpress and /etc/apache/conf.d/wordpress, the latest
upgrade still didn't work quite right: hitting the front
page (at http://bart-massey.com/uplift/) and/or pushing the
home button (at the same URL) caused an SQL query error
because the CAT_id field was missing.  After some onerous
debugging, I found that a couple of fields were misnamed in
visible.php --- renaming them fixed our problem.

No idea whether this is also an upstream problem.  A quick
grep through the source found a couple of other places where
the same bug probably occurs, so this patch is not
necessarily exhaustive.

--- wp-content/plugins/visible.php.dist 2005-04-07 11:32:41.000000000 -0700
+++ wp-content/plugins/visible.php      2005-05-24 00:56:38.017837540 -0700
@@ -211,10 +211,10 @@
                if($categories = get_the_category($post->ID)) {
                        foreach ($categories as $category) {
                                if(isset ($q['feed'])) {
-                                       if($wpdb->query("SELECT cat_ID FROM 
cat_visibility WHERE cat_ID=$category->category_id AND feed=1")) {
+                                       if($wpdb->query("SELECT cat_ID FROM 
cat_visibility WHERE cat_ID=$category->cat_ID AND feed=1")) {
                                                $visible = 1;
                                        }
-                               } elseif ($wpdb->query("SELECT cat_ID FROM 
cat_visibility WHERE cat_ID=$category->category_id AND front=1")) {
+                               } elseif ($wpdb->query("SELECT cat_ID FROM 
cat_visibility WHERE cat_ID=$category->cat_ID AND front=1")) {
                                        $visible = 1;
                                }
                        }


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.10
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages wordpress depends on:
ii  apache [httpd]               1.3.33-6    versatile, high-performance HTTP s
ii  mysql-server [virtual-mysql- 4.0.24-10   mysql database server binaries
ii  php4                         4:4.3.10-15 server-side, HTML-embedded scripti
ii  php4-mysql                   4:4.3.10-15 MySQL module for php4

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to