/[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.3, Sat Mar 7 10:50:22 2009 UTC revision 1.4, Sat Mar 7 14:57:07 2009 UTC
# Line 1  Line 1 
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().
# Line 50  function robotstxt_requirements($phase) Line 50  function robotstxt_requirements($phase)
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    }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.2