ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 7784


Ignore:
Timestamp:
Jul 19, 2008, 4:47:14 PM (14 years ago)
Author:
ebihara
Message:

ticket_query() を追加し、パラメータを communicate_with_trac() で生成しないようにした

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/work/ebihara/prj_module_trac/webapp_ext/modules/trac/util.php

    r7783 r7784  
    55 */
    66
     7require_once 'XML/RPC.php';
     8
    79function communicate_with_trac($host, $path, $method, $username = '', $password = '', $params = array(), &$error = '')
    810{
    9     require_once 'XML/RPC.php';
    10 
    11     $msg_params = array();
    12     foreach ($params as $value) {
    13         $msg_params[] =& new XML_RPC_Value($value, 'int');
    14     }
    15     $message =& new XML_RPC_Message($method, $msg_params);
     11    $message =& new XML_RPC_Message($method, $params);
    1612
    1713    $client =& new XML_RPC_client($path, $host);
     
    3026}
    3127
     28function ticket_query($username, $password, $qstr)
     29{
     30    $host = 'trac.openpne.jp';
     31    $path = '/login/xmlrpc';
     32
     33    $params = array(
     34        new XML_RPC_Value($qstr, 'string'),
     35    );
     36
     37    return communicate_with_trac($host, $path, 'ticket.query', $username, $password, $params);
     38}
     39
    3240?>
Note: See TracChangeset for help on using the changeset viewer.