forked from unicorn-fail/dreditor.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjs.php
More file actions
27 lines (23 loc) · 768 Bytes
/
js.php
File metadata and controls
27 lines (23 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
* @file
* An optimized page execution used to serve JavaScript AJAX requests using a
* minimally bootstrapped Drupal installation.
*/
/**
* Root directory of Drupal installation.
*/
define('DRUPAL_ROOT', getcwd());
/**
* Required core files needed to run any AJAX request.
*/
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
require_once DRUPAL_ROOT . '/includes/common.inc';
require_once DRUPAL_ROOT . '/includes/module.inc';
require_once DRUPAL_ROOT . '/includes/unicode.inc';
require_once DRUPAL_ROOT . '/includes/file.inc';
// Bootstrap Drupal to at least the database level so it can be accessed.
drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
// Load the JS module and execute request.
drupal_load('module', 'js');
js_execute_request();