1 node.install node_update_1018()

Update content admin view to show scheduled publication info.

Related topics

File

core/modules/node/node.install, line 1201
Install, update and uninstall functions for the node module.

Code

function node_update_1018() {
  // See if the content admin view has been modified on this site.
  $config = config('views.view.node_admin_content');

  // Only update if view isn't overridden (VIEWS_STORAGE_OVERRIDE).
  if ($config->get('storage') == 2) {
    return;
  }
  $data = array(
    'name' => 'node_admin_content',
    'description' => 'Administrative listing for managing content.',
    'module' => 'node',
    'storage' => 4,
    'tag' => 'default',
    'disabled' => false,
    'base_table' => 'node',
    'human_name' => 'Administer content',
    'core' => '1.0',
    'display' =>
    array(
      'default' =>
      array(
        'display_title' => 'Default',
        'display_plugin' => 'default',
        'display_options' =>
        array(
          'query' =>
          array(
            'type' => 'views_query',
            'options' =>
            array(
            ),
          ),
          'access' =>
          array(
            'type' => 'perm',
            'perm' => 'access content overview',
          ),
          'cache' =>
          array(
            'type' => 'none',
          ),
          'exposed_form' =>
          array(
            'type' => 'basic',
            'options' =>
            array(
              'submit_button' => 'Filter',
              'reset_button' => 0,
              'reset_button_label' => 'Reset',
              'exposed_sorts_label' => 'Sort by',
              'expose_sort_order' => 1,
              'sort_asc_label' => 'Asc',
              'sort_desc_label' => 'Desc',
              'autosubmit' => 0,
              'autosubmit_hide' => 1,
            ),
          ),
          'pager' =>
          array(
            'type' => 'full',
            'options' =>
            array(
              'items_per_page' => '50',
              'offset' => '0',
              'id' => '0',
              'total_pages' => '',
              'quantity' => '9',
              'tags' =>
              array(
                'first' => '« first',
                'previous' => '‹ previous',
                'next' => 'next ›',
                'last' => 'last »',
              ),
              'expose' =>
              array(
                'items_per_page' => 0,
                'items_per_page_label' => 'Items per page',
                'items_per_page_options' => '5, 10, 20, 40, 60',
                'items_per_page_options_all' => 0,
                'items_per_page_options_all_label' => '- All -',
                'offset' => 0,
                'offset_label' => 'Offset',
              ),
            ),
          ),
          'style_plugin' => 'table',
          'row_plugin' => 'fields',
          'fields' =>
          array(
            'scheduled_1' =>
            array(
              'id' => 'scheduled_1',
              'table' => 'node',
              'field' => 'scheduled',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => 'Scheduled status flag',
              'label' => '',
              'exclude' => 1,
              'alter' =>
              array(
                'alter_text' => 1,
                'text' => 'Not published (Scheduled)',
                'make_link' => 0,
                'path' => '',
                'absolute' => 0,
                'external' => 0,
                'replace_spaces' => 0,
                'path_case' => 'none',
                'trim_whitespace' => 0,
                'alt' => '',
                'rel' => '',
                'link_class' => '',
                'prefix' => '',
                'suffix' => '',
                'target' => '',
                'nl2br' => 0,
                'max_length' => '',
                'word_boundary' => 1,
                'ellipsis' => 1,
                'more_link' => 0,
                'more_link_text' => '',
                'more_link_path' => '',
                'strip_tags' => 0,
                'trim' => 0,
                'preserve_tags' => '',
                'html' => 0,
              ),
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => '',
              'element_label_colon' => false,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 1,
              'empty' => 'Not published',
              'hide_empty' => 0,
              'empty_zero' => 1,
              'hide_alter_empty' => 1,
              'date_format' => 'short',
              'custom_date_format' => '',
              'timezone' => '',
            ),
            'bulk_form' =>
            array(
              'id' => 'bulk_form',
              'table' => 'node',
              'field' => 'bulk_form',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => '',
              'exclude' => 0,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => '',
              'element_label_colon' => false,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'include_exclude' => 'exclude',
              'selected_actions' =>
              array(
              ),
            ),
            'title' =>
            array(
              'id' => 'title',
              'table' => 'node',
              'field' => 'title',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'link_to_node' => 1,
            ),
            'type' =>
            array(
              'id' => 'type',
              'table' => 'node',
              'field' => 'type',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => 'Content type',
              'exclude' => 0,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => 'priority-medium',
              'element_label_colon' => 0,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'link_to_node' => 0,
              'machine_name' => 0,
            ),
            'name' =>
            array(
              'id' => 'name',
              'table' => 'users',
              'field' => 'name',
              'relationship' => 'uid',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => 'Name',
              'exclude' => 0,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => 'priority-low',
              'element_label_colon' => 0,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'link_to_user' => 1,
              'overwrite_anonymous' => 0,
              'anonymous_text' => '',
              'format_username' => 1,
            ),
            'status' =>
            array(
              'id' => 'status',
              'table' => 'node',
              'field' => 'status',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => 'Status',
              'exclude' => 0,
              'alter' =>
              array(
                'alter_text' => 1,
                'text' => 'Published',
                'make_link' => 0,
                'path' => '',
                'absolute' => 0,
                'external' => 0,
                'replace_spaces' => 0,
                'path_case' => 'none',
                'trim_whitespace' => 0,
                'alt' => '',
                'rel' => '',
                'link_class' => '',
                'prefix' => '',
                'suffix' => '',
                'target' => '',
                'nl2br' => 0,
                'max_length' => '',
                'word_boundary' => 1,
                'ellipsis' => 1,
                'more_link' => 0,
                'more_link_text' => '',
                'more_link_path' => '',
                'strip_tags' => 0,
                'trim' => 0,
                'preserve_tags' => '',
                'html' => 0,
              ),
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => '',
              'element_label_colon' => 0,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '[scheduled_1]',
              'hide_empty' => 0,
              'empty_zero' => 1,
              'hide_alter_empty' => 1,
              'type' => 'boolean',
              'type_custom_true' => 'Published',
              'type_custom_false' => '[scheduled]',
              'not' => 0,
            ),
            'scheduled' =>
            array(
              'id' => 'scheduled',
              'table' => 'node',
              'field' => 'scheduled',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => 'Scheduled',
              'exclude' => 0,
              'alter' =>
              array(
                'alter_text' => 0,
                'text' => '',
                'make_link' => 0,
                'path' => '',
                'absolute' => 0,
                'external' => 0,
                'replace_spaces' => 0,
                'path_case' => 'none',
                'trim_whitespace' => 0,
                'alt' => '',
                'rel' => '',
                'link_class' => '',
                'prefix' => '',
                'suffix' => '',
                'target' => '',
                'nl2br' => 0,
                'max_length' => '',
                'word_boundary' => 1,
                'ellipsis' => 1,
                'more_link' => 0,
                'more_link_text' => '',
                'more_link_path' => '',
                'strip_tags' => 0,
                'trim' => 0,
                'preserve_tags' => '',
                'html' => 0,
              ),
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => '',
              'element_label_colon' => 0,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 1,
              'empty' => '',
              'hide_empty' => 1,
              'empty_zero' => 1,
              'hide_alter_empty' => 1,
              'date_format' => 'short',
              'custom_date_format' => '',
              'timezone' => '',
            ),
            'changed' =>
            array(
              'id' => 'changed',
              'table' => 'node',
              'field' => 'changed',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => 'Updated',
              'exclude' => 0,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => 'priority-low',
              'element_label_colon' => 0,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'date_format' => 'short',
              'custom_date_format' => '',
              'timezone' => '',
            ),
            'edit_node' =>
            array(
              'id' => 'edit_node',
              'table' => 'views_entity_node',
              'field' => 'edit_node',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => '',
              'exclude' => 1,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => '',
              'element_label_colon' => false,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'text' => '',
            ),
            'delete_node' =>
            array(
              'id' => 'delete_node',
              'table' => 'views_entity_node',
              'field' => 'delete_node',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => '',
              'exclude' => 1,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => '',
              'element_label_colon' => false,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'text' => '',
            ),
            'dropbutton' =>
            array(
              'id' => 'dropbutton',
              'table' => 'views',
              'field' => 'dropbutton',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => 'Operations',
              'exclude' => 0,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => '',
              'element_label_colon' => 0,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'fields' =>
              array(
                'edit_node' => 'edit_node',
                'delete_node' => 'delete_node',
              ),
              'destination' => 1,
            ),
          ),
          'filters' =>
          array(
            'status' =>
            array(
              'id' => 'status',
              'table' => 'node',
              'field' => 'status',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'operator' => '=',
              'value' => 'All',
              'group' => 1,
              'exposed' => true,
              'expose' =>
              array(
                'operator_id' => '',
                'label' => 'Published',
                'description' => '',
                'use_operator' => false,
                'operator' => 'status_op',
                'identifier' => 'status',
                'required' => 0,
                'remember' => 0,
                'multiple' => false,
                'remember_roles' =>
                array(
                  'anonymous' => 0,
                  'authenticated' => 0,
                  'administrator' => 0,
                ),
              ),
              'is_grouped' => false,
            ),
            'type' =>
            array(
              'id' => 'type',
              'table' => 'node',
              'field' => 'type',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'operator' => 'in',
              'value' =>
              array(
              ),
              'group' => '1',
              'exposed' => true,
              'expose' =>
              array(
                'operator_id' => 'type_op',
                'label' => 'Type',
                'description' => '',
                'use_operator' => 0,
                'operator' => 'type_op',
                'identifier' => 'type',
                'required' => 0,
                'remember' => 0,
                'multiple' => 0,
                'remember_roles' =>
                array(
                  'anonymous' => 0,
                  'authenticated' => 0,
                  'administrator' => 0,
                ),
                'reduce' => 0,
              ),
              'is_grouped' => false,
            ),
            'title' =>
            array(
              'id' => 'title',
              'table' => 'node',
              'field' => 'title',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'operator' => 'word',
              'value' => '',
              'group' => '1',
              'exposed' => true,
              'expose' =>
              array(
                'operator_id' => 'title_op',
                'label' => 'Title contains',
                'description' => '',
                'use_operator' => 0,
                'operator' => 'title_op',
                'identifier' => 'title',
                'required' => 0,
                'remember' => 0,
                'multiple' => false,
                'remember_roles' =>
                array(
                  'anonymous' => 0,
                  'authenticated' => 0,
                  'administrator' => 0,
                ),
              ),
              'is_grouped' => false,
            ),
            'status_extra' =>
            array(
              'id' => 'status_extra',
              'table' => 'node',
              'field' => 'status_extra',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'operator' => '=',
              'value' => '',
              'group' => '1',
              'exposed' => false,
              'is_grouped' => false,
            ),
          ),
          'sorts' =>
          array(
            'changed' =>
            array(
              'id' => 'changed',
              'table' => 'node',
              'field' => 'changed',
              'order' => 'DESC',
            ),
          ),
          'title' => 'Content',
          'relationships' =>
          array(
            'uid' =>
            array(
              'id' => 'uid',
              'table' => 'node',
              'field' => 'uid',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => 'author',
              'required' => 0,
            ),
          ),
          'css_class' => 'node-admin-content',
          'empty' =>
          array(
            'area_text_custom' =>
            array(
              'id' => 'area_text_custom',
              'table' => 'views',
              'field' => 'area_text_custom',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => '',
              'empty' => true,
              'content' => 'No content found.',
              'tokenize' => 0,
            ),
          ),
          'style_options' =>
          array(
            'grouping' =>
            array(
            ),
            'row_class' => '',
            'default_row_class' => 1,
            'row_class_special' => 1,
            'override' => 1,
            'sticky' => 0,
            'caption' => '',
            'summary' => '',
            'columns' =>
            array(
              'scheduled_1' => 'scheduled_1',
              'bulk_form' => 'bulk_form',
              'title' => 'title',
              'type' => 'type',
              'name' => 'name',
              'status' => 'status',
              'scheduled' => 'scheduled',
              'changed' => 'changed',
              'edit_node' => 'edit_node',
              'delete_node' => 'delete_node',
              'dropbutton' => 'dropbutton',
            ),
            'info' =>
            array(
              'scheduled_1' =>
              array(
                'sortable' => 0,
                'default_sort_order' => 'asc',
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'bulk_form' =>
              array(
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'title' =>
              array(
                'sortable' => 1,
                'default_sort_order' => 'asc',
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'type' =>
              array(
                'sortable' => 1,
                'default_sort_order' => 'asc',
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'name' =>
              array(
                'sortable' => 1,
                'default_sort_order' => 'asc',
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'status' =>
              array(
                'sortable' => 1,
                'default_sort_order' => 'asc',
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'scheduled' =>
              array(
                'sortable' => 1,
                'default_sort_order' => 'asc',
                'align' => '',
                'separator' => '',
                'empty_column' => 1,
              ),
              'changed' =>
              array(
                'sortable' => 1,
                'default_sort_order' => 'desc',
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'edit_node' =>
              array(
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'delete_node' =>
              array(
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'dropbutton' =>
              array(
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
            ),
            'default' => 'changed',
            'empty_table' => 1,
          ),
        ),
      ),
      'page' =>
      array(
        'display_title' => 'Page',
        'display_plugin' => 'page',
        'display_options' =>
        array(
          'query' =>
          array(
            'type' => 'views_query',
            'options' =>
            array(
            ),
          ),
          'path' => 'admin/content/node',
          'menu' =>
          array(
            'type' => 'default tab',
            'title' => 'Manage content',
            'description' => '',
            'name' => 'management',
            'weight' => '-1',
            'context' => 0,
            'context_only_inline' => 0,
          ),
          'tab_options' =>
          array(
            'type' => 'normal',
            'title' => 'Content',
            'description' => 'Find and manage content.',
            'name' => 'management',
            'weight' => '-10',
          ),
        ),
      ),
    ),
  );
  $config->setData($data);
  $config->save();
}