summaryrefslogtreecommitdiff
path: root/modules/blog
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-09-08 15:38:26 +0000
committerDries Buytaert <dries@buytaert.net>2004-09-08 15:38:26 +0000
commit7b716e8e770faa6c85a4123db729505bb251df27 (patch)
treec82f8a297bf8a76172e1d71892c4507c3606bad2 /modules/blog
parente1d7609710db3bd984ab8c8b1e78469e07f4f135 (diff)
downloadbrdo-7b716e8e770faa6c85a4123db729505bb251df27.tar.gz
brdo-7b716e8e770faa6c85a4123db729505bb251df27.tar.bz2
- Patch #10622 by Adrian: fixes various PostgreSQL related problems.
1) Menu problems with Postgres (this is a highly critical 1 line fix) 2) Archive module fails with Postgres 3) Postgres setup problems - changes to database.pgsql (although i made these changes myself before finding this patch) 4) Book module fails with Postgres 5) Postgres problems following creation of a new type of user - which is actually about a taxonomy.module bug. 6) Creating accregator_item_table in PostgreSQL 7) Postgres - Polls not displayed on Poll Page 8) Blog module has sql errors with postgres This should not affect MySQL users (hopefully).
Diffstat (limited to 'modules/blog')
-rw-r--r--modules/blog/blog.module6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 5711bd7b5..d1a97da32 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -141,7 +141,7 @@ function blog_page_user($uid) {
$title = t("%name's blog", array('%name' => $account->name));
$output = '';
- $result = pager_query('SELECT DISTINCT(n.nid) FROM {node} n '. node_access_join_sql() ." WHERE type = 'blog' AND n.uid = %d AND n.status = 1 AND ". node_access_where_sql() .' ORDER BY n.sticky DESC, n.created DESC', variable_get('default_nodes_main', 10), 0, NULL, $account->uid);
+ $result = pager_query('SELECT DISTINCT(n.nid), n.sticky, n.created FROM {node} n '. node_access_join_sql() ." WHERE type = 'blog' AND n.uid = %d AND n.status = 1 AND ". node_access_where_sql() .' ORDER BY n.sticky DESC, n.created DESC', variable_get('default_nodes_main', 10), 0, NULL, $account->uid);
while ($node = db_fetch_object($result)) {
$output .= node_view(node_load(array('nid' => $node->nid)), 1);
}
@@ -160,7 +160,7 @@ function blog_page_last() {
$output = '';
- $result = pager_query('SELECT DISTINCT(n.nid) FROM {node} n '. node_access_join_sql() ." WHERE n.type = 'blog' AND n.status = 1 AND ". node_access_where_sql() .' ORDER BY n.created DESC', variable_get('default_nodes_main', 10));
+ $result = pager_query('SELECT DISTINCT(n.nid), n.created FROM {node} n '. node_access_join_sql() ." WHERE n.type = 'blog' AND n.status = 1 AND ". node_access_where_sql() .' ORDER BY n.created DESC', variable_get('default_nodes_main', 10));
while ($node = db_fetch_object($result)) {
$output .= node_view(node_load(array('nid' => $node->nid)), 1);
@@ -292,7 +292,7 @@ function blog_block($op = 'list', $delta = 0) {
}
else {
if (user_access('access content')) {
- $block['content'] = node_title_list(db_query_range('SELECT DISTINCT(n.nid), n.title FROM {node} n '. node_access_join_sql() ." WHERE n.type = 'blog' AND n.status = 1 AND ". node_access_where_sql() .' ORDER BY n.created DESC', 0, 10));
+ $block['content'] = node_title_list(db_query_range('SELECT DISTINCT(n.nid), n.title, n.created FROM {node} n '. node_access_join_sql() ." WHERE n.type = 'blog' AND n.status = 1 AND ". node_access_where_sql() .' ORDER BY n.created DESC', 0, 10));
$block['content'] .= '<div class="more-link">'. l(t('more'), 'blog', array('title' => t('Read the latest blog entries.'))) .'</div>';
$block['subject'] = t('Recent blog posts');
}