fixed securetemps

This commit is contained in:
Palma Solutions LTD
2017-05-12 08:34:16 +02:00
parent afa26c7960
commit 04960308dc

18
sc.php
View File

@@ -191,25 +191,13 @@ Order Deny,Allow
Deny from all
</FilesMatch>
';
if (file_exists("wp-content"))
{
if (file_exists("wp-content/uploads"))
{
if (is_dir("wp-content/uploads"))
{
if (file_exists("wp-content/uploads/.htaccess"))
{
echo "file exists - skipping\n"
else
$hta = fopen("wp-content/uploads/.htaccess", "w");
foreach(glob("./*/wp-content/uploads/") as $dirname)
{
$hta = fopen($dirname."/.htaccess", "w");
fwrite($hta, $htdata);
fclose($hta);
}
}
}
}
// system("for i in `find ../ -type d -path '*/wp-content/uploads';`; do echo $i && echo -e '".$htdata."' >> \$i/.htaccess; done");
// system("for i in `find ../ -type d -path '*/tmp'`; do echo $i && echo -e '".$htdata."' >> \$i/.htaccess; done");