#18048194 * 공백이 포함된 이모티콘 디렉토리를 목록에서 제외하도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6522 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
bnu 2009-06-11 09:11:07 +00:00
parent 5ba17c4856
commit 0eed26a530

View file

@ -2,10 +2,10 @@
/**
* @class emoticon
* @author zero (zero@nzeo.com)
* @brief 이모티콘 이미지 연결 컴포넌트
* @brief 이모티콘 이미지 연결 컴포넌트
**/
class emoticon extends EditorHandler {
class emoticon extends EditorHandler {
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
var $editor_sequence = 0;
@ -33,10 +33,10 @@
$this->add('emoticons', implode("\n",$list));
}
/**
* @brief 재귀적으로 이모티콘이 법한 파일들을 하위 디렉토리까지 전부 검색한다. 8,000개까지는 테스트 해봤는데 스택오버프로우를 일으킬지 어떨지는 모르겠음.(2007.9.6, 베니)
**/
function getEmoticons($path) {
/**
* @brief 재귀적으로 이모티콘이 법한 파일들을 하위 디렉토리까지 전부 검색한다. 8,000개까지는 테스트 해봤는데 스택오버프로우를 일으킬지 어떨지는 모르겠음.(2007.9.6, 베니)
**/
function getEmoticons($path) {
$emoticon_path = sprintf("%s/%s", $this->emoticon_path, $path);
$output = array();
@ -48,14 +48,20 @@
$oDir->close();
if(count($output)) asort($output);
return $output;
}
}
/**
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
**/
function getPopupContent() {
// 이모티콘 디렉토리 목록을 가져옴
$emoticon_list = FileHandler::readDir($this->emoticon_path);
$emoticon_dirs = FileHandler::readDir($this->emoticon_path);
$emoticon_list = array();
if($emoticon_dirs) {
foreach($emoticon_dirs as $emoticon) {
if(preg_match("/^([a-z0-9\_]+)$/i", $emoticon)) $emoticon_list[] = $emoticon;
}
}
Context::set('emoticon_list', $emoticon_list);
// 첫번째 이모티콘 디렉토리의 이미지 파일을 구함
@ -70,10 +76,10 @@
return $oTemplate->compile($tpl_path, $tpl_file);
}
/**
* @brief 이모티콘의 경로 문제 해결을 하기 위해 추가하였다. (2007.9.6 베니)
**/
function transHTML($xml_obj) {
/**
* @brief 이모티콘의 경로 문제 해결을 하기 위해 추가하였다. (2007.9.6 베니)
**/
function transHTML($xml_obj) {
$src = $xml_obj->attrs->src;
$alt = $xml_obj->attrs->alt;