X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FFileTag.php;h=324a78fa6ffa48c9ba28b9ad0d8ca34f64bc640d;hb=f1d3f60499a325557be866fedd31b46093d477ae;hp=02eee8aedaecf827d8c3e51326ade8546d2d4864;hpb=01640a7045e146759bc936dd499ac27738b78940;p=friendica.git diff --git a/src/Model/FileTag.php b/src/Model/FileTag.php index 02eee8aeda..324a78fa6f 100644 --- a/src/Model/FileTag.php +++ b/src/Model/FileTag.php @@ -1,6 +1,6 @@ ', '[', ']'], ['%3c', '%3e', '%5b', '%5d'], $s); } @@ -53,31 +50,11 @@ class FileTag * * @return string The decoded string. */ - public static function decode($s) + private static function decode($s) { return str_replace(['%3c', '%3e', '%5b', '%5d'], ['<', '>', '[', ']'], $s); } - /** - * Query files for tag - * - * @param string $table The table to be queired. - * @param string $s The search term - * @param string $type Optional file type. - * - * @return string Query string. - */ - public static function fileQuery($table, $s, $type = 'file') - { - if ($type == 'file') { - $str = preg_quote('[' . str_replace('%', '%%', self::encode($s)) . ']'); - } else { - $str = preg_quote('<' . str_replace('%', '%%', self::encode($s)) . '>'); - } - - return " AND " . (($table) ? DBA::escape($table) . '.' : '') . "file regexp '" . DBA::escape($str) . "' "; - } - /** * Get file tags from array * @@ -154,182 +131,4 @@ class FileTag return self::arrayToFile($list_array, $type); } - - /** - * Get list from file tags - * - * ex. given