From e51f9e8699a0443a0942f0a84c30ba3a4df372c1 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Tue, 1 Feb 2011 07:31:12 +0000 Subject: Moved functions from export.php - river.php into deprecated files git-svn-id: http://code.elgg.org/elgg/trunk@7980 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/output.php | 95 --------------------------------------------------- 1 file changed, 95 deletions(-) (limited to 'engine/lib/output.php') diff --git a/engine/lib/output.php b/engine/lib/output.php index 25fb23e3d..967af263f 100644 --- a/engine/lib/output.php +++ b/engine/lib/output.php @@ -186,7 +186,6 @@ function elgg_format_attributes(array $attrs) { return implode(' ', $attributes); } - /** * Preps an associative array for use in {@link elgg_format_attributes()}. * @@ -262,19 +261,6 @@ function elgg_normalize_url($url) { } } -/** - * When given a title, returns a version suitable for inclusion in a URL - * - * @param string $title The title - * - * @return string The optimised title - * @deprecated 1.8 - */ -function friendly_title($title) { - elgg_deprecated_notice('friendly_title was deprecated by elgg_get_friendly_title', 1.8); - return elgg_get_friendly_title($title); -} - /** * When given a title, returns a version suitable for inclusion in a URL * @@ -301,19 +287,6 @@ function elgg_get_friendly_title($title) { return $title; } -/** - * Displays a UNIX timestamp in a friendly way (eg "less than a minute ago") - * - * @param int $time A UNIX epoch timestamp - * - * @return string The friendly time - * @deprecated 1.8 - */ -function friendly_time($time) { - elgg_deprecated_notice('friendly_time was deprecated by elgg_view_friendly_time', 1.8); - return elgg_view_friendly_time($time); -} - /** * Formats a UNIX timestamp in a friendly way (eg "less than a minute ago") * @@ -394,71 +367,3 @@ function elgg_strip_tags($string) { return $string; } - - - -/** - * Filters a string into an array of significant words - * - * @deprecated 1.8 - * - * @param string $string A string - * - * @return array - */ -function filter_string($string) { - elgg_deprecated_notice('filter_string() was deprecated!', 1.8); - - // Convert it to lower and trim - $string = strtolower($string); - $string = trim($string); - - // Remove links and email addresses - // match protocol://address/path/file.extension?some=variable&another=asf% - $string = preg_replace("/\s([a-zA-Z]+:\/\/[a-z][a-z0-9\_\.\-]*[a-z]{2,6}" - . "[a-zA-Z0-9\/\*\-\?\&\%\=]*)([\s|\.|\,])/iu", " ", $string); - - // match www.something.domain/path/file.extension?some=variable&another=asf% - $string = preg_replace("/\s(www\.[a-z][a-z0-9\_\.\-]*[a-z]{2,6}" - . "[a-zA-Z0-9\/\*\-\?\&\%\=]*)([\s|\.|\,])/iu", " ", $string); - - // match name@address - $string = preg_replace("/\s([a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]" - . "*\@[a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]{2,6})([\s|\.|\,])/iu", " ", $string); - - // Sanitise the string; remove unwanted characters - $string = preg_replace('/\W/ui', ' ', $string); - - // Explode it into an array - $terms = explode(' ', $string); - - // Remove any blacklist terms - //$terms = array_filter($terms, 'remove_blacklist'); - - return $terms; -} - -/** - * Returns true if the word in $input is considered significant - * - * @deprecated 1.8 - * - * @param string $input A word - * - * @return true|false - */ -function remove_blacklist($input) { - elgg_deprecated_notice('remove_blacklist() was deprecated!', 1.8); - - global $CONFIG; - - if (!is_array($CONFIG->wordblacklist)) { - return $input; - } - - if (strlen($input) < 3 || in_array($input, $CONFIG->wordblacklist)) { - return false; - } - - return true; -} \ No newline at end of file -- cgit v1.2.3