Commit 2b51372c authored by Richard Mansfield's avatar Richard Mansfield
Browse files

viewid -> view

parent f8d54e59
......@@ -27,7 +27,7 @@
define('INTERNAL', 1);
require(dirname(dirname(__FILE__)) . '/init.php');
$viewid = param_integer('viewid');
$view = param_integer('view');
$artefactid = param_integer('artefactid',null);
$data = new StdClass;
......@@ -40,11 +40,11 @@ else {
$table = 'usr_watchlist_view';
$artefactfield = null;
}
$data->view = $viewid;
$data->view = $view;
$data->usr = $USER->get('id');
$data->ctime = db_format_timestamp(time());
if (record_exists($table, 'usr', $data->usr, 'view', $viewid, $artefactfield, $artefactid)) {
if (record_exists($table, 'usr', $data->usr, 'view', $view, $artefactfield, $artefactid)) {
json_reply(false, get_string('itemalreadyinwatchlist'));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment