Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Nuovo sito - PHP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
37
Issues
37
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Nuovo sito - PHP
Commits
236c5826
Commit
236c5826
authored
Feb 14, 2015
by
Riccardo Padovani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated views to 7.x-3.10
parent
5e8ef58b
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
172 additions
and
55 deletions
+172
-55
sites/all/modules/views/LICENSE.txt
sites/all/modules/views/LICENSE.txt
+0
-0
sites/all/modules/views/handlers/views_handler_argument.inc
sites/all/modules/views/handlers/views_handler_argument.inc
+17
-13
sites/all/modules/views/handlers/views_handler_field_counter.inc
...ll/modules/views/handlers/views_handler_field_counter.inc
+19
-3
sites/all/modules/views/includes/admin.inc
sites/all/modules/views/includes/admin.inc
+1
-4
sites/all/modules/views/includes/ajax.inc
sites/all/modules/views/includes/ajax.inc
+5
-1
sites/all/modules/views/includes/base.inc
sites/all/modules/views/includes/base.inc
+1
-1
sites/all/modules/views/js/ajax.js
sites/all/modules/views/js/ajax.js
+3
-1
sites/all/modules/views/js/ajax_view.js
sites/all/modules/views/js/ajax_view.js
+7
-1
sites/all/modules/views/js/jquery.ui.dialog.patch.js
sites/all/modules/views/js/jquery.ui.dialog.patch.js
+1
-1
sites/all/modules/views/js/views-contextual.js
sites/all/modules/views/js/views-contextual.js
+1
-1
sites/all/modules/views/modules/comment.views_default.inc
sites/all/modules/views/modules/comment.views_default.inc
+4
-2
sites/all/modules/views/modules/field.views.inc
sites/all/modules/views/modules/field.views.inc
+7
-1
sites/all/modules/views/modules/field/views_handler_filter_field_list_boolean.inc
...modules/field/views_handler_filter_field_list_boolean.inc
+33
-0
sites/all/modules/views/modules/node.views_default.inc
sites/all/modules/views/modules/node.views_default.inc
+6
-3
sites/all/modules/views/modules/node.views_template.inc
sites/all/modules/views/modules/node.views_template.inc
+1
-0
sites/all/modules/views/modules/search.views_default.inc
sites/all/modules/views/modules/search.views_default.inc
+2
-1
sites/all/modules/views/modules/statistics.views_default.inc
sites/all/modules/views/modules/statistics.views_default.inc
+2
-1
sites/all/modules/views/modules/taxonomy.views_default.inc
sites/all/modules/views/modules/taxonomy.views_default.inc
+2
-1
sites/all/modules/views/plugins/views_wizard/views_ui_comment_views_wizard.class.php
...gins/views_wizard/views_ui_comment_views_wizard.class.php
+1
-0
sites/all/modules/views/plugins/views_wizard/views_ui_node_views_wizard.class.php
...plugins/views_wizard/views_ui_node_views_wizard.class.php
+1
-0
sites/all/modules/views/plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php
...iews_wizard/views_ui_taxonomy_term_views_wizard.class.php
+1
-0
sites/all/modules/views/tests/views_test.info
sites/all/modules/views/tests/views_test.info
+3
-3
sites/all/modules/views/views.api.php
sites/all/modules/views/views.api.php
+1
-1
sites/all/modules/views/views.info
sites/all/modules/views/views.info
+4
-3
sites/all/modules/views/views.module
sites/all/modules/views/views.module
+46
-10
sites/all/modules/views/views_ui.info
sites/all/modules/views/views_ui.info
+3
-3
No files found.
sites/all/modules/views/LICENSE.txt
100755 → 100644
View file @
236c5826
File mode changed from 100755 to 100644
sites/all/modules/views/handlers/views_handler_argument.inc
View file @
236c5826
...
...
@@ -423,11 +423,13 @@ class views_handler_argument extends views_handler {
$plugin
->
options_validate
(
$form
[
'argument_default'
][
$default_id
],
$form_state
,
$form_state
[
'values'
][
'options'
][
'argument_default'
][
$default_id
]);
}
// summary plugin
$summary_id
=
$form_state
[
'values'
][
'options'
][
'summary'
][
'format'
];
$plugin
=
$this
->
get_plugin
(
'style'
,
$summary_id
);
if
(
$plugin
)
{
$plugin
->
options_validate
(
$form
[
'summary'
][
'options'
][
$summary_id
],
$form_state
,
$form_state
[
'values'
][
'options'
][
'summary'
][
'options'
][
$summary_id
]);
// Validate summary plugin options if one is present.
if
(
isset
(
$form_state
[
'values'
][
'options'
][
'summary'
][
'format'
]))
{
$summary_id
=
$form_state
[
'values'
][
'options'
][
'summary'
][
'format'
];
$plugin
=
$this
->
get_plugin
(
'style'
,
$summary_id
);
if
(
$plugin
)
{
$plugin
->
options_validate
(
$form
[
'summary'
][
'options'
][
$summary_id
],
$form_state
,
$form_state
[
'values'
][
'options'
][
'summary'
][
'options'
][
$summary_id
]);
}
}
$validate_id
=
$form_state
[
'values'
][
'options'
][
'validate'
][
'type'
];
...
...
@@ -453,14 +455,16 @@ class views_handler_argument extends views_handler {
$form_state
[
'values'
][
'options'
][
'default_argument_options'
]
=
$options
;
}
// summary plugin
$summary_id
=
$form_state
[
'values'
][
'options'
][
'summary'
][
'format'
];
$plugin
=
$this
->
get_plugin
(
'style'
,
$summary_id
);
if
(
$plugin
)
{
$options
=
&
$form_state
[
'values'
][
'options'
][
'summary'
][
'options'
][
$summary_id
];
$plugin
->
options_submit
(
$form
[
'summary'
][
'options'
][
$summary_id
],
$form_state
,
$options
);
// Copy the now submitted options to their final resting place so they get saved.
$form_state
[
'values'
][
'options'
][
'summary_options'
]
=
$options
;
// Handle summary plugin options if one is present.
if
(
isset
(
$form_state
[
'values'
][
'options'
][
'summary'
][
'format'
]))
{
$summary_id
=
$form_state
[
'values'
][
'options'
][
'summary'
][
'format'
];
$plugin
=
$this
->
get_plugin
(
'style'
,
$summary_id
);
if
(
$plugin
)
{
$options
=
&
$form_state
[
'values'
][
'options'
][
'summary'
][
'options'
][
$summary_id
];
$plugin
->
options_submit
(
$form
[
'summary'
][
'options'
][
$summary_id
],
$form_state
,
$options
);
// Copy the now submitted options to their final resting place so they get saved.
$form_state
[
'values'
][
'options'
][
'summary_options'
]
=
$options
;
}
}
$validate_id
=
$form_state
[
'values'
][
'options'
][
'validate'
][
'type'
];
...
...
sites/all/modules/views/handlers/views_handler_field_counter.inc
View file @
236c5826
...
...
@@ -14,6 +14,7 @@ class views_handler_field_counter extends views_handler_field {
function
option_definition
()
{
$options
=
parent
::
option_definition
();
$options
[
'counter_start'
]
=
array
(
'default'
=>
1
);
$options
[
'reverse'
]
=
array
(
'default'
=>
FALSE
);
return
$options
;
}
...
...
@@ -26,6 +27,13 @@ class views_handler_field_counter extends views_handler_field {
'#size'
=>
2
,
);
$form
[
'reverse'
]
=
array
(
'#type'
=>
'checkbox'
,
'#title'
=>
t
(
'Reverse'
),
'#default_value'
=>
$this
->
options
[
'reverse'
],
'#description'
=>
t
(
'Reverse the counter.'
),
);
parent
::
options_form
(
$form
,
$form_state
);
}
...
...
@@ -34,16 +42,24 @@ class views_handler_field_counter extends views_handler_field {
}
function
render
(
$values
)
{
$reverse
=
empty
(
$this
->
options
[
'reverse'
])
?
1
:
-
1
;
// Note: 1 is subtracted from the counter start value below because the
// counter value is incremented by 1 at the end of this function.
$count
=
is_numeric
(
$this
->
options
[
'counter_start'
])
?
$this
->
options
[
'counter_start'
]
-
1
:
0
;
$counter_start
=
is_numeric
(
$this
->
options
[
'counter_start'
])
?
$this
->
options
[
'counter_start'
]
:
0
;
$count
=
(
$reverse
==
-
1
)
?
count
(
$this
->
view
->
result
)
+
$counter_start
:
$counter_start
-
1
;
$pager
=
$this
->
view
->
query
->
pager
;
// Get the base count of the pager.
if
(
$pager
->
use_pager
())
{
$count
+=
(
$pager
->
get_items_per_page
()
*
$pager
->
get_current_page
()
+
$pager
->
get_offset
());
if
(
$reverse
==
-
1
)
{
$count
=
(
$pager
->
total_items
+
$counter_start
-
(
$pager
->
get_current_page
()
*
$pager
->
get_items_per_page
())
+
$pager
->
get_offset
());
}
else
{
$count
+=
((
$pager
->
get_items_per_page
()
*
$pager
->
get_current_page
()
+
$pager
->
get_offset
()))
*
$reverse
;
}
}
// Add the counter for the current site.
$count
+=
$this
->
view
->
row_index
+
1
;
$count
+=
(
$this
->
view
->
row_index
+
1
)
*
$reverse
;
return
$count
;
}
...
...
sites/all/modules/views/includes/admin.inc
View file @
236c5826
...
...
@@ -855,9 +855,6 @@ function views_ui_break_lock_confirm($form, &$form_state, $view) {
}
$cancel
=
'admin/structure/views/view/'
.
$view
->
name
.
'/edit'
;
if
(
!
empty
(
$_REQUEST
[
'cancel'
]))
{
$cancel
=
$_REQUEST
[
'cancel'
];
}
$account
=
user_load
(
$view
->
locked
->
uid
);
return
confirm_form
(
$form
,
...
...
@@ -2964,7 +2961,7 @@ function views_ui_ajax_form($js, $key, $view, $display_id = '') {
else
{
$output
=
array
();
$output
[]
=
views_ajax_command_dismiss_form
();
$output
[]
=
views_ajax_command_show_buttons
();
$output
[]
=
views_ajax_command_show_buttons
(
!
empty
(
$view
->
changed
)
);
$output
[]
=
views_ajax_command_trigger_preview
();
if
(
!
empty
(
$form_state
[
'#page_title'
]))
{
$output
[]
=
views_ajax_command_replace_title
(
$form_state
[
'#page_title'
]);
...
...
sites/all/modules/views/includes/ajax.inc
View file @
236c5826
...
...
@@ -169,12 +169,16 @@ function views_ajax_command_scroll_top($selector) {
/**
* Shows Save and Cancel buttons.
*
* @param bool $changed
* Whether of not the view has changed.
*
* @return
* An array suitable for use with the ajax_render() function.
*/
function
views_ajax_command_show_buttons
()
{
function
views_ajax_command_show_buttons
(
$changed
)
{
$command
=
array
(
'command'
=>
'viewsShowButtons'
,
'changed'
=>
(
bool
)
$changed
,
);
return
$command
;
}
...
...
sites/all/modules/views/includes/base.inc
View file @
236c5826
...
...
@@ -117,7 +117,7 @@ class views_object {
$localization_keys
=
$this
->
localization_keys
;
}
// but plugins don't because there isn't a common init() these days.
else
if
(
!
empty
(
$this
->
is_plugin
))
{
else
if
(
!
empty
(
$this
->
is_plugin
)
&&
empty
(
$localization_keys
)
)
{
if
(
$this
->
plugin_type
!=
'display'
)
{
$localization_keys
=
array
(
$this
->
view
->
current_display
);
$localization_keys
[]
=
$this
->
plugin_type
;
...
...
sites/all/modules/views/js/ajax.js
View file @
236c5826
...
...
@@ -61,7 +61,9 @@
Drupal
.
ajax
.
prototype
.
commands
.
viewsShowButtons
=
function
(
ajax
,
response
,
status
)
{
$
(
'
div.views-edit-view div.form-actions
'
).
removeClass
(
'
js-hide
'
);
$
(
'
div.views-edit-view div.view-changed.messages
'
).
removeClass
(
'
js-hide
'
);
if
(
response
.
changed
)
{
$
(
'
div.views-edit-view div.view-changed.messages
'
).
removeClass
(
'
js-hide
'
);
}
};
Drupal
.
ajax
.
prototype
.
commands
.
viewsTriggerPreview
=
function
(
ajax
,
response
,
status
)
{
...
...
sites/all/modules/views/js/ajax_view.js
View file @
236c5826
...
...
@@ -57,7 +57,7 @@ Drupal.views.ajaxView = function(settings) {
this
.
settings
=
settings
;
// Add the ajax to exposed forms.
this
.
$exposed_form
=
$
(
'
form#views-exposed-form-
'
+
settings
.
view_name
.
replace
(
/_/g
,
'
-
'
)
+
'
-
'
+
settings
.
view_display_id
.
replace
(
/_/g
,
'
-
'
)
);
this
.
$exposed_form
=
this
.
$view
.
children
(
'
.view-filters
'
).
children
(
'
form
'
);
this
.
$exposed_form
.
once
(
jQuery
.
proxy
(
this
.
attachExposedFormAjax
,
this
));
// Add the ajax to pagers.
...
...
@@ -67,6 +67,12 @@ Drupal.views.ajaxView = function(settings) {
.
filter
(
jQuery
.
proxy
(
this
.
filterNestedViews
,
this
))
.
once
(
jQuery
.
proxy
(
this
.
attachPagerAjax
,
this
));
// Add a trigger to update this view specifically. In order to trigger a
// refresh use the following code.
//
// @code
// jQuery('.view-name').trigger('RefreshView');
// @endcode
// Add a trigger to update this view specifically.
var
self_settings
=
this
.
element_settings
;
self_settings
.
event
=
'
RefreshView
'
;
...
...
sites/all/modules/views/js/jquery.ui.dialog.patch.js
View file @
236c5826
...
...
@@ -20,7 +20,7 @@
*/
(
function
(
$
,
undefined
)
{
if
(
$
.
ui
&&
$
.
ui
.
dialog
)
{
if
(
$
.
ui
&&
$
.
ui
.
dialog
&&
$
.
ui
.
dialog
.
overlay
)
{
$
.
ui
.
dialog
.
overlay
.
events
=
$
.
map
(
'
focus,keydown,keypress
'
.
split
(
'
,
'
),
function
(
event
)
{
return
event
+
'
.dialog-overlay
'
;
}).
join
(
'
'
);
}
...
...
sites/all/modules/views/js/views-contextual.js
View file @
236c5826
...
...
@@ -9,7 +9,7 @@ Drupal.behaviors.viewsContextualLinks = {
// If there are views-related contextual links attached to the main page
// content, find the smallest region that encloses both the links and the
// view, and display it as a contextual links region.
$
(
'
.views-contextual-links-page
'
,
context
).
closest
(
'
:has(
.view
)
'
).
addClass
(
'
contextual-links-region
'
);
$
(
'
.views-contextual-links-page
'
,
context
).
closest
(
'
:has(
".view"):not("body"
)
'
).
addClass
(
'
contextual-links-region
'
);
}
};
...
...
sites/all/modules/views/modules/comment.views_default.inc
View file @
236c5826
...
...
@@ -25,7 +25,8 @@ function comment_views_default_views() {
$handler
=
$view
->
new_display
(
'default'
,
'Master'
,
'default'
);
$handler
->
display
->
display_options
[
'title'
]
=
'Recent comments'
;
$handler
->
display
->
display_options
[
'use_more'
]
=
TRUE
;
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'perm'
;
$handler
->
display
->
display_options
[
'access'
][
'perm'
]
=
'access comments'
;
$handler
->
display
->
display_options
[
'cache'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'query'
][
'type'
]
=
'views_query'
;
$handler
->
display
->
display_options
[
'query'
][
'options'
][
'query_comment'
]
=
FALSE
;
...
...
@@ -134,7 +135,8 @@ function comment_views_default_views() {
/* Display: Master */
$handler
=
$view
->
new_display
(
'default'
,
'Master'
,
'default'
);
$handler
->
display
->
display_options
[
'title'
]
=
'Recent posts'
;
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'perm'
;
$handler
->
display
->
display_options
[
'access'
][
'perm'
]
=
'access content'
;
$handler
->
display
->
display_options
[
'cache'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'query'
][
'type'
]
=
'views_query'
;
$handler
->
display
->
display_options
[
'query'
][
'options'
][
'query_comment'
]
=
FALSE
;
...
...
sites/all/modules/views/modules/field.views.inc
View file @
236c5826
...
...
@@ -488,7 +488,13 @@ function list_field_views_data($field) {
foreach
(
$data
as
$table_name
=>
$table_data
)
{
foreach
(
$table_data
as
$field_name
=>
$field_data
)
{
if
(
isset
(
$field_data
[
'filter'
])
&&
$field_name
!=
'delta'
)
{
$data
[
$table_name
][
$field_name
][
'filter'
][
'handler'
]
=
'views_handler_filter_field_list'
;
if
(
$field
[
'type'
]
==
'list_boolean'
)
{
// Special handler for boolean fields.
$data
[
$table_name
][
$field_name
][
'filter'
][
'handler'
]
=
'views_handler_filter_field_list_boolean'
;
}
else
{
$data
[
$table_name
][
$field_name
][
'filter'
][
'handler'
]
=
'views_handler_filter_field_list'
;
}
}
if
(
isset
(
$field_data
[
'argument'
])
&&
$field_name
!=
'delta'
)
{
if
(
$field
[
'type'
]
==
'list_text'
)
{
...
...
sites/all/modules/views/modules/field/views_handler_filter_field_list_boolean.inc
0 → 100644
View file @
236c5826
<?php
/**
* @file
* Definition of views_handler_filter_field_list_boolean.
*/
/**
* Filter handler for boolean fields.
*
* @ingroup views_filter_handlers
*/
class
views_handler_filter_field_list_boolean
extends
views_handler_filter_field_list
{
function
get_value_options
()
{
$field
=
field_info_field
(
$this
->
definition
[
'field_name'
]);
$value_options
=
list_allowed_values
(
$field
);
// Boolean fields have an option for using the label as the 'on' value. This
// results in there being no label values in the allows values array.
// If this is the case, we need to provide the labels.
$filtered
=
array_filter
(
$value_options
);
if
(
empty
(
$filtered
))
{
// We can't provide the label in the same way the FieldAPI formatter does,
// as these are different on each instance, and we may be operating on
// more than one bundle.
$value_options
[
0
]
=
t
(
'Off'
);
$value_options
[
1
]
=
t
(
'On'
);
}
$this
->
value_options
=
$value_options
;
}
}
sites/all/modules/views/modules/node.views_default.inc
View file @
236c5826
...
...
@@ -24,7 +24,8 @@ function node_views_default_views() {
/* Display: Master */
$handler
=
$view
->
new_display
(
'default'
,
'Master'
,
'default'
);
$handler
->
display
->
display_options
[
'title'
]
=
'Monthly archive'
;
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'perm'
;
$handler
->
display
->
display_options
[
'access'
][
'perm'
]
=
'access content'
;
$handler
->
display
->
display_options
[
'cache'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'query'
][
'type'
]
=
'views_query'
;
$handler
->
display
->
display_options
[
'query'
][
'options'
][
'query_comment'
]
=
FALSE
;
...
...
@@ -110,7 +111,8 @@ function node_views_default_views() {
/* Display: Master */
$handler
=
$view
->
new_display
(
'default'
,
'Master'
,
'default'
);
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'perm'
;
$handler
->
display
->
display_options
[
'access'
][
'perm'
]
=
'access content'
;
$handler
->
display
->
display_options
[
'cache'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'query'
][
'type'
]
=
'views_query'
;
$handler
->
display
->
display_options
[
'query'
][
'options'
][
'query_comment'
]
=
FALSE
;
...
...
@@ -192,7 +194,8 @@ function node_views_default_views() {
/* Display: Master */
$handler
=
$view
->
new_display
(
'default'
,
'Master'
,
'default'
);
$handler
->
display
->
display_options
[
'use_ajax'
]
=
TRUE
;
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'perm'
;
$handler
->
display
->
display_options
[
'access'
][
'perm'
]
=
'access content'
;
$handler
->
display
->
display_options
[
'cache'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'query'
][
'type'
]
=
'views_query'
;
$handler
->
display
->
display_options
[
'query'
][
'options'
][
'query_comment'
]
=
FALSE
;
...
...
sites/all/modules/views/modules/node.views_template.inc
View file @
236c5826
...
...
@@ -24,6 +24,7 @@ function node_views_templates() {
$handler
=
$view
->
new_display
(
'default'
,
'Defaults'
,
'default'
);
$handler
->
display
->
display_options
[
'title'
]
=
'Image gallery'
;
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'perm'
;
$handler
->
display
->
display_options
[
'access'
][
'perm'
]
=
'access content'
;
$handler
->
display
->
display_options
[
'cache'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'query'
][
'type'
]
=
'views_query'
;
$handler
->
display
->
display_options
[
'exposed_form'
][
'type'
]
=
'basic'
;
...
...
sites/all/modules/views/modules/search.views_default.inc
View file @
236c5826
...
...
@@ -23,7 +23,8 @@ function search_views_default_views() {
/* Display: Master */
$handler
=
$view
->
new_display
(
'default'
,
'Master'
,
'default'
);
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'perm'
;
$handler
->
display
->
display_options
[
'access'
][
'perm'
]
=
'access content'
;
$handler
->
display
->
display_options
[
'cache'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'query'
][
'type'
]
=
'views_query'
;
$handler
->
display
->
display_options
[
'query'
][
'options'
][
'query_comment'
]
=
FALSE
;
...
...
sites/all/modules/views/modules/statistics.views_default.inc
View file @
236c5826
...
...
@@ -25,7 +25,8 @@ function statistics_views_default_views() {
$handler
=
$view
->
new_display
(
'default'
,
'Master'
,
'default'
);
$handler
->
display
->
display_options
[
'title'
]
=
'Popular content'
;
$handler
->
display
->
display_options
[
'use_more'
]
=
TRUE
;
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'perm'
;
$handler
->
display
->
display_options
[
'access'
][
'perm'
]
=
'access content'
;
$handler
->
display
->
display_options
[
'cache'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'query'
][
'type'
]
=
'views_query'
;
$handler
->
display
->
display_options
[
'query'
][
'options'
][
'query_comment'
]
=
FALSE
;
...
...
sites/all/modules/views/modules/taxonomy.views_default.inc
View file @
236c5826
...
...
@@ -23,7 +23,8 @@ function taxonomy_views_default_views() {
/* Display: Master */
$handler
=
$view
->
new_display
(
'default'
,
'Master'
,
'default'
);
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'access'
][
'type'
]
=
'perm'
;
$handler
->
display
->
display_options
[
'access'
][
'perm'
]
=
'access content'
;
$handler
->
display
->
display_options
[
'cache'
][
'type'
]
=
'none'
;
$handler
->
display
->
display_options
[
'query'
][
'type'
]
=
'views_query'
;
$handler
->
display
->
display_options
[
'query'
][
'options'
][
'query_comment'
]
=
FALSE
;
...
...
sites/all/modules/views/plugins/views_wizard/views_ui_comment_views_wizard.class.php
View file @
236c5826
...
...
@@ -75,6 +75,7 @@ class ViewsUiCommentViewsWizard extends ViewsUiBaseViewsWizard {
// Add permission-based access control.
$display_options
[
'access'
][
'type'
]
=
'perm'
;
$display_options
[
'access'
][
'perm'
]
=
'access comments'
;
// Add a relationship to nodes.
$display_options
[
'relationships'
][
'nid'
][
'id'
]
=
'nid'
;
...
...
sites/all/modules/views/plugins/views_wizard/views_ui_node_views_wizard.class.php
View file @
236c5826
...
...
@@ -64,6 +64,7 @@ class ViewsUiNodeViewsWizard extends ViewsUiBaseViewsWizard {
// Add permission-based access control.
$display_options
[
'access'
][
'type'
]
=
'perm'
;
$display_options
[
'access'
][
'perm'
]
=
'access content'
;
// Remove the default fields, since we are customizing them here.
unset
(
$display_options
[
'fields'
]);
...
...
sites/all/modules/views/plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php
View file @
236c5826
...
...
@@ -15,6 +15,7 @@ class ViewsUiTaxonomyTermViewsWizard extends ViewsUiBaseViewsWizard {
// Add permission-based access control.
$display_options
[
'access'
][
'type'
]
=
'perm'
;
$display_options
[
'access'
][
'perm'
]
=
'access content'
;
// Remove the default fields, since we are customizing them here.
unset
(
$display_options
[
'fields'
]);
...
...
sites/all/modules/views/tests/views_test.info
View file @
236c5826
...
...
@@ -5,9 +5,9 @@ core = 7.x
dependencies
[]
=
views
hidden
=
TRUE
;
Information
added
by
Drupal
.
org
packaging
script
on
201
4
-
05
-
20
version
=
"7.x-3.
8
"
;
Information
added
by
Drupal
.
org
packaging
script
on
201
5
-
02
-
11
version
=
"7.x-3.
10
"
core
=
"7.x"
project
=
"views"
datestamp
=
"14
00618928
"
datestamp
=
"14
23648085
"
sites/all/modules/views/views.api.php
View file @
236c5826
...
...
@@ -910,7 +910,7 @@ function hook_views_pre_view(&$view, &$display_id, &$args) {
user_access
(
'administer site configuration'
)
&&
$display_id
==
'public_display'
)
{
$
display_id
=
'private_display'
;
$
view
->
set_display
(
'private_display'
)
;
}
}
...
...
sites/all/modules/views/views.info
View file @
236c5826
...
...
@@ -102,6 +102,7 @@ files[] = modules/contact/views_handler_field_contact_link.inc
files
[]
=
modules
/
field
/
views_handler_field_field
.
inc
files
[]
=
modules
/
field
/
views_handler_relationship_entity_reverse
.
inc
files
[]
=
modules
/
field
/
views_handler_argument_field_list
.
inc
files
[]
=
modules
/
field
/
views_handler_filter_field_list_boolean
.
inc
files
[]
=
modules
/
field
/
views_handler_argument_field_list_string
.
inc
files
[]
=
modules
/
field
/
views_handler_filter_field_list
.
inc
files
[]
=
modules
/
filter
/
views_handler_field_filter_format_name
.
inc
...
...
@@ -317,9 +318,9 @@ files[] = tests/views_cache.test
files
[]
=
tests
/
views_view
.
test
files
[]
=
tests
/
views_ui
.
test
;
Information
added
by
Drupal
.
org
packaging
script
on
201
4
-
05
-
20
version
=
"7.x-3.
8
"
;
Information
added
by
Drupal
.
org
packaging
script
on
201
5
-
02
-
11
version
=
"7.x-3.
10
"
core
=
"7.x"
project
=
"views"
datestamp
=
"14
00618928
"
datestamp
=
"14
23648085
"
sites/all/modules/views/views.module
View file @
236c5826
...
...
@@ -465,16 +465,31 @@ function views_menu_alter(&$callbacks) {
* The menu argument index. This counts from 1.
*/
function
views_arg_load
(
$value
,
$name
,
$display_id
,
$index
)
{
static
$views
=
array
();
// Make sure we haven't already loaded this views argument for a similar menu
// item elsewhere.
$key
=
$name
.
':'
.
$display_id
.
':'
.
$value
.
':'
.
$index
;
if
(
isset
(
$views
[
$key
]))
{
return
$views
[
$key
];
static
$views
=
array
();
$display_ids
=
is_array
(
$display_id
)
?
$display_id
:
array
(
$display_id
);
$display_id
=
reset
(
$display_ids
);
foreach
(
$display_ids
as
$id
)
{
// Make sure we haven't already loaded this views argument for a similar
// menu item elsewhere. Since access is always checked for the current user,
// we are sure that the static cache contains valid entries.
$key
=
$name
.
':'
.
$id
.
':'
.
$value
.
':'
.
$index
;
if
(
isset
(
$views
[
$key
]))
{
return
$views
[
$key
];
}
// Lazy load the view object to avoid unnecessary work.
if
(
!
isset
(
$view
))
{
$view
=
views_get_view
(
$name
);
}
// Pick the first display we have access to.
if
(
$view
&&
count
(
$display_ids
)
>
1
&&
$view
->
access
(
$id
))
{
$display_id
=
$id
;
break
;
}
}
if
(
$view
=
views_get_view
(
$name
)
)
{
if
(
$view
)
{
$view
->
set_display
(
$display_id
);
$view
->
init_handlers
();
...
...
@@ -548,7 +563,7 @@ function views_page_alter(&$page) {
}
/**
* Implements MODULE_preprocess_HOOK().
* Implements MODULE_preprocess_HOOK()
for html.tpl.php
.
*/
function
views_preprocess_html
(
&
$variables
)
{
// If the page contains a view as its main content, contextual links may have
...
...
@@ -566,7 +581,7 @@ function views_preprocess_html(&$variables) {
if
(
!
empty
(
$variables
[
'page'
][
'#views_contextual_links_info'
]))
{
$key
=
array_search
(
'contextual-links-region'
,
$variables
[
'classes_array'
]);
if
(
$key
!==
FALSE
)
{
unset
(
$variables
[
'classes_array'
][
$key
]
);
$variables
[
'classes_array'
]
=
array_diff
(
$variables
[
'classes_array'
],
array
(
'contextual-links-region'
)
);
// Add the JavaScript, with a group and weight such that it will run
// before modules/contextual/contextual.js.
drupal_add_js
(
drupal_get_path
(
'module'
,
'views'
)
.
'/js/views-contextual.js'
,
array
(
'group'
=>
JS_LIBRARY
,
'weight'
=>
-
1
));
...
...
@@ -574,6 +589,27 @@ function views_preprocess_html(&$variables) {
}
}
/**
* Implements hook_preprocess_HOOK() for page.tpl.php.
*/
function
views_preprocess_page
(
&
$variables
)
{
// If the page contains a view as its main content, contextual links may have
// been attached to the page as a whole; for example, by views_page_alter().
// This allows them to be associated with the page and rendered by default
// next to the page title (which we want). However, it also causes the
// Contextual Links module to treat the wrapper for the entire page (i.e.,
// the <body> tag) as the HTML element that these contextual links are
// associated with. This we don't want; for better visual highlighting, we
// prefer a smaller region to be chosen. The region we prefer differs from
// theme to theme and depends on the details of the theme's markup in
// page.tpl.php, so we can only find it using JavaScript. We therefore remove
// the "contextual-links-region" class from the <body> tag here and add
// JavaScript that will insert it back in the correct place.
if
(
!
empty
(
$variables
[
'page'
][
'#views_contextual_links_info'
]))
{
$variables
[
'classes_array'
]
=
array_diff
(
$variables
[
'classes_array'
],
array
(
'contextual-links-region'
));
}
}
/**
* Implements hook_contextual_links_view_alter().
*/
...
...
sites/all/modules/views/views_ui.info
View file @
236c5826
...
...
@@ -7,9 +7,9 @@ dependencies[] = views
files
[]
=
views_ui
.
module
files
[]
=
plugins
/
views_wizard
/
views_ui_base_views_wizard
.
class
.
php
;
Information
added
by
Drupal
.
org
packaging
script
on
201
4
-
05
-
20
version
=
"7.x-3.
8
"
;
Information
added
by
Drupal
.
org
packaging
script
on
201
5
-
02
-
11
version
=
"7.x-3.
10
"
core
=
"7.x"
project
=
"views"
datestamp
=
"14
00618928
"
datestamp
=
"14
23648085
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment