#! /usr/bin/env python
#############################################################
#                                                           #
#   Author: Herve Menager                                   #
#   Organization:'Biological Software and Databases' Group, #
#                Institut Pasteur, Paris.                   #
#   Distributed under GPLv2 Licence. Please refer to the    #
#   COPYING.LIB document.                                   #
#                                                           #
#############################################################
import mb_cgi

def process( self ):
    if self.session:
        bookmark_ids = self.request.getlist('id')
        for id in bookmark_ids:
            self.session.removeData(id)
    self.jsonMap['ok'] = str(True)

if __name__ == "__main__":
    mb_cgi.JSONCGI(processFunction=process,useSession=True)