Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
90dba138
Commit
90dba138
authored
Aug 11, 2012
by
Tim Plunkett
Browse files
Finish converting all "use *" to "use_*" options.
parent
2aa84d21
Changes
4
Hide whitespace changes
Inline
Side-by-side
lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
View file @
90dba138
...
...
@@ -336,7 +336,7 @@ function displays_exposed() {
* Does the display use AJAX?
*/
function
use_ajax
()
{
if
(
!
empty
(
$this
->
definition
[
'use
ajax'
]))
{
if
(
!
empty
(
$this
->
definition
[
'use
_
ajax'
]))
{
return
$this
->
get_option
(
'use_ajax'
);
}
return
FALSE
;
...
...
@@ -356,7 +356,7 @@ function use_pager() {
* Does the display have a more link enabled?
*/
function
use_more
()
{
if
(
!
empty
(
$this
->
definition
[
'use
more'
]))
{
if
(
!
empty
(
$this
->
definition
[
'use
_
more'
]))
{
return
$this
->
get_option
(
'use_more'
);
}
return
FALSE
;
...
...
@@ -373,7 +373,7 @@ function use_group_by() {
* Should the enabled display more link be shown when no more items?
*/
function
use_more_always
()
{
if
(
!
empty
(
$this
->
definition
[
'use
more'
]))
{
if
(
!
empty
(
$this
->
definition
[
'use
_
more'
]))
{
return
$this
->
get_option
(
'use_more_always'
);
}
return
FALSE
;
...
...
@@ -383,7 +383,7 @@ function use_more_always() {
* Does the display have custom link text?
*/
function
use_more_text
()
{
if
(
!
empty
(
$this
->
definition
[
'use
more'
]))
{
if
(
!
empty
(
$this
->
definition
[
'use
_
more'
]))
{
return
$this
->
get_option
(
'use_more_text'
);
}
return
FALSE
;
...
...
@@ -458,7 +458,7 @@ function defaultable_sections($section = NULL) {
);
// If the display cannot use a pager, then we cannot default it.
if
(
empty
(
$this
->
definition
[
'use
pager'
]))
{
if
(
empty
(
$this
->
definition
[
'use
_
pager'
]))
{
unset
(
$sections
[
'pager'
]);
unset
(
$sections
[
'items_per_page'
]);
}
...
...
@@ -713,7 +713,7 @@ function option_definition() {
),
);
if
(
empty
(
$this
->
definition
[
'use
pager'
]))
{
if
(
empty
(
$this
->
definition
[
'use
_
pager'
]))
{
$options
[
'defaults'
][
'default'
][
'use_pager'
]
=
FALSE
;
$options
[
'defaults'
][
'default'
][
'items_per_page'
]
=
FALSE
;
$options
[
'defaults'
][
'default'
][
'offset'
]
=
FALSE
;
...
...
@@ -1231,7 +1231,7 @@ function options_summary(&$categories, &$options) {
$options
[
'row_plugin'
][
'links'
][
'row_options'
]
=
t
(
'Change settings for this style'
);
}
}
if
(
!
empty
(
$this
->
definition
[
'use
ajax'
]))
{
if
(
!
empty
(
$this
->
definition
[
'use
_
ajax'
]))
{
$options
[
'use_ajax'
]
=
array
(
'category'
=>
'other'
,
'title'
=>
t
(
'Use AJAX'
),
...
...
@@ -1273,7 +1273,7 @@ function options_summary(&$categories, &$options) {
);
// If pagers aren't allowed, change the text of the item:
if
(
empty
(
$this
->
definition
[
'use
pager'
]))
{
if
(
empty
(
$this
->
definition
[
'use
_
pager'
]))
{
$options
[
'pager'
][
'title'
]
=
t
(
'Items to display'
);
}
...
...
@@ -1281,7 +1281,7 @@ function options_summary(&$categories, &$options) {
$options
[
'pager'
][
'links'
][
'pager_options'
]
=
t
(
'Change settings for this pager type.'
);
}
if
(
!
empty
(
$this
->
definition
[
'use
more'
]))
{
if
(
!
empty
(
$this
->
definition
[
'use
_
more'
]))
{
$options
[
'use_more'
]
=
array
(
'category'
=>
'pager'
,
'title'
=>
t
(
'More link'
),
...
...
@@ -2168,7 +2168,7 @@ function options_form(&$form, &$form_state) {
$pager
=
$this
->
get_option
(
'pager'
);
$form
[
'pager'
][
'type'
]
=
array
(
'#type'
=>
'radios'
,
'#options'
=>
views_fetch_plugin_names
(
'pager'
,
empty
(
$this
->
definition
[
'use
pager'
])
?
'basic'
:
NULL
,
array
(
$this
->
view
->
base_table
)),
'#options'
=>
views_fetch_plugin_names
(
'pager'
,
empty
(
$this
->
definition
[
'use
_
pager'
])
?
'basic'
:
NULL
,
array
(
$this
->
view
->
base_table
)),
'#default_value'
=>
$pager
[
'type'
],
);
...
...
lib/Drupal/views/Plugin/views/filter/BooleanOperator.php
View file @
90dba138
...
...
@@ -20,7 +20,7 @@
* - on-off: On/Off
* - enabled-disabled: Enabled/Disabled
* - accept null: Treat a NULL value as false.
* - use
equal: If you use this flag the query will use = 1 instead of <> 0.
* - use
_
equal: If you use this flag the query will use = 1 instead of <> 0.
* This might be helpful for performance reasons.
*
* @ingroup views_filter_handlers
...
...
@@ -176,7 +176,7 @@ function query() {
}
}
else
{
if
(
!
empty
(
$this
->
definition
[
'use
equal'
]))
{
if
(
!
empty
(
$this
->
definition
[
'use
_
equal'
]))
{
$this
->
query
->
add_where
(
$this
->
options
[
'group'
],
$field
,
1
,
'='
);
}
else
{
...
...
modules/node.views.inc
View file @
90dba138
...
...
@@ -159,7 +159,7 @@ function node_views_data() {
'id'
=>
'boolean'
,
'label'
=>
t
(
'Published'
),
'type'
=>
'yes-no'
,
'use
equal'
=>
TRUE
,
// Use status = 1 instead of status <> 0 in WHERE statment
'use
_
equal'
=>
TRUE
,
// Use status = 1 instead of status <> 0 in WHERE statment
),
'sort'
=>
array
(
'id'
=>
'standard'
,
...
...
views.api.php
View file @
90dba138
...
...
@@ -261,8 +261,8 @@
* 'help' => t('Display the view as a feed, such as an RSS feed.'),
* 'handler' => 'views_plugin_display_feed',
* 'uses_hook_menu' => TRUE,
* 'use
ajax' => FALSE,
* 'use
pager' => FALSE,
* 'use
_
ajax' => FALSE,
* 'use
_
pager' => FALSE,
* 'accept_attachments' => FALSE,
* 'admin' => t('Feed'),
* 'help topic' => 'display-feed',
...
...
@@ -429,7 +429,7 @@ function hook_views_data() {
// This setting is used by the boolean filter handler, as possible option.
'type'
=>
'yes-no'
,
// use boolean_field = 1 instead of boolean_field <> 0 in WHERE statment.
'use
equal'
=>
TRUE
,
'use
_
equal'
=>
TRUE
,
),
'sort'
=>
array
(
'id'
=>
'standard'
,
...
...
@@ -556,10 +556,10 @@ function hook_views_data_alter(&$data) {
* t().
* - no remove: Set to TRUE to make the display non-removable. (Basically
* only used for the master/default display.)
* - use
ajax: Set to TRUE to allow AJAX loads in the display. If it's
* - use
_
ajax: Set to TRUE to allow AJAX loads in the display. If it's
* disabled there will be no ajax option in the ui.
* - use
pager: Set to TRUE to allow paging in the display.
* - use
more: Set to TRUE to allow the 'use
more' setting in the display.
* - use
_
pager: Set to TRUE to allow paging in the display.
* - use
_
more: Set to TRUE to allow the 'use
_
more' setting in the display.
* - accept_attachments: Set to TRUE to allow attachment displays to be
* attached to this display type.
* - contextual_links_locations: An array with places where contextual links
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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