From 35c9509477097e19c2a7d937186fafab61ab3a64 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 27 Jun 2012 07:25:26 +0200 Subject: [PATCH] * Only return online results via web API. --- src/web/Api_v1.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/web/Api_v1.cpp b/src/web/Api_v1.cpp index 47b2215f6..2dddc8bff 100644 --- a/src/web/Api_v1.cpp +++ b/src/web/Api_v1.cpp @@ -94,7 +94,7 @@ Api_v1::auth_2( QxtWebRequestEvent* event, QString arg ) if ( keyval.size() == 2 ) queryItems.insert( keyval.first(), keyval.last() ); else - qDebug() << "Failed parsing url parameters: " << part; + qDebug() << "Failed parsing url parameters:" << part; } qDebug() << "has query items:" << pieces; @@ -173,7 +173,7 @@ Api_v1::sid( QxtWebRequestEvent* event, QString unused ) Q_UNUSED( unused ); RID rid = event->url.path().mid( 5 ); - qDebug() << "Request for sid " << rid; + qDebug() << "Request for sid" << rid; result_ptr rp = Pipeline::instance()->result( rid ); if ( rp.isNull() ) @@ -328,7 +328,8 @@ Api_v1::get_results( QxtWebRequestEvent* event ) QVariantList res; foreach( const result_ptr& rp, qry->results() ) { - res << rp->toVariant(); + if ( rp->isOnline() ) + res << rp->toVariant(); } r.insert( "results", res );