403Webshell
Server IP : 195.130.67.5  /  Your IP : 216.73.217.154
Web Server : Microsoft-IIS/10.0
System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586
User : IUSR ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /inetpub/wwwroot/business/ttt/views/modules/node/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /inetpub/wwwroot/business/ttt/views/modules/node/views_handler_field_node_revision_link.inc
<?php

/**
 * @file
 * Definition of views_handler_field_node_revision_link.
 */

/**
 * Field handler to present a link to a node revision.
 *
 * @ingroup views_field_handlers
 */
class views_handler_field_node_revision_link extends views_handler_field_node_link {

  /**
   * {@inheritdoc}
   */
  public function construct() {
    parent::construct();
    $this->additional_fields['node_vid'] = array('table' => 'node_revision', 'field' => 'vid');
  }

  /**
   * {@inheritdoc}
   */
  public function access() {
    return user_access('view revisions') || user_access('administer nodes');
  }

  /**
   * {@inheritdoc}
   */
  public function render_link($data, $values) {
    list($node, $vid) = $this->get_revision_entity($values, 'view');
    if (!isset($vid)) {
      return;
    }

    // Current revision uses the node view path.
    $path = 'node/' . $node->nid;
    if ($node->vid != $vid) {
      $path .= "/revisions/$vid/view";
    }

    $this->options['alter']['make_link'] = TRUE;
    $this->options['alter']['path'] = $path;
    $this->options['alter']['query'] = drupal_get_destination();

    return !empty($this->options['text']) ? $this->options['text'] : t('view');
  }

  /**
   * Returns the revision values of a node.
   *
   * @param object $values
   *   An object containing all retrieved values.
   * @param string $op
   *   The operation being performed.
   *
   * @return array
   *   A numerically indexed array containing the current node object and the
   *   revision ID for this row.
   */
  public function get_revision_entity($values, $op) {
    $vid = $this->get_value($values, 'node_vid');
    $node = $this->get_value($values);
    // Unpublished nodes ignore access control.
    $node->status = 1;
    // Ensure user has access to perform the operation on this node.
    if (!node_access($op, $node)) {
      return array($node, NULL);
    }
    return array($node, $vid);
  }

}

Youez - 2016 - github.com/yon3zu
LinuXploit