Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Projects
Groups
Snippets
Sign up now
Login
Sign in
Toggle navigation
Menu
Open sidebar
project
provision
Commits
13cac820
Commit
13cac820
authored
Sep 06, 2014
by
Grazyna Jaworska
Browse files
Use is_readable() check instead of insufficient file_exists() for config includes.
parent
59e436c4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Provision/Config/Drupal/provision_drupal_settings.tpl.php
View file @
13cac820
...
...
@@ -144,11 +144,11 @@ if (isset($_SERVER['db_name'])) {
<?php
print
$extra_config
;
?>
# Additional host wide configuration settings. Useful for safely specifying configuration settings.
if (
file_exists
('
<?php
print
$this
->
platform
->
server
->
include_path
?>
/global.inc')) {
if (
is_readable
('
<?php
print
$this
->
platform
->
server
->
include_path
?>
/global.inc')) {
include_once('
<?php
print
$this
->
platform
->
server
->
include_path
?>
/global.inc');
}
# Additional site configuration settings.
if (
file_exists
('
<?php
print
$this
->
site_path
?>
/local.settings.php')) {
if (
is_readable
('
<?php
print
$this
->
site_path
?>
/local.settings.php')) {
include_once('
<?php
print
$this
->
site_path
?>
/local.settings.php');
}
http/Provision/Config/Apache/platform.tpl.php
View file @
13cac820
...
...
@@ -8,7 +8,7 @@
<?php
if
(
file_exists
(
"
{
$this
->
root
}
/.htaccess"
))
{
if
(
is_readable
(
"
{
$this
->
root
}
/.htaccess"
))
{
print
"
\n
# Include the platform's htaccess file
\n
"
;
print
"Include
{
$this
->
root
}
/.htaccess
\n
"
;
}
...
...
platform/provision_drupal.drush.inc
View file @
13cac820
...
...
@@ -78,7 +78,7 @@ function provision_drupal_drush_exit() {
* If the file exists, return TRUE, else return FALSE.
*/
function
_provision_drupal_site_exists
()
{
return
file_exists
(
d
()
->
site_path
.
'/settings.php'
);
return
is_readable
(
d
()
->
site_path
.
'/settings.php'
);
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment