From 97ad331b1837b2f3bc17ba58bd54b5bfbe11114a Mon Sep 17 00:00:00 2001 From: Nigel Osborne Date: Fri, 27 Aug 2010 00:23:40 +0000 Subject: Changed htaccess code from pGV to WT references --- editconfig_gedcom.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'editconfig_gedcom.php') 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"; @@ -318,7 +318,7 @@ case 'update': $httext .= "\n\tRewriteRule .* ".WT_SCRIPT_PATH."mediafirewall.php"." [L]"; $httext .= "\n"; $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); -- cgit v1.3