From a571f040d68d15861035c981ec440d2a79af65c9 Mon Sep 17 00:00:00 2001 From: momo-i Date: Tue, 17 Mar 2009 03:48:32 +0000 Subject: Fixed: remote catalog doesn't clean --- lib/class/xmlrpcserver.class.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lib/class/xmlrpcserver.class.php') diff --git a/lib/class/xmlrpcserver.class.php b/lib/class/xmlrpcserver.class.php index ae1d1653..3cdd7907 100644 --- a/lib/class/xmlrpcserver.class.php +++ b/lib/class/xmlrpcserver.class.php @@ -191,6 +191,25 @@ class xmlRpcServer { return new XML_RPC_Response(XML_RPC_encode($key)); } // create_stream_session + /** + * check_song + * This checks remote catalog + */ + public static function check_song($xmlrpc_object) { + + $var = $xmlrpc_object->params['0']->me['int']; + $sql = "SELECT `song`.`id` FROM `song` WHERE `id`='" . $var ."'"; + $db_results = Dba::read($sql); + if(Dba::num_rows($db_results) == '0') { + $return = 0; + } else { + $return = 1; + } + + return new XML_RPC_Response(XML_RPC_encode($return)); + + } + /** * handshake * This should be run before any other XMLRPC actions, it checks the KEY encoded with a timestamp then returns a valid TOKEN to be -- cgit