From 21979ff11ceee0042642ac17147858a4155d54c5 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Wed, 20 Jan 2016 23:34:33 +0100 Subject: Add exclusion in tag search * Searching '-mytag' will now exlude all shaares with 'mytag' tag. * All tags starting with a '-' are renamed without it (through the Updater). * Unit tests. Minor code changes: * LinkDB->filter() can now take no parameters (get all link depending on logged status). * tagsStrToArray() is now static and filters blank tags. --- tests/LinkDBTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/LinkDBTest.php') diff --git a/tests/LinkDBTest.php b/tests/LinkDBTest.php index 3b1a2057..06edea79 100644 --- a/tests/LinkDBTest.php +++ b/tests/LinkDBTest.php @@ -276,7 +276,8 @@ class LinkDBTest extends PHPUnit_Framework_TestCase 'media' => 1, 'software' => 1, 'stallman' => 1, - 'free' => 1 + 'free' => 1, + '-exclude' => 1, ), self::$publicLinkDB->allTags() ); @@ -295,7 +296,8 @@ class LinkDBTest extends PHPUnit_Framework_TestCase 'html' => 1, 'w3c' => 1, 'css' => 1, - 'Mercurial' => 1 + 'Mercurial' => 1, + '-exclude' => 1, ), self::$privateLinkDB->allTags() ); -- cgit v1.2.3