summaryrefslogtreecommitdiff
path: root/plugins/drupal7/drupal7.module
blob: 0c593cdb25bd1271c118f568533b533c4bcb8f31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php

use Drupal\Core\DrupalKernel;

function drupal7_init($config) {
  define('DRUPAL_ROOT', $config['root_path']);
  $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
  require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
  //require_once DRUPAL_ROOT . '/core/includes/common.inc';
  require_once __DIR__ . '/BridgeDrupal7.php';
  drupal_static('conf_path', "sites/{$config['site']}");
  drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
  return new BridgeDrupal7();
}