[drupal-devel] hard coded page sizes
Jose A. Reyero
jareyero at wanadoo.es
Wed Oct 12 12:50:18 UTC 2005
I don't like hardcoded values at all, and I'd like *everything* to be
configurable. The problem is if we make everything configurable, the
admin interface would be unmanageable.
Proposed solution:
Make all of these values configurable in the settings file, but not
through the web pages. Ideally, we'd access all of these values throught
the variable_get/variable_set interface, but then we'd need some array
in the settings file to hold all of these values, and then the variable
management functions to discriminate between the ones that have to be
set into the database and the ones that are in the code.
David Reed wrote:
>I have a use to expose some of the admin type pages (logs, users etc)
>in a view with limited space available. I noticed that the page size
>is hard coded in all modules that use drupals paging mechanism. A
>quick glance reveals the following hard-coded pages sizes:
>
>watchdog = 50 lines
>user = 50 lines
>statistics = 30 lines
>comment = 50 lines
>poll = 50 lines
>
>I think it would be really usefull to provide a mechanism to override
>these hard-coded values. I would suggest something simple like
>apending a value to the url in the query string for page size. This
>value could be interogated by each module that calls
>theme_pager_link() to see if it should use it's hard-coded default or
>use an override.
>
>I'm more than happy to provide some patches for this but I wanted to
>make sure I wasn't missing a far easier way to solve this issue.
>
>Does anyone else see value in this? Is there a better way to do this
>other than patching the core modules?
>
>
>
More information about the drupal-devel
mailing list