Shoudn't the view class (or any of the ancestors) have a property var $current_diplay (or a magic method or a construct to initialize it)???
This property is later used in many places (e. g. views.inc line 214) :

$display_id = ($this->display_handler->is_defaulted('filters')) ? 'default' : $this->current_display;
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

neoglez’s picture

Category: bug » feature

Well, going over some forums i find different opinions, the php manual doesn't say much, but it's a fact that properties can be created dinamically inside any function.
I think it wouldn't hurt to make the declaration (i'm seeing some strange behaviors that could be related to this).

dawehner’s picture

Category: feature » task

Feel free to create a patch with a sane default value.

neoglez’s picture

Component: Miscellaneous » Code
Status: Active » Needs review
FileSize
405 bytes

Piece of cake ;-)

dawehner’s picture

Status: Needs review » Needs work
+++ b/includes/view.incundefined
@@ -60,6 +60,13 @@ class view extends views_db_object {
+   * @var current_display

@var is often used for the type of the var. Isn't string here something better.

Powered by Dreditor.

merlinofchaos’s picture

I think declaring vars we use for sure in the view is a good thing; it improves documentation tremendously to do it. We have to do mor ethan just have the var, we need to provide doxygen with what it has.

Also, it would be good to analyze the view object and see what ELSE we're missing.

neoglez’s picture

yap, you're both so right!
Following the example in Drupal Doxygen and comment formatting conventions.

neoglez’s picture

Status: Needs work » Needs review
dawehner’s picture

Status: Needs review » Fixed

Thanks. Commited

Status: Fixed » Closed (fixed)

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