Skip to content

Commit

Permalink
Removed unnecessary string sanitize.
Browse files Browse the repository at this point in the history
  • Loading branch information
nelson-edalex committed Jul 31, 2018
1 parent 2db4bd6 commit 45aa983
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions managelinks.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
if ($formdata = $mform->get_data()) {
if (!empty($formdata->linkid)) {
$editinglink = new stdClass;
$editinglink->id = filter_var($formdata->linkid, FILTER_SANITIZE_STRING);
$editinglink->title = filter_var($formdata->title, FILTER_SANITIZE_STRING);
$editinglink->url = filter_var($formdata->url, FILTER_SANITIZE_URL);
$editinglink->id = $formdata->linkid;
$editinglink->title = $formdata->title;
$editinglink->url = $formdata->url
$editinglink->contextid = $context->id;
$DB->update_record('block_equella_links', $editinglink);
} else {
$addinglink = new stdClass;
$addinglink->title = filter_var($formdata->title, FILTER_SANITIZE_STRING);
$addinglink->url = filter_var($formdata->url, FILTER_SANITIZE_URL);
$addinglink->title = $formdata->title;
$addinglink->url = $formdata->url;
$addinglink->created = time();
$addinglink->contextid = $context->id;
$DB->insert_record('block_equella_links', $addinglink);
Expand Down

0 comments on commit 45aa983

Please sign in to comment.