Opened 14 years ago

Closed 14 years ago

#300 closed enhancement (fixed)

[PATCH]Switch to Pager from DB_Pager

Reported by: shalligan@… Owned by: dmorton
Priority: normal Milestone: 1.0.2
Component: PHP scripts Version:
Severity: normal Keywords:
Cc:

Description

DB_Pager is no longer support and Pager has better functionality. I am attaching a diff to show the basics of it. It would be better to only query for the data window to display the page. The attached implementation does not do this, but neither did DB_Pager.

Bonus: Automatically made sliding page number links.

Attachments (3)

hamc.dif (1.5 KB) - added by shalligan@… 14 years ago.
Diff -u to ham_cache.php
cache_pager_tpl.dif (901 bytes) - added by shalligan@… 14 years ago.
diff -u to cache_pager.tpl based on ocean_surf theme
dgm.patch (11.5 KB) - added by shalligan@… 14 years ago.
patch for dgm

Download all attachments as: .zip

Change History (11)

Changed 14 years ago by shalligan@…

Diff -u to ham_cache.php

Changed 14 years ago by shalligan@…

diff -u to cache_pager.tpl based on ocean_surf theme

comment:1 Changed 14 years ago by shalligan@…

don't forget to: #pear install Pager

comment:2 Changed 14 years ago by dmorton

As long as we're digging into this, I'd like to refactor all of the various caches into one central form. There's too much repitition among the various caches.

I had started this process in the DGM theme. The theme is included in the sources, but the maia_themes table doesn't have the entry to make it available (A quick addition can make it available to developers)

The dgm theme uses cache.php and view.php, IIRC. Another important issue WRT these files is the way things are reported... the old style loops through all items in the cache and then updates the ones that match; the new style only attempts to update the ones submitted. It makes for much less network traffic from the database. See #238 Should we do that one as well? I originally thought it was too intrusive for a 1.0.x change, but since we've already been making bigger changes...

comment:3 Changed 14 years ago by rjl

Go for it. It's a change I'd like to see as well, if only for the fact that the cut-and-paste copies of code across the various quarantine/cache pages becomes increasingly tedious to maintain. Efficiently gains are a side-bonus :)

Changed 14 years ago by shalligan@…

patch for dgm

comment:4 Changed 14 years ago by dmorton

I cleaned up the dgm patch a little and applied it to trunk in [1018]. Now if we can port the templates to the other themes, we'll have this ticket wrapped up.

comment:5 Changed 14 years ago by anonymous

  • Milestone set to 1.0.2
  • Owner changed from rjl to anonymous
  • Status changed from new to assigned

comment:6 Changed 14 years ago by dmorton

  • Owner changed from anonymous to dmorton
  • Status changed from assigned to new

THis will also take care of #80

comment:7 Changed 14 years ago by dmorton

  • Status changed from new to assigned

comment:8 Changed 14 years ago by dmorton

  • Resolution set to fixed
  • Status changed from assigned to closed

implemented in [1035] 1036] [1037] [1038]

Note: See TracTickets for help on using tickets.