Permalink
Browse files

Updated SQL calls

  • Loading branch information...
1 parent e13ed2f commit e97cb4e4bd6749b9bf3a0068f9c78e2e62e34e48 Kim Pepper committed Dec 31, 2010
Showing with 8 additions and 8 deletions.
  1. +6 −6 custom_pagers.info
  2. +2 −2 custom_pagers.module
View
@@ -2,12 +2,7 @@
name = Custom Pagers
core = 7.x
description = Allows administrators to define custom pagers for navigation in lists of nodes.
-
-; Information added by drupal.org packaging script on 2010-01-17
-version = "7.x-1.0-dev"
-core = 7.x
-project = "custom_pagers"
-
+package = Other
files[] = custom-pager.tpl.php
files[] = custom_pagers.admin.inc
@@ -16,3 +11,8 @@ files[] = custom_pagers.module
files[] = views/custom_pagers.views.inc
files[] = views/custom_pagers_plugin_display_simple.inc
files[] = views/custom_pagers_plugin_style_php_array.inc
+
+; Information added by drupal.org packaging script on 2010-01-17
+version = "7.x-1.0-dev"
+project = "custom_pagers"
+
View
@@ -156,7 +156,7 @@ function custom_pagers_block_view($delta) {
function _custom_pagers_load_pager($pid) {
$sql = 'SELECT * FROM {custom_pager} WHERE pid = %d';
$result = db_query('SELECT * FROM {custom_pager} WHERE pid = :pid', array(':pid' => $pid));
- $pager = db_fetch_object($result);
+ $pager = $result[0];
return $pager;
}
@@ -167,7 +167,7 @@ function _custom_pagers_load_all_pagers($refresh = FALSE) {
$result = db_query($sql);
$pagers = array();
- while ($pager = db_fetch_object($result)) {
+ foreach ($result as $pager) {
$pagers[$pager->pid] = $pager;
}
}

0 comments on commit e97cb4e

Please sign in to comment.