Пример #1
0
 function updateData(SMWSemanticData $data)
 {
     global $smwgQRCEnabled;
     if ($smwgQRCEnabled) {
         $qrc = new SMWQRCQueryResultsCache();
         return $qrc->updateData($data, $this);
     } else {
         return $this->doUpdateData($data);
     }
 }
Пример #2
0
function smwf_qc_updateQuery($paramAsJSON)
{
    global $smwgQRCEnabled;
    if (!$smwgQRCEnabled) {
        $response['success'] = true;
    } else {
        $paramObj = json_decode($paramAsJSON);
        @($queryId = $paramObj->queryId);
        @($debug = $paramObj->debug);
        $qrc = new SMWQRCQueryResultsCache();
        $response['success'] = $qrc->updateQueryResult($queryId);
    }
    $response = json_encode($response);
    if (!$debug) {
        $response = new AjaxResponse($response);
        $response->setContentType("application/json");
    }
    return $response;
}
Пример #3
0
 public function getQueryResult(SMWQuery $query)
 {
     global $smwgQRCEnabled;
     if ($smwgQRCEnabled) {
         $qrc = new SMWQRCQueryResultsCache();
         return $qrc->getQueryResult($query);
     } else {
         return $this->doGetQueryResult($query);
     }
 }