Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Apr 2009 at 14:53 UTC
Updated:
10 Jan 2010 at 14:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
dawehnerarg
mh not sure why this file got a cvs entries diff
Comment #2
merlinofchaos commentedCommitted! Very nice!
Comment #3
liquixis commented(sorry for my english)
I added "row_index" field to "view" object.
This allow optimize this field handler.
For every field handler: "$values == $this->view->result[$this->view->row_index]" is true.
This will allow replace
with
This replacement already in the patch.
Comment #4
dawehneri scanned through the patch without testing it, but its much much! nicer then now.
Additional its cool that you corrected the codestyle.
Comment #5
liquixis commentedThanks.
Comment #6
aclight commentedIt would be helpful if this field was configurable so that the value the count starts from could be set. I want to use this for a view that has an attachment which is a map with the location of all nodes returned by the view (using the gmap module). When using numerical markers, gmap starts at position '0' instead of position '1', so the number returned by this field is one higher than it should be for this particular use case.
Any objections to adding a configurable option with a default value of 1? If not I can work on a patch.
Comment #7
merlinofchaos commentedaclight: Sounds reasonable to me.
Comment #8
aclight commentedOk, attached patch does the following:
1. Provides an option for the field that is used to set the value from which counting starts.
2. Fixes a notice error that happened when a view did not use a pager (due to $count being undefined in that case).
3. Fixes whitespace error before return statement of ::render().
I did not incorporate the changes made in the patch from #3 with the exception of the whitespace fix, since I'm not sure if that change is desired by Earl or not. If it is I can reroll this with those changes as well.
Comment #9
merlinofchaos commentedGood work! Committed to 2.x and 3.x branches.
Comment #10
liquixis commentedDid you commit "row_index" changes (from http://drupal.org/node/430068#comment-1690684)?
Comment #11
merlinofchaos commentedI committed the latest patch. If there are multiple valid patches on a single issue, there's no easy way for me to figure that out.
Comment #12
liquixis commentedaclight in #8 mentioned that
But no one said him to do this...
merlinofchaos, if I make new "row_index" patch against updated version, will you commit it?
Comment #14
dawehneri'm quite sure he will commit your changes if there is a patch for the dev version, my original patch was horrible bad if you look at micro-performance
Comment #15
dawehnerRework at #551752: Counter field optimisations.
Comment #16
giorgio79 commentedNot sure if I should open a new one or post it here, but when I add the Global: View Result Counter field, and try to do a preview, I get a popup error message, and preview is not generated...
The error message is very general and goes like this:
"An error occurred at /admin/build/views/ajax/preview/taxonomy_term"
Comment #17
giorgio79 commentedOk, it also generates a fatal error after savign which was already posted.
#625330: Global: view result counter dumps caused by dsm()