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/sites/all/modules/readmorecontrol/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /inetpub/wwwroot/business/sites/all/modules/readmorecontrol/readmorecontrol.install
<?php

/**
 * @file
 * Standand installation functions.
 */

/**
 * Implements hook_uninstall().
 */
function readmorecontrol_uninstall() {
  db_delete('variable')
    ->condition('name', db_like('readmorecontrol_format__') . '%', 'LIKE')
    ->execute();
  db_delete('variable')
    ->condition('name', db_like('readmorecontrol_behaviour__') . '%', 'LIKE')
    ->execute();

  variable_del('readmorecontrol_disabled_view_modes');
  variable_del('readmodecontrol_external_view_modes');

  // Now delete the readmore_behaviour values from node field instances.

  /*
  $node_bundles = field_info_instances('node');
  foreach ($node_bundles as $bundle => $bundle_instances) {
    foreach ($bundle_instances as $field_name => $instance) {
      if (isset($instance['readmore_behaviour'])) {
        unset($instance['readmore_behaviour']);
        field_update_instance($instance);
      }
    }
  }
  */
}

/**
 * Update naming of internal variable 'node_readmorecontrol_%'.
 */
function readmorecontrol_update_7000() {
  foreach (node_type_get_types() as $key => $type) {
    // Only update if it is set so that the defaults still work.
    if ($value = variable_get('node_readmorecontrol_' . $key, FALSE)) {
      variable_set('readmorecontrol_node_' . $key, $value);
      variable_del('node_readmorecontrol_' . $key);
    }
  }
}

/**
 * Update node instance settings if required.
 */
function readmorecontrol_update_7001() {
  $node_bundles = field_info_instances('node');
  foreach ($node_bundles as $bundle => $bundle_instances) {
    foreach ($bundle_instances as $field_name => $instance) {
      if (isset($instance['readmorecontrol_ignore'])) {
        $instance['readmore_behaviour'] = $instance['readmorecontrol_ignore'] ? 'ignore' : 'process';
        unset($instance['readmorecontrol_ignore']);
        field_update_instance($instance);
      }
    }
  }
}

/**
 * Refreshes the menu and updates internal settings to support multiple
 * entities and view modes.
 */
function readmorecontrol_update_7002() {
  if ($value = variable_get('readmorecontrol_default_node_behaviour', FALSE)) {
    variable_set('readmorecontrol_behaviour__node', $value);
    variable_del('readmorecontrol_default_node_behaviour');
  }
  foreach (node_type_get_types() as $key => $type) {
    // Only update if it is set so that the defaults still work.
    if ($value = variable_get('readmorecontrol_node_' . $key, FALSE)) {
      variable_set('readmorecontrol_behaviour__node__' . $key, $value);
      variable_del('readmorecontrol_node_' . $key);
    }
  }
  variable_set('menu_rebuild_needed', TRUE);
  return t('Menu links are queued to be rebuilt.');
}

Youez - 2016 - github.com/yon3zu
LinuXploit