diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8400559f2e6f8f4419a766e560ec2eb214a36ce3..eb96a9fed139d20343f39612acf032b6fe3f1193 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -35,6 +35,8 @@ Fix fieldsets in field handler. #776830: Attachments and other displays lost "Items to display" controls. #747782 by dereine: Improve jump menu grouping. #1026014 by dereine and alex_b: Use more always should not ask for the count query to see if we need to show the more link. +#1012596 by dereine: More inline documentation of class variables. +#988680 by mikeytown2: Fix Views memory leak with attachments. Views 3.x-7.x-alpha1 (05-Jan-2011) ================================== diff --git a/includes/base.inc b/includes/base.inc index 21deea79a7f86a5e3e6327bb70aa543868f138a1..bcad6ed439697fc1305f7a23505e49089ad8eb3e 100644 --- a/includes/base.inc +++ b/includes/base.inc @@ -14,6 +14,14 @@ class views_object { * Except for displays, options for the object will be held here. */ var $options = array(); + + /** + * The top object of a view. + * + * @var view + */ + var $view = NULL; + /** * Information about options for all kinds of purposes will be held here. * @code diff --git a/includes/handlers.inc b/includes/handlers.inc index 457b241349827311cf3c3b274f74f2ecb4e4b252..c057df63148870b30ccb354acbe8f77e78d25eaa 100644 --- a/includes/handlers.inc +++ b/includes/handlers.inc @@ -122,6 +122,20 @@ function views_get_table_join($table, $base_table) { * - access arguments: An array of arguments for the access callback. */ class views_handler extends views_object { + /** + * The top object of a view. + * + * @var view + */ + var $view = NULL; + + /** + * Where the $query object will reside: + * + * @var views_plugin_query + */ + var $query = NULL; + /** * init the handler with necessary data. * @param $view diff --git a/includes/plugins.inc b/includes/plugins.inc index 80ece4689708f21a6d6c2f455a13b55f8647a58e..e592af7874984ec6fae43d24eb770991f482f66a 100644 --- a/includes/plugins.inc +++ b/includes/plugins.inc @@ -418,6 +418,20 @@ function views_discover_plugins() { * Abstract base class to provide interface common to all plugins. */ class views_plugin extends views_object { + /** + * The top object of a view. + * + * @var view + */ + var $view = NULL; + + /** + * The current used display plugin. + * + * @var views_plugin_display + */ + var $display = NULL; + /** * Init will be called after construct, when the plugin is attached to a * view and a display. diff --git a/includes/view.inc b/includes/view.inc index 3aa87834153a5b91b0d48740ac78b495b69fa569..4b558c3edefe9bd0e90355f48347a7807431259c 100644 --- a/includes/view.inc +++ b/includes/view.inc @@ -51,9 +51,27 @@ class view extends views_db_object { // Used to store views that were previously running if we recurse. var $old_view = array(); - // Where the $query object will reside: + /** + * Where the $query object will reside: + * + * @var views_plugin_query + */ var $query = NULL; + /** + * The current used display plugin. + * + * @var views_plugin_display + */ + var $display_handler; + + /** + * The current used style plugin. + * + * @var views_plugin_style + */ + var $style_plugin; + /** * Constructor */ @@ -1275,7 +1293,8 @@ class view extends views_db_object { * The name of the view or its internal view id (vid) * @param $reset * If TRUE, reset this entry in the load cache. - * @return A view object or NULL if it was not available. + * @return view + * A view object or NULL if it was not available. */ static function &load($arg, $reset = FALSE) { static $cache = array(); @@ -1512,6 +1531,9 @@ class view extends views_db_object { * view. This gets ugly fast. * * This will completely wipe a view clean so it can be considered fresh. + * + * @return view + * The cloned view. */ function clone_view() { $clone = version_compare(phpversion(), '5.0') < 0 ? $this : clone($this); @@ -1919,7 +1941,7 @@ class views_db_object { * The title of the display; optional, may be filled in from default. * @param $id * The id to use. - * @return + * @return views_plugin_display * A reference to the new handler object. */ function &new_display($type = 'page', $title = NULL, $id = NULL) { diff --git a/plugins/views_plugin_display.inc b/plugins/views_plugin_display.inc index bad8220459f9c59de0f41d0da9bb4b9acdeec731..1d445bcc5c187b2a65948e006a20203732960db8 100644 --- a/plugins/views_plugin_display.inc +++ b/plugins/views_plugin_display.inc @@ -25,6 +25,13 @@ * @ingroup views_display_plugins */ class views_plugin_display extends views_plugin { + /** + * The top object of a view. + * + * @var view + */ + var $view = NULL; + var $handlers = array(); function init(&$view, &$display, $options = NULL) { diff --git a/plugins/views_plugin_query_default.inc b/plugins/views_plugin_query_default.inc index 7658944dc62884ecb38d3632559b30f894a3eb9f..d72b292c686dd7f70c3be038244faa3456a15db0 100644 --- a/plugins/views_plugin_query_default.inc +++ b/plugins/views_plugin_query_default.inc @@ -73,6 +73,13 @@ class views_plugin_query_default extends views_plugin_query { */ var $get_count_optimized = NULL; + /** + * The current used pager plugin. + * + * @var views_plugin_pager + */ + var $pager = NULL; + /** * Constructor; Create the basic query object and fill with default values. */