You are here

function recommender_app_update in Recommender API 7.4

Same name and namespace in other branches
  1. 6.3 recommender.module \recommender_app_update()
  2. 7.3 recommender.module \recommender_app_update()
1 call to recommender_app_update()
RecommenderTestCase::testAppFunctions in ./recommender.test

File

./recommender.module, line 68
Providing generic recommender system algorithms.

Code

function recommender_app_update($app_name, $params) {
  $app = recommender_app_load($app_name);
  $new_params = array_merge($app['params'], $params);
  db_update('recommender_app')
    ->fields(array(
    'params' => json_encode($new_params),
  ))
    ->condition('id', $app['id'])
    ->execute();
}