/[drupal]/contributions/modules/robotstxt/robotstxt.install
ViewVC logotype

Diff of /contributions/modules/robotstxt/robotstxt.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.4.5, Sat Mar 7 10:49:20 2009 UTC revision 1.1.4.6, Thu Mar 19 08:20:45 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  /* $Id: robotstxt.install,v 1.1.4.4 2009/01/03 17:20:34 hass Exp $ */  /* $Id: robotstxt.install,v 1.1.4.5 2009/03/07 10:49:20 hass Exp $ */
3    
4  /**  /**
5   * Implementation of hook_install().   * Implementation of hook_install().
# Line 29  function robotstxt_requirements($phase) Line 29  function robotstxt_requirements($phase)
29    
30    switch ($phase) {    switch ($phase) {
31      case 'install' :      case 'install' :
     case 'runtime' :  
32        // Module cannot work without Clean URLs.        // Module cannot work without Clean URLs.
33        if (!variable_get('clean_url', 0)) {        if (!variable_get('clean_url', 0)) {
34          $requirements['robotstxt_cleanurl'] = array(          $requirements['robotstxt_cleanurl'] = array(
# Line 38  function robotstxt_requirements($phase) Line 37  function robotstxt_requirements($phase)
37            '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'))),
38          );          );
39        }        }
40          break;
41    
42        case 'runtime' :
43        // 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.
44        if (file_exists('./robots.txt')) {        if (file_exists('./robots.txt')) {
45          $requirements['robotstxt_file'] = array(          $requirements['robotstxt_file'] = array(
# Line 47  function robotstxt_requirements($phase) Line 48  function robotstxt_requirements($phase)
48            '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.'),
49          );          );
50        }        }
51          break;
52    }    }
53    return $requirements;    return $requirements;
54  }  }

Legend:
Removed from v.1.1.4.5  
changed lines
  Added in v.1.1.4.6

  ViewVC Help
Powered by ViewVC 1.1.2