/[drupal]/contributions/modules/cvs_deploy/cvs_deploy.module
ViewVC logotype

Diff of /contributions/modules/cvs_deploy/cvs_deploy.module

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

revision 1.9.2.10, Wed Nov 19 18:40:41 2008 UTC revision 1.9.2.11, Mon Jun 1 19:24:36 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: cvs_deploy.module,v 1.9.2.9 2008/11/19 18:37:16 dww Exp $  // $Id: cvs_deploy.module,v 1.9.2.10 2008/11/19 18:40:41 dww Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 95  function _cvs_deploy_version_alter(&$ver Line 95  function _cvs_deploy_version_alter(&$ver
95      $version = cvs_deploy_version_from_tag(trim($match[1]));      $version = cvs_deploy_version_from_tag(trim($match[1]));
96    }    }
97    
98    if (function_exists('update_status_get_available') && $version == 'HEAD') {    if (module_exists('update_status') && $version == 'HEAD') {
99      // If there's available update_status data, we can use the version string      // If there's available update_status data, we can use the version string
100      // the release node pointing to HEAD really has. However, we can only      // the release node pointing to HEAD really has. However, we can only
101      // safely grab this data directly from the cache, since if we call      // safely grab this data directly from the cache, since if we call
102      // update_status_get_available() here, we'd enter infinite recursion when      // update_status_get_available() here, we'd enter infinite recursion when
103      // that function invokes update_status_get_projects(), which in turn needs      // that function invokes update_status_get_projects(), which in turn needs
104      // to process the .info files, which invokes the hook that leads here.      // to process the .info files, which invokes the hook that leads here.
105      if (empty($available) && ($cache = cache_get('update_status_info', 'cache'))) {      if (empty($available)) {
106        $available = unserialize($cache->data);        if (function_exists('_update_status_cache_get')) {
107            // update_status 5.x-2.4 and later, using the new private cache system.
108            $cache = _update_status_cache_get('update_status_available_releases');
109          }
110          else {
111            // update_status 5.x-2.3 and earlier, using the (fragile) core cache
112            // system.
113            $cache = cache_get('update_status_info', 'cache');
114          }
115          if (!empty($cache)) {
116            $available = unserialize($cache->data);
117          }
118      }      }
119      $project_name = !empty($project['project']) ? $project['project'] : cvs_deploy_get_project_name($project);      $project_name = !empty($project['project']) ? $project['project'] : cvs_deploy_get_project_name($project);
120      if (isset($available[$project_name]['releases'])) {      if (isset($available[$project_name]['releases'])) {

Legend:
Removed from v.1.9.2.10  
changed lines
  Added in v.1.9.2.11

  ViewVC Help
Powered by ViewVC 1.1.2