| @@ 1784-1791 (lines=8) @@ | ||
| 1781 | // Only change something if mod_security hasn't been addressed yet. |
|
| 1782 | if (strpos($current_htaccess, '<IfModule mod_security.c>') === false) |
|
| 1783 | { |
|
| 1784 | if ($ht_handle = fopen(dirname(__FILE__) . '/.htaccess', 'a')) |
|
| 1785 | { |
|
| 1786 | fwrite($ht_handle, $htaccess_addition); |
|
| 1787 | fclose($ht_handle); |
|
| 1788 | return true; |
|
| 1789 | } |
|
| 1790 | else |
|
| 1791 | return false; |
|
| 1792 | } |
|
| 1793 | else |
|
| 1794 | return true; |
|
| @@ 1800-1807 (lines=8) @@ | ||
| 1797 | return strpos(implode('', file(dirname(__FILE__) . '/.htaccess')), '<IfModule mod_security.c>') !== false; |
|
| 1798 | elseif (is_writable(dirname(__FILE__))) |
|
| 1799 | { |
|
| 1800 | if ($ht_handle = fopen(dirname(__FILE__) . '/.htaccess', 'w')) |
|
| 1801 | { |
|
| 1802 | fwrite($ht_handle, $htaccess_addition); |
|
| 1803 | fclose($ht_handle); |
|
| 1804 | return true; |
|
| 1805 | } |
|
| 1806 | else |
|
| 1807 | return false; |
|
| 1808 | } |
|
| 1809 | else |
|
| 1810 | return false; |
|