From 4fa9a3c5d83a1024678596a586afe5df14a345b5 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 16 Aug 2018 17:25:47 +0200 Subject: Fix a JS bug preventing AJAX tag deletion to work Fixes #1214 --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 8f6ee50a..eb717536 100644 --- a/index.php +++ b/index.php @@ -1084,7 +1084,8 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, die(t('Wrong token.')); } - $alteredLinks = $LINKSDB->renameTag(escape($_POST['fromtag']), escape($_POST['totag'])); + $toTag = isset($_POST['totag']) ? escape($_POST['totag']) : null; + $alteredLinks = $LINKSDB->renameTag(escape($_POST['fromtag']), $toTag); $LINKSDB->save($conf->get('resource.page_cache')); foreach ($alteredLinks as $link) { $history->updateLink($link); -- cgit v1.2.3