| 29 |
|
|
| 30 |
switch ($phase) { |
switch ($phase) { |
| 31 |
case 'install' : |
case 'install' : |
| 32 |
|
case 'runtime' : |
| 33 |
// Module cannot work without Clean URLs. |
// Module cannot work without Clean URLs. |
| 34 |
if (!variable_get('clean_url', 0)) { |
if (!variable_get('clean_url', 0)) { |
| 35 |
$requirements['robotstxt_cleanurl'] = array( |
$requirements['robotstxt_cleanurl'] = array( |
| 38 |
'value' => $t('<a href="!clean_url">Clean URLs</a> are mandatory for this module.', array('!clean_url' => url('admin/settings/clean-urls'))), |
'value' => $t('<a href="!clean_url">Clean URLs</a> are mandatory for this module.', array('!clean_url' => url('admin/settings/clean-urls'))), |
| 39 |
); |
); |
| 40 |
} |
} |
|
break; |
|
| 41 |
|
|
|
case 'runtime' : |
|
| 42 |
// Webservers prefer the robots.txt file on disk and does not allow menu path overwrite. |
// Webservers prefer the robots.txt file on disk and does not allow menu path overwrite. |
| 43 |
if (file_exists('./robots.txt')) { |
if (file_exists('./robots.txt')) { |
| 44 |
$requirements['robotstxt_file'] = array( |
$requirements['robotstxt_file'] = array( |
| 47 |
'value' => $t('RobotsTxt module works only if you remove the existing robots.txt file in your website root.'), |
'value' => $t('RobotsTxt module works only if you remove the existing robots.txt file in your website root.'), |
| 48 |
); |
); |
| 49 |
} |
} |
|
break; |
|
| 50 |
} |
} |
| 51 |
return $requirements; |
return $requirements; |
| 52 |
} |
} |