[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/project/release/ -> project-release-create-history.php (summary)

(no description)

Author: Derek Wright (http://drupal.org/user/46549)
File Size: 651 lines (24 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 includes/bootstrap.inc

Defines 9 functions

  project_release_history_generate_all()
  project_release_history_generate_project_xml()
  project_release_history_write_xml()
  project_list_generate()
  wd_msg()
  wd_err()
  _rename()
  _release_sort()
  prch_url()

Functions
Functions that are not part of a class:

project_release_history_generate_all($project_id = 0)   X-Ref
Figure out what project and API terms to generate the history for.


project_release_history_generate_project_xml($project_nid, $api_tid = NULL)   X-Ref
Generate the XML history file for a given project name and API
compatibility term.

param: $project_nid
param: $api_tid

project_release_history_write_xml($xml, $project = NULL, $api_version = NULL)   X-Ref
Write out the XML history for a given project and version to a file.

param: $xml
param: $project
param: $api_version

project_list_generate()   X-Ref
Generate a list of all projects available on this server.


wd_msg($notice, $link = NULL)   X-Ref
Wrapper function for watchdog() to log notice messages.

param: $notice
param: $link

wd_err($error, $link = NULL)   X-Ref
Wrapper function for watchdog() to log error messages.

param: $error
param: $link

_rename($oldfile, $newfile)   X-Ref
Rename on Windows isn't atomic like it is on *nix systems.
See http://www.php.net/rename about this bug.


_release_sort($a, $b)   X-Ref
Sorting function to ensure releases are in the right order in the XML file.

Loop over the fields in the release node we care about, and the first field
that differs between the two releases determines the order.

We first check the 'weight' (of the API version term) for when we're
building a single list of all versions, not a per-API version listing. In
this case, lower numbers should float to the top.

We also need to special-case the 'rebuild' field, which is how we know if
it's a dev snapshot or official release. Rebuild == 1 should always come
last within a given major version, since that's how update_status expects
the ordering to ensure that we never recommend a -dev release if there's an
official release available. So, like weight, the lower number for 'rebuild'
should float to the top.

For every other field, we want the bigger numbers come first.


prch_url($path)   X-Ref
Helper function to generate clean absolute links for the XML files.

Relying on core's url() gives us crazy results when the script is invoked
with a full path, since the construction of $base_url during bootstrapping
is all wrong.




Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7