Changeset 1849 for trunk/ws.php


Ignore:
Timestamp:
Feb 22, 2007, 2:12:32 AM (17 years ago)
Author:
rvelices
Message:
  • user comments are not saved in the database with htmlspecialchars anymore
  • web service: added the possibility to enter a user comment using the service...
  • new comment functions from picture_comment.inc.php
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ws.php

    r1837 r1849  
    44// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
    55// +-----------------------------------------------------------------------+
    6 // | branch        : BSF (Best So Far)
    76// | file          : $Id$
    87// | last update   : $Date$
     
    4140{
    4241  include_once(PHPWG_ROOT_PATH.'include/ws_functions.inc.php');
    43   global $conf;
     42  global $conf, $user;
    4443  $service = &$arr[0];
    4544  $service->addMethod('pwg.getVersion', 'ws_getVersion', null,
     
    7877      'retrieves a list of categories' );
    7978
     79  $service->addMethod('pwg.images.addComment', 'ws_images_addComment',
     80      array(
     81        'image_id' => array(),
     82        'author' => array( 'default' => $user['is_the_guest']? 'guest':$user['username']),
     83        'content' => array(),
     84        'key' => array(),
     85      ),
     86      'add a comment to an image' );
     87
    8088  $service->addMethod('pwg.images.getInfo', 'ws_images_getInfo',
    81       array('image_id'),
     89      array(
     90        'image_id' => array(),
     91        'comments_page' => array('default'=>0 ),
     92        'comments_per_page' => array(
     93              'default' => $conf['nb_comment_page'], 
     94              'maxValue' => 2*$conf['nb_comment_page'],
     95            ),
     96      ),
    8297      'retrieves information about the given photo' );
    8398
Note: See TracChangeset for help on using the changeset viewer.