aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/Utils.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2015-12-27 10:08:20 +0100
committerArthurHoaro <arthur@hoa.ro>2016-01-06 19:53:04 +0100
commit822bffced8212e7f34bcb2ad063b31a78bd57bdb (patch)
tree04cd1efe9d2f015669a451fc7c853c23e38a44cb /application/Utils.php
parentba83317573a1477d731cbd3d974b601cf9afdba3 (diff)
downloadShaarli-822bffced8212e7f34bcb2ad063b31a78bd57bdb.tar.gz
Shaarli-822bffced8212e7f34bcb2ad063b31a78bd57bdb.tar.zst
Shaarli-822bffced8212e7f34bcb2ad063b31a78bd57bdb.zip
Link filter refactoring
* introduce class LinkFilter to handle link filter operation (and lighten LinkDB). * handle 'private only' in filtering. * update template to prefill search fields with current search terms. * coding style. * unit test (mostly move from LinkDB to LinkFilter). PS: preparation for #358 #315 and 'AND' search.
Diffstat (limited to 'application/Utils.php')
-rw-r--r--application/Utils.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/application/Utils.php b/application/Utils.php
index f84f70e4..aeaef9ff 100644
--- a/application/Utils.php
+++ b/application/Utils.php
@@ -72,12 +72,14 @@ function sanitizeLink(&$link)
72 72
73/** 73/**
74 * Checks if a string represents a valid date 74 * Checks if a string represents a valid date
75
76 * @param string $format The expected DateTime format of the string
77 * @param string $string A string-formatted date
78 *
79 * @return bool whether the string is a valid date
75 * 80 *
76 * @param string a string-formatted date 81 * @see http://php.net/manual/en/class.datetime.php
77 * @param format the expected DateTime format of the string 82 * @see http://php.net/manual/en/datetime.createfromformat.php
78 * @return whether the string is a valid date
79 * @see http://php.net/manual/en/class.datetime.php
80 * @see http://php.net/manual/en/datetime.createfromformat.php
81 */ 83 */
82function checkDateFormat($format, $string) 84function checkDateFormat($format, $string)
83{ 85{