Project:Custom Pagers
Version:6.x-1.10-beta1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I just fixed the preprocess function for the theme call, where suggestions where placed into 'suggestions' array-key, but Drupal6 wants it in the 'template_files' key.

Also I replaced the left/right guillemets with their proper HTML-entities.
Patch below

AttachmentSize
custom_pagers-6--1-10-BETA1.patch1.62 KB

Comments

#1

Function also needs to be renamed because it is the default preprocessor.

AttachmentSize
custom_pagers.module-517016-1.patch 1.66 KB

#2

+++ custom_pagers.module (working copy)
@@ -301,19 +301,19 @@
+function template_preprocess_custom_pager(&$vars) {

Is the current value a new best practice for this? Also CCK is currently following the moduleName_preprocess_hook pattern but about the template_preprocess_hook pattern the theming guide says: "The module or core file that implements the theming hook supplies this."

+++ custom_pagers.module (working copy)
@@ -301,19 +301,19 @@
+  $vars['previous'] = !empty($nav['prev']) ? l(t('‹ previous'), 'node/'. $nav['prev']) : '';
   $vars['key'] = t('@count of @count_total', array('@count' => ($nav['current_index'] + 1), '@count_total' => count($nav['full_list'])));
-  $vars['next'] =  !empty($nav['next']) ? l(t('next ›'), 'node/'. $nav['next']) : '';
+  $vars['next'] =  !empty($nav['next']) ? l(t('next ›'), 'node/'. $nav['next']) : '';

The HTML entities are escaped by l(), we need to pass it a 'html' => TRUE here. I'd leave this bit of code alone.
Rerolled the patch without it.

Aside from these RTBC.

Powered by Dreditor.

AttachmentSize
custom_pagers.module-517016-1.patch 1.66 KB

#3

oops, wrong patch

AttachmentSize
custom_pagers-517016-2.patch 1.6 KB

#4

Status:needs review» fixed

Patch applied, thanks for the fix.

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here