Based on changes made recently #2833586: Allow for searching by title, it should be safe to remove all references to page_status and page_title in the following code (src/panels_pane_report.class.inc lines 142-167):


      // If entity exists but is not referenced anywhere, mark it.
      $is_mini_panel = $panel->storage_type == 'panels_mini';
      if (!isset($panel->storage_id) || $is_mini_panel && !isset($config['nid'])) {
        $panel->storage_id = self::NODE_UNREFERENCED;
        $page_status = NODE_NOT_PUBLISHED;
        $page_title = '';
      }
      elseif ($is_mini_panel) {
       $result = db_query('SELECT status, title FROM {node} WHERE nid = :nid', array(':nid' => $config['nid']), array('target' => 'slave'))->fetchAssoc();
       $page_status = $result['status'];
       $page_title = $result['title'];
      }
      else {
        $result = db_query('SELECT status, title FROM {node} WHERE nid = :nid', array(':nid' => $panel->storage_id), array('target' => 'slave'))->fetchAssoc();
        $page_status = $result['status'];
        $page_title = $result['title'];
      }

      // Add instance to map.
      $pane_mapping[$storage_key]['instances'][] = array(
        'panel' => $panel,
        'build_mode' => isset($config['build_mode']) ? $config['build_mode'] : '',
        'style_mode' => isset($style['style']) ? $style['style'] : '',
        'page_status' => $page_status,
        'page_title' => $page_title,
      );

Comments

WidgetsBurritos created an issue. See original summary.

WidgetsBurritos’s picture

Assigned: Unassigned » pobster
Status: Active » Needs review
StatusFileSize
new2.26 KB

This is a little bit of cleanup related to the changes made in #2833586: Allow for searching by title. Since the `page_status` and `page_title` values are not ever used, we can just scrap several lines of code.

pobtastic’s picture

Status: Needs review » Reviewed & tested by the community

+1

  • WidgetsBurritos committed 72f909f on 7.x-1.x
    Issue #2842476: Remove unneeded page_status and page_title code
    
WidgetsBurritos’s picture

Status: Reviewed & tested by the community » Fixed
WidgetsBurritos’s picture

Status: Fixed » Closed (fixed)