/[drupal]/contributions/modules/drupalorg/project_xmlrpc_legacy/project_xmlrpc_legacy.module
ViewVC logotype

Contents of /contributions/modules/drupalorg/project_xmlrpc_legacy/project_xmlrpc_legacy.module

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


Revision 1.6 - (show annotations) (download) (as text)
Wed May 6 21:19:31 2009 UTC (6 months, 2 weeks ago) by dww
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +3 -3 lines
File MIME type: text/x-php
#364569 by dww: Actually ported project_xml_legacy to D6. ;) The previous
effort left D5-style calls to url() which have been causing lots of entries
in the PHP error log on d.o (and breaking legacy clients).
1 <?php
2 // $Id: project_xmlrpc_legacy.module,v 1.5 2009/01/26 19:56:12 goba Exp $
3
4 /**
5 * @file
6 * Module to provides XML-RPC server code for legacy update_status 5.x-1.* clients
7 */
8
9 /**
10 * Implementation of hook_xmlrpc().
11 */
12 function project_xmlrpc_legacy_xmlrpc() {
13 $xmlrpc = array();
14 $xmlrpc[] = array(
15 'project.release.data',
16 'project_xmlrpc_legacy_data',
17 t('Provides versioning data for a project or array of projects'),
18 );
19 return $xmlrpc;
20 }
21
22 /**
23 * Callback for hook_xmlrpc().
24 *
25 * Returns hard-coded data for the update_status 5.x-2.3 official release.
26 */
27 function project_xmlrpc_legacy_data($project = NULL, $api_version = NULL, $major_version = NULL) {
28 $data = array();
29
30 $data['update_status'] = array(
31 'name' => 'Update status',
32 'version' => '5.x-2.3',
33 'version_major' => 2,
34 'version_minor' => '',
35 'version_patch' => 3,
36 'version_extra' => '',
37 'link' => url('http://drupal.org/project/update_status', array('absolute' => TRUE)),
38 'release' => url('http://drupal.org/node/295470', array('absolute' => TRUE)),
39 'download' => theme('project_release_download_link', 'files/projects/update_status-5.x-2.3.tar.gz', NULL, 'url'),
40 'date' => 1218740721,
41 'md5hash' => '0f9602dad6879af88dc9d86f06ab5149',
42 );
43
44 // Compress the data to reduce bandwidth usage. Base64 because binary data
45 // does not seem to survive the XMLRPC transfer.
46 $data = base64_encode(gzencode(serialize($data), 9, FORCE_GZIP));
47 return $data;
48 }

  ViewVC Help
Powered by ViewVC 1.1.2