| 1 |
<?php |
<?php |
| 2 |
// $Id: robotstxt.install,v 1.2 2009/02/21 09:04:34 hass Exp $ |
// $Id: robotstxt.install,v 1.3 2009/03/07 10:50:22 hass Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_install(). |
* Implementation of hook_install(). |
| 50 |
} |
} |
| 51 |
return $requirements; |
return $requirements; |
| 52 |
} |
} |
| 53 |
|
|
| 54 |
|
/** |
| 55 |
|
* Update changed logout path in robots.txt. |
| 56 |
|
*/ |
| 57 |
|
function robotstxt_update_7000() { |
| 58 |
|
$ret = array(); |
| 59 |
|
|
| 60 |
|
$robotstxt = variable_get('robotstxt'); |
| 61 |
|
$robotstxt = str_replace('Disallow: /logout/', 'Disallow: /user/logout/', $robotstxt); |
| 62 |
|
$robotstxt = str_replace('Disallow: /?q=logout/', 'Disallow: /?q=user/logout/', $robotstxt); |
| 63 |
|
variable_set('robotstxt', $robotstxt); |
| 64 |
|
|
| 65 |
|
$ret[] = array('success' => TRUE, 'query' => 'Logout paths in robots.txt have been updated.'); |
| 66 |
|
|
| 67 |
|
return $ret; |
| 68 |
|
} |