euromark 11 年之前
父节点
当前提交
55ca9803f8
共有 1 个文件被更改,包括 1 次插入41 次删除
  1. 1 41
      Controller/Component/CommonComponent.php

+ 1 - 41
Controller/Component/CommonComponent.php

@@ -852,49 +852,9 @@ class CommonComponent extends Component {
 	}
 
 	/**
-	 * //TODO: move somewhere else
-	 * Assign Array to Char Array
-	 *
-	 * PROTECTED NAMES (content cannot contain those): undefined
-	 *
-	 * @var content array
-	 * @var char array
-	 * @return array: chars with content
-	 */
-	public function assignToChar($contentArray, $charArray = null) {
-		$res = array();
-		$res['undefined'] = array();
-
-		if (empty($charArray)) {
-			$charArray = $this->alphaFilterSymbols();
-		}
-
-		foreach ($contentArray as $content) {
-			$done = false;
-
-			// loop them trough
-			foreach ($charArray as $char) {
-				if (empty($res[$char])) { // throws warnings otherwise
-					$res[$char] = array();
-				}
-				if (!empty($content) && strtolower(substr($content, 0, 1)) == $char) {
-					$res[$char][] = $content;
-					$done = true;
-				}
-			}
-
-			// no match?
-			if (!empty($content) && !$done) {
-				$res['undefined'][] = $content;
-			}
-
-		}
-		return $res;
-	}
-
-	/**
 	 * Expects email to be valid!
 	 * TODO: move to Lib
+	 *
 	 * @return array email - pattern: array('email'=>,'name'=>)
 	 */
 	public function splitEmail($email, $abortOnError = false) {