Skip to content
Snippets Groups Projects
Commit 595459b3 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

Issue #1875948 by chx, fabpot: set sensible default values for Kernel default directories.

parent 0113f3d7
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -149,6 +149,39 @@ public function boot() {
}
}
/**
* Overrides Kernel::getRootDir().
*
* It sets the value to the same as DRUPAL_ROOT.
*/
public function getRootDir() {
return DRUPAL_ROOT;
}
/**
* Overrides Kernel::getCacheDir().
*
* It sets a sensible default cache directory for Drupal.
*/
public function getCacheDir() {
if (!is_dir($dir = variable_get('file_public_path', conf_path() . '/files') . '/cache/' . $this->environment)) {
mkdir($dir, 0700, TRUE);
}
return $dir;
}
/**
* Overrides Kernel::getLogDir().
*
* It sets a sensible default log directory for Drupal.
*/
public function getLogDir() {
if (!is_dir($dir = variable_get('file_public_path', conf_path() . '/files') . '/logs/' . $this->environment)) {
mkdir($dir, 0700, TRUE);
}
return $dir;
}
/**
* Returns an array of available bundles.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment