Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
306
Merge Requests
306
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
93cbe5c4
Commit
93cbe5c4
authored
Aug 28, 2012
by
tim.plunkett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove legacy code for default Views and exportables.
parent
f4805c6b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
51 deletions
+0
-51
lib/Drupal/views/Tests/ModuleTest.php
lib/Drupal/views/Tests/ModuleTest.php
+0
-4
lib/Drupal/views/Tests/ViewsSqlTest.php
lib/Drupal/views/Tests/ViewsSqlTest.php
+0
-1
views.install
views.install
+0
-7
views.module
views.module
+0
-39
No files found.
lib/Drupal/views/Tests/ModuleTest.php
View file @
93cbe5c4
...
...
@@ -92,10 +92,6 @@ public function test_views_trim_text() {
* Tests the dynamic includes of templates via module feature.
*/
function
testModuleTemplates
()
{
$views_status
=
variable_get
(
'views_defaults'
,
array
());
$views_status
[
'frontpage'
]
=
FALSE
;
// false is enabled
variable_set
(
'views_defaults'
,
$views_status
);
$existing
=
array
();
$type
=
array
();
$theme
=
array
();
...
...
lib/Drupal/views/Tests/ViewsSqlTest.php
View file @
93cbe5c4
...
...
@@ -25,7 +25,6 @@ protected function setUp() {
// @todo Remove this hack or move it to child classes.
views_init
();
views_module_include
(
'views_default'
,
TRUE
);
views_get_all_views
(
TRUE
);
menu_router_rebuild
();
}
...
...
views.install
View file @
93cbe5c4
...
...
@@ -24,15 +24,8 @@ function views_schema() {
'identifier'
=>
'view'
,
'bulk export'
=>
TRUE
,
'primary key'
=>
'vid'
,
'default hook'
=>
'views_default_views'
,
'admin_title'
=>
'human_name'
,
'admin_description'
=>
'description'
,
'api'
=>
array
(
'owner'
=>
'views'
,
'api'
=>
'views_default'
,
'minimum_version'
=>
'2'
,
'current_version'
=>
'3.0'
,
),
'object'
=>
'Drupal\views\View'
,
'load all callback'
=>
'views_get_all_views'
,
'load callback'
=>
'views_storage_load'
,
...
...
views.module
View file @
93cbe5c4
...
...
@@ -2374,45 +2374,6 @@ function views_clean_css_identifier($identifier, $filter = array(' ' => '-', '/'
return
$identifier
;
}
/**
* Implement hook_views_exportables().
*/
function
views_views_exportables
(
$op
=
'list'
,
$views
=
NULL
,
$name
=
'foo'
)
{
$all_views
=
views_get_all_views
();
if
(
$op
==
'list'
)
{
foreach
(
$all_views
as
$name
=>
$view
)
{
// in list, $views is a list of tags.
if
(
empty
(
$views
)
||
in_array
(
$view
->
tag
,
$views
))
{
$return
[
$name
]
=
array
(
'name'
=>
check_plain
(
$name
),
'desc'
=>
check_plain
(
$view
->
description
),
'tag'
=>
check_plain
(
$view
->
tag
)
);
}
}
return
$return
;
}
if
(
$op
==
'export'
)
{
$code
=
"/**
\n
"
;
$code
.
=
" * Implement hook_views_default_views().
\n
"
;
$code
.
=
" */
\n
"
;
$code
.
=
"function "
.
$name
.
"_views_default_views() {\n"
;
foreach
(
$views
as
$view
=>
$truth
)
{
$code
.
=
" /*
\n
"
;
$code
.
=
" * View "
.
var_export
(
$all_views
[
$view
]
->
name
,
TRUE
)
.
"
\n
"
;
$code
.
=
" */
\n
"
;
$code
.
=
$all_views
[
$view
]
->
export
(
' '
);
$code
.
=
' $views[$view->name] = $view;'
.
"
\n\n
"
;
}
$code
.
=
" return
\$
views;
\n
"
;
$code
.
=
"}
\n
"
;
return
$code
;
}
}
/**
* #process callback to see if we need to check_plain() the options.
*
...
...
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