Skip to content

Commit

Permalink
Base path.
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmorris committed Jan 17, 2024
1 parent ad20df8 commit bda1038
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docs-source/app/assets/scripts/drupal.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
$itemPath = preg_replace('/^\\/drupal-7.95/', '', $itemPath);
$itemPath = preg_replace('/^\//', '', $itemPath);

$GLOBALS['base_path'] = '/php-wasm' . $docroot . '/';

$_GET['q'] = $itemPath;

menu_execute_active_handler();
Expand Down
8 changes: 4 additions & 4 deletions docs-source/app/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,6 @@ $path = preg_replace('/^\\/drupal-7.95/', '', $path);
$path = preg_replace('/^\\//', '', $path);
$path = $path ?: "node";
$_GET['q'] = $path;
$GLOBALS['base_path'] = '/php-wasm' . $docroot . '/';
$_SERVER['SERVER_SOFTWARE'] = ${JSON.stringify(navigator.userAgent)};
$_SERVER['REQUEST_URI'] = $docroot . $path;
$_SERVER['QUERY_STRING'] = $request->_GET;
Expand Down Expand Up @@ -338,6 +334,10 @@ if(!$_COOKIE || !$_COOKIE[$session_name])
fwrite($stdErr, json_encode(['PATH' => $path, "ORIGINAL" => $request->path]) . PHP_EOL);
$GLOBALS['base_path'] = '/php-wasm' . $docroot . '/';
$_GET['q'] = $itemPath;
menu_execute_active_handler();
fwrite($stdErr, json_encode(['HEADERS' =>headers_list()]) . "\n");
Expand Down
2 changes: 1 addition & 1 deletion docs/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/scripts/drupal.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
$itemPath = preg_replace('/^\\/drupal-7.95/', '', $itemPath);
$itemPath = preg_replace('/^\//', '', $itemPath);

$GLOBALS['base_path'] = '/php-wasm' . $docroot . '/';

$_GET['q'] = $itemPath;

menu_execute_active_handler();
Expand Down

0 comments on commit bda1038

Please sign in to comment.