| @@ 1760-1767 (lines=8) @@ | ||
| 1757 | // Only change something if mod_security hasn't been addressed yet. |
|
| 1758 | if (strpos($current_htaccess, '<IfModule mod_security.c>') === false) |
|
| 1759 | { |
|
| 1760 | if ($ht_handle = fopen(dirname(__FILE__) . '/.htaccess', 'a')) |
|
| 1761 | { |
|
| 1762 | fwrite($ht_handle, $htaccess_addition); |
|
| 1763 | fclose($ht_handle); |
|
| 1764 | return true; |
|
| 1765 | } |
|
| 1766 | else |
|
| 1767 | return false; |
|
| 1768 | } |
|
| 1769 | else |
|
| 1770 | return true; |
|
| @@ 1776-1783 (lines=8) @@ | ||
| 1773 | return strpos(implode('', file(dirname(__FILE__) . '/.htaccess')), '<IfModule mod_security.c>') !== false; |
|
| 1774 | elseif (is_writable(dirname(__FILE__))) |
|
| 1775 | { |
|
| 1776 | if ($ht_handle = fopen(dirname(__FILE__) . '/.htaccess', 'w')) |
|
| 1777 | { |
|
| 1778 | fwrite($ht_handle, $htaccess_addition); |
|
| 1779 | fclose($ht_handle); |
|
| 1780 | return true; |
|
| 1781 | } |
|
| 1782 | else |
|
| 1783 | return false; |
|
| 1784 | } |
|
| 1785 | else |
|
| 1786 | return false; |
|