~ubuntu-branches/ubuntu/saucy/horde3/saucy

« back to all changes in this revision

Viewing changes to lib/Horde/SyncML/Command/Put.php

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2005-05-04 23:08:08 UTC
  • Revision ID: james.westby@ubuntu.com-20050504230808-p4hf3hk28o3v7wir
Tags: upstream-3.0.4
ImportĀ upstreamĀ versionĀ 3.0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
include_once 'Horde/SyncML/State.php';
 
4
include_once 'Horde/SyncML/Command.php';
 
5
 
 
6
/**
 
7
 * $Horde: framework/SyncML/SyncML/Command/Put.php,v 1.12.10.1 2005/01/03 12:19:15 jan Exp $
 
8
 *
 
9
 * Copyright 2003-2005 Anthony Mills <amills@pyramid6.com>
 
10
 *
 
11
 * See the enclosed file COPYING for license information (LGPL). If you
 
12
 * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 
13
 *
 
14
 * @author  Anthony Mills <amills@pyramid6.com>
 
15
 * @version $Revision: 1.12.10.1 $
 
16
 * @since   Horde 3.0
 
17
 * @package Horde_SyncML
 
18
 */
 
19
class Horde_SyncML_Command_Put extends Horde_SyncML_Command {
 
20
 
 
21
    function output($currentCmdID, &$output )
 
22
    {
 
23
        $state = $_SESSION['SyncML.state'];
 
24
 
 
25
        $status = &new Horde_SyncML_Command_Status((($state->isAuthorized()) ? RESPONSE_OK : RESPONSE_INVALID_CREDENTIALS), 'Put');
 
26
        $status->setCmdRef($this->_cmdID);
 
27
 
 
28
        $ref = ($state->getVersion() == 0) ? './devinf10' : './devinf11';
 
29
 
 
30
        $status->setSourceRef($ref);
 
31
 
 
32
        return $status->output($currentCmdID, $output);
 
33
    }
 
34
 
 
35
}