Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
79629a5f
Commit
79629a5f
authored
Aug 27, 2012
by
dawehner
Committed by
tim.plunkett
Oct 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of more CTools export code.
parent
e4abe393
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
49 deletions
+0
-49
views.install
views.install
+0
-7
views.module
views.module
+0
-42
No files found.
views.install
View file @
79629a5f
...
@@ -34,22 +34,15 @@ function views_schema() {
...
@@ -34,22 +34,15 @@ function views_schema() {
'current_version'
=>
'3.0'
,
'current_version'
=>
'3.0'
,
),
),
'object'
=>
'Drupal\views\View'
,
'object'
=>
'Drupal\views\View'
,
// the callback to load the displays
'load all callback'
=>
'views_get_all_views'
,
'load all callback'
=>
'views_get_all_views'
,
'load callback'
=>
'views_storage_load'
,
'load callback'
=>
'views_storage_load'
,
'save callback'
=>
'views_storage_save'
,
'save callback'
=>
'views_storage_save'
,
'status callback'
=>
'views_storage_status'
,
'status callback'
=>
'views_storage_status'
,
'subrecords callback'
=>
'views_load_display_records'
,
// the variable that holds enabled/disabled status
'status'
=>
'views_defaults'
,
// CRUD callbacks
// CRUD callbacks
'create callback'
=>
'views_new_view'
,
'create callback'
=>
'views_new_view'
,
'save callback'
=>
'views_save_view'
,
'save callback'
=>
'views_save_view'
,
'delete callback'
=>
'views_delete_view'
,
'delete callback'
=>
'views_delete_view'
,
'export callback'
=>
'views_export_view'
,
'export callback'
=>
'views_export_view'
,
'status callback'
=>
'views_export_status'
,
'cache defaults'
=>
TRUE
,
'default cache bin'
=>
'cache_views'
,
),
),
'fields'
=>
array
(
'fields'
=>
array
(
'vid'
=>
array
(
'vid'
=>
array
(
...
...
views.module
View file @
79629a5f
...
@@ -1766,48 +1766,6 @@ function views_move_table($table) {
...
@@ -1766,48 +1766,6 @@ function views_move_table($table) {
return
$table
;
return
$table
;
}
}
/**
* Export callback to load the view subrecords, which are the displays.
*/
function
views_load_display_records
(
&
$views
)
{
// Get vids from the views.
$names
=
array
();
foreach
(
$views
as
$view
)
{
if
(
empty
(
$view
->
display
))
{
$names
[
$view
->
vid
]
=
$view
->
name
;
}
}
if
(
empty
(
$names
))
{
return
;
}
foreach
(
View
::
db_objects
()
as
$key
=>
$object
)
{
$table_name
=
"views_"
.
$key
;
$object_name
=
'Drupal\views\Views'
.
$object
;
$result
=
db_query
(
"SELECT * FROM
{
{$table_name}
}
WHERE vid IN (:vids) ORDER BY vid, position"
,
array
(
':vids'
=>
array_keys
(
$names
)));
foreach
(
$result
as
$data
)
{
$object
=
new
$object_name
(
FALSE
);
$object
->
load_row
(
$data
);
// Because it can get complicated with this much indirection,
// make a shortcut reference.
$location
=
&
$views
[
$names
[
$object
->
vid
]]
->
$key
;
// If we have a basic id field, load the item onto the view based on
// this ID, otherwise push it on.
if
(
!
empty
(
$object
->
id
))
{
$location
[
$object
->
id
]
=
$object
;
}
else
{
$location
[]
=
$object
;
}
}
}
}
/**
/**
* Export CRUD callback to save a view.
* Export CRUD callback to save a view.
*/
*/
...
...
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