aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/LinkUtils.php
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2017-01-06 18:54:29 +0100
committerVirtualTam <virtualtam+github@flibidi.net>2017-01-07 14:37:40 +0100
commitee6f4b64a91d76070f930cdf7602ab4686714c7a (patch)
tree29056ef186c14a08d9ce7e1aa7514fa98bd2197e /application/LinkUtils.php
parent7418f7cb60524c3bfc2f240386b5e3e7eb9b3257 (diff)
downloadShaarli-ee6f4b64a91d76070f930cdf7602ab4686714c7a.tar.gz
Shaarli-ee6f4b64a91d76070f930cdf7602ab4686714c7a.tar.zst
Shaarli-ee6f4b64a91d76070f930cdf7602ab4686714c7a.zip
Cleanup: use safe boolean comparisons
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'application/LinkUtils.php')
-rw-r--r--application/LinkUtils.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/application/LinkUtils.php b/application/LinkUtils.php
index cf58f808..976474de 100644
--- a/application/LinkUtils.php
+++ b/application/LinkUtils.php
@@ -89,7 +89,9 @@ function count_private($links)
89{ 89{
90 $cpt = 0; 90 $cpt = 0;
91 foreach ($links as $link) { 91 foreach ($links as $link) {
92 $cpt = $link['private'] == true ? $cpt + 1 : $cpt; 92 if ($link['private']) {
93 $cpt += 1;
94 }
93 } 95 }
94 96
95 return $cpt; 97 return $cpt;