X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FFileTag.php;h=d459237e757355684e6043172c3c99d76c57c8e2;hb=2e05dac7dae0a3d028b442a2d5afbd4176a32e99;hp=02eee8aedaecf827d8c3e51326ade8546d2d4864;hpb=d09b3f5bdeae444f785f6283e55dbf2f61caadac;p=friendica.git diff --git a/src/Model/FileTag.php b/src/Model/FileTag.php index 02eee8aeda..d459237e75 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 * @@ -137,199 +114,4 @@ class FileTag return $return; } - - /** - * Get file tags from list - * - * ex. given music,video return