diff options
Diffstat (limited to 'application')
-rw-r--r-- | application/LinkDB.php | 11 | ||||
-rw-r--r-- | application/Url.php | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/application/LinkDB.php b/application/LinkDB.php index 1cb70de0..b1072e07 100644 --- a/application/LinkDB.php +++ b/application/LinkDB.php | |||
@@ -440,11 +440,18 @@ You use the community supported version of the original Shaarli project, by Seba | |||
440 | public function allTags() | 440 | public function allTags() |
441 | { | 441 | { |
442 | $tags = array(); | 442 | $tags = array(); |
443 | $caseMapping = array(); | ||
443 | foreach ($this->_links as $link) { | 444 | foreach ($this->_links as $link) { |
444 | foreach (explode(' ', $link['tags']) as $tag) { | 445 | foreach (explode(' ', $link['tags']) as $tag) { |
445 | if (!empty($tag)) { | 446 | if (empty($tag)) { |
446 | $tags[$tag] = (empty($tags[$tag]) ? 1 : $tags[$tag] + 1); | 447 | continue; |
447 | } | 448 | } |
449 | // The first case found will be displayed. | ||
450 | if (!isset($caseMapping[strtolower($tag)])) { | ||
451 | $caseMapping[strtolower($tag)] = $tag; | ||
452 | $tags[$caseMapping[strtolower($tag)]] = 0; | ||
453 | } | ||
454 | $tags[$caseMapping[strtolower($tag)]]++; | ||
448 | } | 455 | } |
449 | } | 456 | } |
450 | // Sort tags by usage (most used tag first) | 457 | // Sort tags by usage (most used tag first) |
diff --git a/application/Url.php b/application/Url.php index 77447c8d..c166ff6e 100644 --- a/application/Url.php +++ b/application/Url.php | |||
@@ -99,6 +99,7 @@ class Url | |||
99 | 'action_type_map=', | 99 | 'action_type_map=', |
100 | 'fb_', | 100 | 'fb_', |
101 | 'fb=', | 101 | 'fb=', |
102 | 'PHPSESSID=', | ||
102 | 103 | ||
103 | // Scoop.it | 104 | // Scoop.it |
104 | '__scoop', | 105 | '__scoop', |