diff options
Diffstat (limited to 'application/LinkUtils.php')
-rw-r--r-- | application/LinkUtils.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/application/LinkUtils.php b/application/LinkUtils.php index 2df76ba8..da04ca97 100644 --- a/application/LinkUtils.php +++ b/application/LinkUtils.php | |||
@@ -77,3 +77,19 @@ function html_extract_charset($html) | |||
77 | 77 | ||
78 | return false; | 78 | return false; |
79 | } | 79 | } |
80 | |||
81 | /** | ||
82 | * Count private links in given linklist. | ||
83 | * | ||
84 | * @param array $links Linklist. | ||
85 | * | ||
86 | * @return int Number of private links. | ||
87 | */ | ||
88 | function count_private($links) | ||
89 | { | ||
90 | $cpt = 0; | ||
91 | foreach ($links as $link) { | ||
92 | $cpt = $link['private'] == true ? $cpt + 1 : $cpt; | ||
93 | } | ||
94 | return $cpt; | ||
95 | } | ||