I just open the issue, because the patch wasn't commited, and i really don't like my old code.
This patch was created by overall at http://drupal.org/node/430068#comment-1690684
(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
// Add the counter for the current site. $count += array_search($values, $this->view->result) + 1;with
<?php // Add the counter for the current site. $count += $this->view->row_index + 1; ?>This replacement already in the patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | views-counter_row_index.patch | 3.13 KB | dawehner |
| #1 | 551752_views_row_index.patch | 2.75 KB | dawehner |
Comments
Comment #1
dawehnerWhy set $view->row_index more than one time, even its not needed.
I updated this part.
Comment #2
dawehnerSo here is a new version, what changed since last patch:
Comment #3
superbaloo commentedthat's looks okay for me :)
I'm on crack. Are you, too?
Comment #4
superbaloo commentedForgot the status
Comment #5
merlinofchaos commentedCommitted!