OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 26-Jun-2008 17:52:28 Branch: HEAD Handle: 2008062616522600 Modified files: openpkg-src/drupal drupal.patch Log: fix BLOG ordering Summary: Revision Changes Path 1.26 +67 -1 openpkg-src/drupal/drupal.patch ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/drupal/drupal.patch ============================================================================ $ cvs diff -u -r1.25 -r1.26 drupal.patch --- openpkg-src/drupal/drupal.patch 18 Jun 2008 16:03:06 -0000 1.25 +++ openpkg-src/drupal/drupal.patch 26 Jun 2008 15:52:26 -0000 1.26 @@ -330,7 +330,7 @@ --- /dev/null 2008-05-02 21:08:21 +0200 +++ sites/all/modules/img_assist/img_assist_popup.js 2008-05-02 21:05:56 +0200 @@ -0,0 +1,20 @@ -+/* $Id: drupal.patch,v 1.25 2008/06/18 16:03:06 rse Exp $ */ ++/* $Id: drupal.patch,v 1.26 2008/06/26 15:52:26 rse Exp $ */ + +function launch_popup(nid, mw, mh) { + var ox = mw; @@ -866,3 +866,69 @@ )"); break; } + +----------------------------------------------------------------------------- + +Avoid incorrect ordering of BLOG entries by removing the +db_rewrite_sql() calls which seem to introduce a wrong ordering. + +Index: modules/blog/blog.module +--- modules/blog/blog.module.orig 2008-04-09 23:11:45 +0200 ++++ modules/blog/blog.module 2008-06-26 17:20:15 +0200 +@@ -182,7 +182,7 @@ + * Helper function to determine if a user has blog posts already. + */ + function _blog_post_exists($account) { +- return (bool)db_result(db_query_range(db_rewrite_sql("SELECT 1 FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1"), $account->uid, 0, 1)); ++ return (bool)db_result(db_query_range("SELECT 1 FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1", $account->uid, 0, 1)); + } + + /** +@@ -198,7 +198,7 @@ + } + else if ($op == 'view') { + if (user_access('access content')) { +- $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, 10); ++ $result = db_query_range("SELECT n.nid, n.title, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC", 0, 10); + if ($node_title_list = node_title_list($result)) { + $block['content'] = $node_title_list; + $block['content'] .= theme('more_link', url('blog'), t('Read the latest blog entries.')); +Index: modules/blog/blog.pages.inc +--- modules/blog/blog.pages.inc.orig 2008-02-08 22:15:12 +0100 ++++ modules/blog/blog.pages.inc 2008-06-26 17:19:49 +0200 +@@ -25,7 +25,7 @@ + + $output = theme('item_list', $items); + +- $result = pager_query(db_rewrite_sql("SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC"), variable_get('default_nodes_main', 10), 0, NULL, $account->uid); ++ $result = pager_query("SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC", variable_get('default_nodes_main', 10), 0, NULL, $account->uid); + $has_posts = FALSE; + + while ($node = db_fetch_object($result)) { +@@ -64,7 +64,7 @@ + + $output = theme('item_list', $items); + +- $result = pager_query(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC"), variable_get('default_nodes_main', 10)); ++ $result = pager_query("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC", variable_get('default_nodes_main', 10)); + $has_posts = FALSE; + + while ($node = db_fetch_object($result)) { +@@ -87,7 +87,7 @@ + * Menu callback; displays an RSS feed containing recent blog entries of a given user. + */ + function blog_feed_user($account) { +- $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.created DESC"), $account->uid, 0, variable_get('feed_default_items', 10)); ++ $result = db_query_range("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.created DESC", $account->uid, 0, variable_get('feed_default_items', 10)); + $channel['title'] = $account->name ."'s blog"; + $channel['link'] = url('blog/'. $account->uid, array('absolute' => TRUE)); + +@@ -102,7 +102,7 @@ + * Menu callback; displays an RSS feed containing recent blog entries of all users. + */ + function blog_feed_last() { +- $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, variable_get('feed_default_items', 10)); ++ $result = db_query_range("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC", 0, variable_get('feed_default_items', 10)); + $channel['title'] = variable_get('site_name', 'Drupal') .' blogs'; + $channel['link'] = url('blog', array('absolute' => TRUE)); + @@ . ______________________________________________________________________ OpenPKG http://openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org