diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-06-06 10:27:42 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-06-06 10:27:42 +0000 |
commit | c3af73ef17d0b5f6e96c7619fbd3a2f3f1115649 (patch) | |
tree | a64ec3aeca8ae3fc17cd2208d27a3b539b5fb231 /modules/comment/comment.admin.inc | |
parent | d532753cabfe2f2cfa85279a6c4c192528bad636 (diff) | |
download | brdo-c3af73ef17d0b5f6e96c7619fbd3a2f3f1115649.tar.gz brdo-c3af73ef17d0b5f6e96c7619fbd3a2f3f1115649.tar.bz2 |
- Patch #302268 by Berdir, Dave Reid, tizzo, Ryan Palmer: TableSort and PagerQueries broken.
Diffstat (limited to 'modules/comment/comment.admin.inc')
-rw-r--r-- | modules/comment/comment.admin.inc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/comment/comment.admin.inc b/modules/comment/comment.admin.inc index 5d29c9b0f..e41a0d63c 100644 --- a/modules/comment/comment.admin.inc +++ b/modules/comment/comment.admin.inc @@ -66,19 +66,18 @@ function comment_admin_overview($type = 'new', $arg) { 'operations' => array('data' => t('Operations')), ); - $query = db_select('comment', 'c'); + $query = db_select('comment', 'c')->extend('PagerDefault')->extend('TableSort'); $query->join('users', 'u', 'u.uid = c.uid'); $query->join('node', 'n', 'n.nid = c.nid'); $query->addField('u', 'name', 'registered_name'); $query->addField('n', 'title', 'node_title'); - $query + $result = $query ->fields('c', array('subject', 'nid', 'cid', 'comment', 'timestamp', 'status', 'name', 'homepage')) ->fields('u', array('uid')) ->condition('c.status', $status) - ->extend('PagerDefault')->extend('TableSort') ->limit(50) - ->orderByHeader($header); - $result = $query->execute(); + ->orderByHeader($header) + ->execute(); // Build a table listing the appropriate comments. |