Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
844684fc
Commit
844684fc
authored
Sep 05, 2012
by
mcramer
Browse files
Some newlines removed from htaccess
parent
7d91e319
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/plugins-available/apache2_plugin.inc.php
View file @
844684fc
...
...
@@ -1745,8 +1745,8 @@ class apache2_plugin {
//* Create the .htaccess file
//if(!is_file($folder_path.'.htaccess')) {
$begin_marker
=
'### ISPConfig folder protection begin ###'
;
$end_marker
=
'
### ISPConfig folder protection end ###
'
;
$ht_file
=
$begin_marker
.
"
\n
AuthType Basic
\n
AuthName
\"
Members Only
\"\n
AuthUserFile "
.
$folder_path
.
".htpasswd
\n
require valid-user
\n
"
.
$end_marker
.
"
\n\n
"
;
$end_marker
=
"
### ISPConfig folder protection end ###
\n\n
"
;
$ht_file
=
$begin_marker
.
"
\n
AuthType Basic
\n
AuthName
\"
Members Only
\"\n
AuthUserFile "
.
$folder_path
.
".htpasswd
\n
require valid-user
\n
"
.
$end_marker
;
if
(
file_exists
(
$folder_path
.
'.htaccess'
))
{
$old_content
=
$app
->
system
->
file_get_contents
(
$folder_path
.
'.htaccess'
);
...
...
@@ -1806,7 +1806,7 @@ class apache2_plugin {
//* Remove .htaccess file
if
(
is_file
(
$folder_path
.
'.htaccess'
))
{
$begin_marker
=
'### ISPConfig folder protection begin ###'
;
$end_marker
=
'
### ISPConfig folder protection end ###
'
;
$end_marker
=
"
### ISPConfig folder protection end ###
\n\n
"
;
$ht_file
=
$app
->
system
->
file_get_contents
(
$folder_path
.
'.htaccess'
);
...
...
@@ -1873,7 +1873,7 @@ class apache2_plugin {
if
(
!
is_dir
(
$new_folder_path
))
$app
->
system
->
mkdirpath
(
$new_folder_path
);
$begin_marker
=
'### ISPConfig folder protection begin ###'
;
$end_marker
=
'
### ISPConfig folder protection end ###
'
;
$end_marker
=
"
### ISPConfig folder protection end ###
\n\n
"
;
if
(
$data
[
'old'
][
'path'
]
!=
$data
[
'new'
][
'path'
])
{
...
...
@@ -1905,7 +1905,7 @@ class apache2_plugin {
//* Create the .htaccess file
if
(
$data
[
'new'
][
'active'
]
==
'y'
)
{
$ht_file
=
$begin_marker
.
"
\n
AuthType Basic
\n
AuthName
\"
Members Only
\"\n
AuthUserFile "
.
$new_folder_path
.
".htpasswd
\n
require valid-user
\n
"
.
$end_marker
.
"
\n\n
"
;
$ht_file
=
$begin_marker
.
"
\n
AuthType Basic
\n
AuthName
\"
Members Only
\"\n
AuthUserFile "
.
$new_folder_path
.
".htpasswd
\n
require valid-user
\n
"
.
$end_marker
;
if
(
file_exists
(
$new_folder_path
.
'.htaccess'
))
{
$old_content
=
$app
->
system
->
file_get_contents
(
$new_folder_path
.
'.htaccess'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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