summaryrefslogtreecommitdiff
path: root/editconfig_gedcom.php
diff options
context:
space:
mode:
authorNigel Osborne <kiwi3685@me.com>2010-08-27 00:23:40 +0000
committerNigel Osborne <kiwi3685@me.com>2010-08-27 00:23:40 +0000
commit97ad331b1837b2f3bc17ba58bd54b5bfbe11114a (patch)
tree440fda11153dd0961b721ee1458acd64151d08b9 /editconfig_gedcom.php
parente457e12b558fc0f796fc1a4b0425571b22f44be4 (diff)
downloadwebtrees-97ad331b1837b2f3bc17ba58bd54b5bfbe11114a.tar.gz
webtrees-97ad331b1837b2f3bc17ba58bd54b5bfbe11114a.tar.bz2
webtrees-97ad331b1837b2f3bc17ba58bd54b5bfbe11114a.zip
Changed htaccess code from pGV to WT references
Diffstat (limited to 'editconfig_gedcom.php')
-rw-r--r--editconfig_gedcom.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/editconfig_gedcom.php b/editconfig_gedcom.php
index 0550183d37..98e06253dd 100644
--- a/editconfig_gedcom.php
+++ b/editconfig_gedcom.php
@@ -253,8 +253,8 @@ case 'update':
}
if (!$errors) {
// create the media directory
- // if NEW_MEDIA_FIREWALL_ROOTDIR is the INDEX_DIRECTORY, PGV will have perms to create it
- // if PGV is unable to create the directory, tell the user to create it
+ // if NEW_MEDIA_FIREWALL_ROOTDIR is the INDEX_DIRECTORY, WT will have perms to create it
+ // if WT is unable to create the directory, tell the user to create it
if ($_POST["NEW_USE_MEDIA_FIREWALL"]==true) {
if (!is_dir($NEW_MEDIA_FIREWALL_ROOTDIR.$MEDIA_DIRECTORY)) {
@mkdir($NEW_MEDIA_FIREWALL_ROOTDIR.$MEDIA_DIRECTORY, WT_PERM_EXE);
@@ -301,14 +301,14 @@ case 'update':
$httext = "";
if (file_exists($MEDIA_DIRECTORY.".htaccess")) {
$httext = implode('', file($MEDIA_DIRECTORY.".htaccess"));
- // remove all PGV media firewall sections from the .htaccess
- $httext = preg_replace('/\n?^[#]*\s*BEGIN PGV MEDIA FIREWALL SECTION(.*\n){10}[#]*\s*END PGV MEDIA FIREWALL SECTION\s*[#]*\n?/m', "", $httext);
+ // remove all WT media firewall sections from the .htaccess
+ $httext = preg_replace('/\n?^[#]*\s*BEGIN WT MEDIA FIREWALL SECTION(.*\n){10}[#]*\s*END WT MEDIA FIREWALL SECTION\s*[#]*\n?/m', "", $httext);
// comment out any existing lines that set ErrorDocument 404
$httext = preg_replace('/^(ErrorDocument\s*404(.*))\n?/', "#$1\n", $httext);
$httext = preg_replace('/[^#](ErrorDocument\s*404(.*))\n?/', "\n#$1\n", $httext);
}
- // add new PGV media firewall section to the end of the file
- $httext .= "\n######## BEGIN PGV MEDIA FIREWALL SECTION ##########";
+ // add new WT media firewall section to the end of the file
+ $httext .= "\n######## BEGIN WT MEDIA FIREWALL SECTION ##########";
$httext .= "\n################## DO NOT MODIFY ###################";
$httext .= "\n## THERE MUST BE EXACTLY 11 LINES IN THIS SECTION ##";
$httext .= "\n<IfModule mod_rewrite.c>";
@@ -318,7 +318,7 @@ case 'update':
$httext .= "\n\tRewriteRule .* ".WT_SCRIPT_PATH."mediafirewall.php"." [L]";
$httext .= "\n</IfModule>";
$httext .= "\nErrorDocument\t404\t".WT_SCRIPT_PATH."mediafirewall.php";
- $httext .= "\n########## END PGV MEDIA FIREWALL SECTION ##########";
+ $httext .= "\n########## END WT MEDIA FIREWALL SECTION ##########";
$whichFile = $MEDIA_DIRECTORY.".htaccess";
$fp = @fopen($whichFile, "wb");
@@ -336,8 +336,8 @@ case 'update':
if (file_exists($MEDIA_DIRECTORY.".htaccess")) {
$httext = implode('', file($MEDIA_DIRECTORY.".htaccess"));
- // remove all PGV media firewall sections from the .htaccess
- $httext = preg_replace('/\n?^[#]*\s*BEGIN PGV MEDIA FIREWALL SECTION(.*\n){10}[#]*\s*END PGV MEDIA FIREWALL SECTION\s*[#]*\n?/m', "", $httext);
+ // remove all WT media firewall sections from the .htaccess
+ $httext = preg_replace('/\n?^[#]*\s*BEGIN WT MEDIA FIREWALL SECTION(.*\n){10}[#]*\s*END WT MEDIA FIREWALL SECTION\s*[#]*\n?/m', "", $httext);
// comment out any lines that set ErrorDocument 404
$httext = preg_replace('/^(ErrorDocument\s*404(.*))\n?/', "#$1\n", $httext);
$httext = preg_replace('/[^#](ErrorDocument\s*404(.*))\n?/', "\n#$1\n", $httext);