euromark 10 years ago
parent
commit
448596c764

+ 0 - 69
Config/bootstrap.php

@@ -181,75 +181,6 @@ define('CHAR_DOUBLE_RPIME', '″'); # ? (seconds)
 
 /** BASIC FUNCTIONS **/
 
-/**
- * Own slug function - containing extra char replacement
- *
- * //TODO move to TextLib?
- *
- * @return string
- * @deprecated Use a lib class method instead
- */
-if (!function_exists('slug')) {
-	function slug($string, $separator = null, $low = true) {
-		$additionalSlugElements = [
-			'/º|°/' => 0,
-			'/¹/' => 1,
-			'/²/' => 2,
-			'/³/' => 3,
-			// new utf8 char "capitel ß" still missing here! '/.../' => 'SS', (TODO in 2009)
-			'/@/' => 'at',
-			'/æ/' => 'ae',
-			'/©/' => 'C',
-			'/ç|¢/' => 'c',
-			'/Ð/' => 'D',
-			'/€/' => 'EUR',
-			'/™/' => 'TM',
-			// more missing?
-		];
-
-		if ($separator === null) {
-			$separator = defined('SEO_SEPARATOR') ? SEO_SEPARATOR : '-';
-		}
-		$res = Inflector::slug($string, $separator, $additionalSlugElements);
-		if ($low) {
-			$res = strtolower($res);
-		}
-		return $res;
-	}
-}
-
-/**
- * Since nl2br doesn't remove the line breaks when adding in the <br /> tags,
- * it is necessary to strip those off before you convert all of the tags, otherwise you will get double spacing
- *
- * //TODO: move to TextLib?
- *
- * @param string $str
- * @return string
- * @deprecated Use a lib class method instead
- */
-function br2nl($str) {
-	$str = preg_replace("/(\r\n|\r|\n)/", "", $str);
-	return preg_replace("=<br */?>=i", "\n", $str);
-}
-
-/**
- * Replaces CRLF with spaces
- *
- * //TODO: move to TextLib?
- *
- * @param string $text Any text
- * @return string Safe string without new lines
- * @deprecated Use a lib class method instead
- */
-function safenl($str) {
-	//$str = str_replace(chr(13).chr(10), " ", $str); # \r\n
-	//$str = str_replace(chr(13), " ", $str); # \r
-	//$str = str_replace(chr(10), " ", $str); # \n
-	$str = preg_replace("/(\r\n|\r|\n)/", " ", $str);
-	return $str;
-}
-
 if (!function_exists('isEmpty')) {
 	/**
 	 * Convenience function to check on "empty()"

+ 0 - 2
Controller/Component/CommonComponent.php

@@ -898,8 +898,6 @@ class CommonComponent extends Component {
 			return $subdomain;
 		}
 
-		//$hostParts = explode();
-		//$check = trim(mb_substr($email, $checkpos));
 		return '';
 	}
 

+ 2 - 3
View/Helper/GravatarHelper.php

@@ -70,7 +70,7 @@ class GravatarHelper extends AppHelper {
 	}
 
 	/**
-	 * Show gravatar for the supplied email address
+	 * Shows gravatar for the supplied email address
 	 *
 	 * @param string $email Email address
 	 * @param array $options Array of options, keyed from default settings
@@ -83,8 +83,7 @@ class GravatarHelper extends AppHelper {
 	}
 
 	/**
-	 * Generate image URL
-	 * TODO: rename to avoid E_STRICT errors here
+	 * Generates image URL
 	 *
 	 * @param string $email Email address
 	 * @param string $options Array of options, keyed from default settings

+ 2 - 3
View/Helper/PhpThumbHelper.php

@@ -2,10 +2,9 @@
 App::uses('AppHelper', 'View/Helper');
 
 /**
+ * Helper as wrapper around PHPThumb library.
+ * 
  * @see http://code621.com/content/1/phpthumb-helper-for-cakephp
- * some mods?
- * //TODO: make to lib!?
- * //TODO: integrate ThumbnailHelper !!!
  */
 class PhpThumbHelper extends AppHelper {