| 1 |
<?php |
<?php |
| 2 |
// $Id: robotstxt.install,v 1.1.6.5 2009/01/03 17:18:57 hass Exp $ |
// $Id: robotstxt.install,v 1.2 2009/02/21 09:04:34 hass Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_install(). |
* Implementation of hook_install(). |
| 6 |
*/ |
*/ |
| 7 |
function robotstxt_install() { |
function robotstxt_install() { |
| 8 |
if (file_exists('./robots.txt')) { |
if (file_exists('./robots.txt')) { |
| 9 |
variable_set('robotstxt', check_plain(file_get_contents('./robots.txt'))); |
variable_set('robotstxt', file_get_contents('./robots.txt')); |
| 10 |
} |
} |
| 11 |
elseif (file_exists(drupal_get_path('module', 'robotstxt') .'/robots.txt')) { |
elseif (file_exists(drupal_get_path('module', 'robotstxt') .'/robots.txt')) { |
| 12 |
variable_set('robotstxt', check_plain(file_get_contents(drupal_get_path('module', 'robotstxt') .'/robots.txt'))); |
variable_set('robotstxt', file_get_contents(drupal_get_path('module', 'robotstxt') .'/robots.txt')); |
| 13 |
} |
} |
| 14 |
} |
} |
| 15 |
|
|