| @@ 1865-1872 (lines=8) @@ | ||
| 1862 | // Only change something if mod_security hasn't been addressed yet. |
|
| 1863 | if (strpos($current_htaccess, '<IfModule mod_security.c>') === false) |
|
| 1864 | { |
|
| 1865 | if ($ht_handle = fopen(dirname(__FILE__) . '/.htaccess', 'a')) |
|
| 1866 | { |
|
| 1867 | fwrite($ht_handle, $htaccess_addition); |
|
| 1868 | fclose($ht_handle); |
|
| 1869 | return true; |
|
| 1870 | } |
|
| 1871 | else |
|
| 1872 | return false; |
|
| 1873 | } |
|
| 1874 | else |
|
| 1875 | return true; |
|
| @@ 1881-1888 (lines=8) @@ | ||
| 1878 | return strpos(implode('', file(dirname(__FILE__) . '/.htaccess')), '<IfModule mod_security.c>') !== false; |
|
| 1879 | elseif (is_writable(dirname(__FILE__))) |
|
| 1880 | { |
|
| 1881 | if ($ht_handle = fopen(dirname(__FILE__) . '/.htaccess', 'w')) |
|
| 1882 | { |
|
| 1883 | fwrite($ht_handle, $htaccess_addition); |
|
| 1884 | fclose($ht_handle); |
|
| 1885 | return true; |
|
| 1886 | } |
|
| 1887 | else |
|
| 1888 | return false; |
|
| 1889 | } |
|
| 1890 | else |
|
| 1891 | return false; |
|