Merge pull request #1 from rhymix/develop

Develop
This commit is contained in:
BJRambo 2016-01-15 14:02:16 +09:00
commit d44a4096e1
336 changed files with 6580 additions and 11941 deletions

4
.gitattributes vendored
View file

@ -2,7 +2,5 @@
.gitignore export-ignore
/tools/ export-ignore
/tests/ export-ignore
/phpDoc/ export-ignore
Gruntfile.js export-ignore
package.json export-ignore
.travis.yml export-ignore
.travis.yml export-ignore

3
.gitignore vendored
View file

@ -8,6 +8,9 @@ config.user.inc.php
codeception.yml
/tests/_output/
/tests/*.suite.yml
/tests/_support/InstallTester.php
/tests/_support/UnitTester.php
/tests/_support/_generated/
/node_modules/
/bower_components/

View file

@ -1,9 +0,0 @@
common/js/jquery*.js
common/js/modernizr.js
common/js/xe.js
common/js/x.js
common/js/*.min.js
common/js/unittest/*
common/js/plugins/*
common/js/foggyLayer.js
common/js/html5.js

View file

@ -1,68 +0,0 @@
{
"globalstrict": false,
"undef": false,
"eqeqeq": false,
"browser": true,
"devel": true,
"jquery": true,
"evil": true,
"globals": {
"window": true,
"current_url": true,
"exec_json": true,
"exec_xml": true,
"procFilter": true,
"xe": true,
"request_uri": true,
"xAddEventListener": false,
"xResizeEvent": false,
"xScrollEvent": false,
"xAppendChild": false,
"xClientHeight": false,
"xClientWidth": false,
"xCreateElement": false,
"xDef": false,
"xDeleteCookie": false,
"xDisplay": false,
"xEvent": false,
"xFirstChild": false,
"xGetBodyWidth": false,
"xGetBodyHeight": false,
"xGetComputedStyle": false,
"xGetCookie": false,
"xGetElementById": false,
"xGetElementsByAttribute": false,
"xGetElementsByClassName": false,
"xGetElementsByTagName": false,
"xGetURLArguments": false,
"xHeight": false,
"xHex": false,
"xHide": false,
"xInnerHtml": false,
"xLeft": false,
"xMoveTo": false,
"xName": false,
"xNextSib": false,
"xNum": false,
"xOffsetLeft": false,
"xOffsetTop": false,
"xPad": false,
"xPageX": false,
"xPageY": false,
"xParent": false,
"xPreventDefault": false,
"xPrevSib": false,
"xRemoveEventListener": false,
"xResizeTo": false,
"xScrollLeft": false,
"xScrollTop": false,
"xSetCookie": false,
"xShow": false,
"xStr": false,
"xTop": false,
"xVisibility": false,
"xWidth": false,
"xZIndex": false,
"xStopPropagation": false
}
}

View file

@ -12,18 +12,16 @@ matrix:
fast_finish: true
sudo: false
before_script:
- npm install -g grunt-cli
- npm install
- mysql -e "CREATE DATABASE xe_test;"
- echo "USE mysql;\nUPDATE user SET password=PASSWORD('travis') WHERE user='travis';\nFLUSH PRIVILEGES;\n" | mysql -u root
- npm install grunt grunt-cli grunt-contrib-jshint grunt-contrib-csslint grunt-phplint --save-dev
- mysql -u root -e "CREATE DATABASE rhymix"
- mysql -u root -e "SET PASSWORD FOR 'travis'@'localhost' = PASSWORD('travis')"
- php -S localhost:8000 &
- if [ $(phpenv version-name) == "5.3" ]; then touch codecept.phar; fi
- if [ $(phpenv version-name) == "5.4" ]; then wget http://codeception.com/releases/2.0.16/codecept.phar; fi
- if [ ! -f codecept.phar ]; then wget http://codeception.com/codecept.phar; fi
script:
- grunt lint
- grunt minify
- if [ -f codecept.phar ]; then php codecept.phar build; fi
- if [ -f codecept.phar ]; then php codecept.phar run -d --fail-fast --env travis; fi
- grunt lint
notifications:
email: false

View file

@ -1,25 +1,150 @@
# Contribution Guide
# 개발에 참여하고 싶으신 분들께 드리는 안내문
## Issue 작성
Issue 작성 시 참고해주세요.
## 이슈 작성
* 작성하려는 이슈가 이미 있는지 검색 후 등록해주세요. 비슷한 이슈가 있다면 댓글로 추가 내용을 덧붙일 수 있습니다.
* 이슈에는 하나의 문제 또는 제안을 작성해주세요. 절대 하나의 이슈에 2개 이상의 내용을 적지마세요.
* 이슈는 가능한 상세하고 간결하게 작성해주세요.
* 필요하다면 화면을 캡처하여 이미지를 업로드할 수 있습니다.
- **구글에서 답을 찾을 수 있는지 먼저 확인해 주십시오.**
- 관련된 이슈가 이미 있는지 검색하고, 같은 내용이라면 댓글로 덧붙여 주십시오.
오래된 이슈라도 메일로 알림이 전달되므로 묻힐 염려가 없습니다.
- 무관한 이슈에 댓글을 달지 말아 주십시오. 엉뚱한 사람에게 메일 알림이 전달됩니다.
- 2가지 이상 서로 다른 문제가 있는 경우, 각각 이슈를 등록해 주십시오.
- 보안 취약점은 공개적으로 언급하지 말고 devops@rhymix.org로 알려 주시면 감사하겠습니다.
- **버그 신고 전 자신의 서버가 RhymiX의 실행 환경을 충족하는지 확인해 주십시오.**
- PHP 5.3 미만, EUC-KR 환경, 퍼미션 오류 등은 호스팅 업체에 문의하셔야 합니다.
- 자신의 서버 환경은 `phpinfo`를 사용하여 확인할 수 있습니다.
- **버그 신고에는 아래의 내용을 반드시 포함시켜 주십시오.**
- 실행 환경
- 호스팅 환경에 대한 간단한 설명 (예: ○○24 리눅스 웹호스팅)
- RhymiX 버전 (예: 1.8.15)
- PHP 버전 (예: 5.6.16)
- 브라우저 종류 및 버전 (예: IE 11)
- 에러가 발생하는 경우 에러 메시지 전체
- 화면상에 에러가 표시되거나 디자인이 깨져 보이는 경우, 해당 스크린샷
- 브라우저의 개발자도구(F12)에 에러가 표시되는 경우, 콘솔 및 네트워크 탭의 스크린샷
- 증상을 확인해 볼 수 있는 웹사이트 주소
- 내부망이나 로컬 개발환경 등 외부인의 접속이 원천적으로 불가능한 경우가 아니라면 반드시 주소를 남겨 주시기 바랍니다.
## Pull request(PR)
* `master` 브랜치의 코드는 수정하지마세요.
* PR은 `develop` 브랜치만 허용합니다.
* `develop` 브랜치를 부모로 한 토픽 브랜치를 활용하면 편리합니다.
## 풀 리퀘스트(PR) 작성
- 자신의 저장소에서 별도의 브랜치를 만들어 작업하신 후, `develop` 브랜치로 풀 리퀘스트를 넣어주시면 됩니다.
- 예: 썸네일 관련 버그를 수정하는 경우 자신의 저장소에서 `fix/thumbnail` 브랜치를 만들어 작업하십시오.
작성 후에 수정할 것이 있으면 이 브랜치에서 계속 작업하고 커밋하시면 됩니다. PR 페이지에 자동으로 반영됩니다.
- 개발 진행 및 안정화에 따라 브랜치별 운영 정책이 변경될 수 있으니 유의하십시오.
- 아래의 코딩 규칙을 지키려고 노력해 주시기 바랍니다.
- 코딩 규칙에 맞지 않는 소스를 발견하더라도 PR의 주제외 관계없는 부분은 함부로 고치지 마세요!
코딩 규칙에 맞도록 소스를 수정하는 작업은 모두 별도의 PR로 처리하여야 합니다.
- 단, PR을 검토하는 개발자들은 괄호의 위치와 같은 사소한 문제를 지적하느라고
실제 기능에 관심을 주지 못하는 오류를 범하지 않도록 노력해야 합니다.
## Coding Guidelines
코드를 기여할 때 Coding conventions을 따라야합니다.
## 코딩 규칙
* 모든 text 파일의 charset은 BOM이 없는 UTF-8입니다.
* newline은 UNIX type을 사용합니다. 일부 파일이 다른 type을 사용하더라도 절대 고치지 마세요!
* 들여쓰기는 1개의 탭으로 합니다.
* class 선언과 function, if, foreach, for, while 등 중괄호의 `{}`는 다음 줄에 있어야 합니다.
* 마찬가지로 선언 다음에는 공백을 두지 않습니다. ex) CORRECT `if(...)`, INCORRECT `if (...)`
* **Coding convention에 맞지 않는 코드를 발견 하더라도 목적과 관계 없는 코드는 절대 고치지 마세요.**
### 일반
PHP, HTML, XML, CSS, JS 등 모든 텍스트 파일의 문자셋은 BOM이 없는 UTF-8입니다.
줄바꿈 문자는 유닉스 방식(`LF`)을 따릅니다.
윈도우 메모장에서 편집한 파일은 위의 두 가지 규칙에 어긋납니다.
윈도우 사용자는 [Notepad++](https://notepad-plus-plus.org/) 등의 개발자용 에디터를 사용하여 편집하시기 바랍니다.
들여쓰기는 1개의 탭으로 합니다.
단, 탭 대신 공백을 사용하는 파일에서는 일관성 유지를 위해 4칸의 공백을 사용할 수 있습니다.
PHP 코드만으로 이루어진 파일은 맨 끝에 `?>` 태그를 사용하지 않습니다.
### 공백 및 줄바꿈 규칙
클래스 및 함수 선언과 `if`, `for`, `foreach`, `while` 등의 중괄호는 다음 줄에 씁니다.
class Foo
{ // RIGHT
public function bar() { // WRONG
}
}
단, 클로져는 같은 줄에 중괄호를 쓸 수 있으며, 이 경우 중괄호 앞뒤에 한 칸씩 공백을 둡니다.
닫는 중괄호와 그 뒤의 기호 사이에는 공백을 두지 않습니다.
$foo = function($bar) { return $bar + 1; }; // RIGHT
$foo = function($bar){return $bar + 1;}; // WRONG
자바스크립트에서는 거의 모든 함수가 클로져이며, 잘못 줄바꿈할 경우 세미콜론이 삽입될 수 있으므로
중괄호를 다음 줄에 쓰지 않아도 됩니다.
$("#foo").on("click", function() { // OK
if ($(this).val() === "bar") { // OK
$(this).val("baz");
}
});
함수 호출시 함수명과 괄호 사이, 괄호와 인자 사이에 공백을 두지 않습니다.
인자를 구분하는 쉼표는 뒤쪽에만 한 칸의 공백을 둡니다.
function foobar($baz, $param) // RIGHT
function foobar ( $baz , $param ) // WRONG
`if`, `for`, `foreach`, `while` 등의 키워드 뒤에는 한 칸의 공백을 둘 수 있으며,
`==`, `!=`, `>` 등의 연산자는 앞뒤에 한 칸씩 공백을 둡니다.
if ($foo === $bar) // RECOMMENDED
if($foo === $bar) // OK for XE Compatibility
if($foo==$bar){ // WRONG
### 주석
주석은 관련 코드 윗줄에 써야 합니다. 조건문이나 루프의 경우에도 마찬가지입니다.
// If foo is bar, do something.
if ($foo->isBar())
{
// Note: this will do X, Y, and Z.
$foo->doSomething();
}
// Otherwise, do something else.
else
{
// TODO: Refactor this later.
$foo->doSomethingElse();
}
모든 클래스와 함수에는 `/**`으로 시작하는 PHPDoc 방식의 주석을 붙여야 합니다.
PHPDoc 주석 작성에 어려움이 있는 경우, 다른 클래스와 함수의 주석을 참고하십시오.
/**
* This is the Foo class.
*/
class Foo
{
/**
* Constructor.
*
* @param string $member_srl
*/
public function __construct($member_srl)
{
// 생략
}
/**
* Check if this Foo is bar.
*
* @return bool
*/
public function isBar()
{
return true;
}
}
불가피한 경우를 제외하면 주석은 영문으로 쓰는 것을 원칙으로 하며,
대문자로 시작하는 완전한 문장으로 이루어져야 합니다.
### 기타
RhymiX에서 정한 `error_reporting` 설정 하에서 어떤 에러도 발생하지 않도록 하는 것을 목표로 합니다.
문자열과 문자열, 정수와 정수를 비교할 때는 가능하면 `==` 대신 `===`을 사용합니다.
실제 자료형이 다를 가능성이 있는 경우 `intval()`, `strval()` 등의 함수와 함께 사용합니다.
여기에서 규정하지 않은 내용은 [PSR-1](http://www.php-fig.org/psr/psr-1/)과
[PSR-2](http://www.php-fig.org/psr/psr-2/)를 따릅니다.

View file

@ -1 +1,2 @@
Copyright (C) NAVER <http://www.navercorp.com>
Copyright (c) RhymiX Developers and Contributors <devops@rhymix.org>
Copyright (c) NAVER <http://www.navercorp.com>

View file

@ -1,160 +1,9 @@
module.exports = function(grunt) {
"use strict";
var banner = '/*! Copyright (C) NAVER <http://www.navercorp.com> */\n';
var banner_xe_js = banner + '/**!\n * @concat modernizr.js + common.js + js_app.js + xml_handler.js + xml_js_filter.js\n * @brief XE Common JavaScript\n **/\n';
grunt.file.defaultEncoding = 'utf8';
grunt.initConfig({
clean: {
minify: [
'common/js/xe.js',
'common/js/xe.min.js',
'common/css/xe.min.css',
'common/css/mobile.min.css'
]
},
concat: {
'common-js': {
options: {
stripBanners: true,
banner: banner_xe_js
},
src: [
'common/js/modernizr.js',
'common/js/common.js',
'common/js/js_app.js',
'common/js/xml_handler.js',
'common/js/xml_js_filter.js'
],
dest: 'common/js/xe.js'
},
'xpresseditor': {
options: {
stripBanners: true,
banner: '/**!\n * @concat Xpress_Editor.js + xe_interface.js \n **/\n'
},
src: [
'modules/editor/skins/xpresseditor/js/Xpress_Editor.js',
'modules/editor/skins/xpresseditor/js/xe_interface.js',
],
dest: 'modules/editor/skins/xpresseditor/js/xpresseditor.js'
}
},
uglify: {
'common-js': {
options: {
banner: banner_xe_js
},
files: {
'common/js/xe.min.js': ['common/js/xe.js'],
}
},
'common-js-plugins': {
files: {
'common/js/plugins/jquery.fileupload/js/main.min.js': ['common/js/plugins/jquery.fileupload/js/main.js'],
}
},
'handlebars': {
files: {
'common/js/plugins/handlebars/handlebars.min.js': ['common/js/plugins/handlebars/handlebars.js'],
'common/js/plugins/handlebars.runtime/handlebars.runtime.min.js': ['common/js/plugins/handlebars.runtime/handlebars.runtime.js'],
}
},
'modules': {
files: {
'common/js/x.min.js' : ['common/js/x.js'],
// addon
'addons/captcha/captcha.min.js' : ['addons/captcha/captcha.js'],
'addons/captcha_member/captcha.min.js' : ['addons/captcha_member/captcha.js'],
'addons/resize_image/js/resize_image.min.js' : ['addons/resize_image/js/resize_image.js'],
// module/editor
'modules/editor/skins/xpresseditor/js/xpresseditor.min.js': ['modules/editor/skins/xpresseditor/js/xpresseditor.js'],
'modules/editor/skins/xpresseditor/js/xe_textarea.min.js': ['modules/editor/skins/xpresseditor/js/xe_textarea.js'],
'modules/editor/skins/ckeditor/js/default.min.js': ['modules/editor/skins/ckeditor/js/default.js'],
'modules/editor/skins/ckeditor/js/xe_interface.min.js': ['modules/editor/skins/ckeditor/js/xe_interface.js'],
'modules/editor/skins/ckeditor/js/xe_textarea.min.js': ['modules/editor/skins/ckeditor/js/xe_textarea.js'],
'modules/editor/tpl/js/editor_common.min.js': ['modules/editor/tpl/js/editor_common.js'],
'modules/editor/tpl/js/swfupload.min.js': ['modules/editor/tpl/js/swfupload.js'],
'modules/editor/tpl/js/uploader.min.js': ['modules/editor/tpl/js/uploader.js'],
'modules/editor/tpl/js/editor.min.js': ['modules/editor/tpl/js/editor.js'],
'modules/editor/tpl/js/editor_module_config.min.js': ['modules/editor/tpl/js/editor_module_config.js'],
'modules/editor/tpl/js/editor.app.min.js': ['modules/editor/tpl/js/editor.app.js'],
// module/admin
'modules/admin/tpl/js/admin.min.js': ['modules/admin/tpl/js/admin.js'],
'modules/admin/tpl/js/config.min.js': ['modules/admin/tpl/js/config.js'],
'modules/admin/tpl/js/menu_setup.min.js': ['modules/admin/tpl/js/menu_setup.js'],
//module/board
'modules/board/tpl/js/board.min.js': ['modules/board/tpl/js/board.js'],
'modules/board/tpl/js/board_admin.min.js': ['modules/board/tpl/js/board_admin.js'],
'modules/board/skins/default/board.default.min.js': ['modules/board/skins/default/board.default.js'],
'modules/board/m.skins/default/js/mboard.min.js': ['modules/board/m.skins/default/js/mboard.js'],
'modules/board/m.skins/simpleGray/js/mboard.min.js': ['modules/board/m.skins/simpleGray/js/mboard.js'],
'modules/board/skins/xedition/board.default.min.js': ['modules/board/skins/xedition/board.default.js'],
// editor-component-image-gallery
'modules/editor/components/image_gallery/tpl/gallery.min.js' : ['modules/editor/components/image_gallery/tpl/gallery.js'],
'modules/editor/components/image_gallery/tpl/list_gallery.min.js' : ['modules/editor/components/image_gallery/tpl/list_gallery.js'],
'modules/editor/components/image_gallery/tpl/popup.min.js' : ['modules/editor/components/image_gallery/tpl/popup.js'],
'modules/editor/components/image_gallery/tpl/slide_gallery.min.js' : ['modules/editor/components/image_gallery/tpl/slide_gallery.js'],
// module/importer
'modules/importer/tpl/js/importer_admin.min.js': ['modules/importer/tpl/js/importer_admin.js'],
// modules/widget
'modules/widget/tpl/js/generate_code.min.js': ['modules/widget/tpl/js/generate_code.js'],
'modules/widget/tpl/js/widget.min.js': ['modules/widget/tpl/js/widget.js'],
'modules/widget/tpl/js/widget_admin.min.js': ['modules/widget/tpl/js/widget_admin.js'],
// modules/poll
'modules/poll/tpl/js/poll_admin.min.js': ['modules/poll/tpl/js/poll_admin.js'],
'modules/poll/tpl/js/poll.min.js': ['modules/poll/tpl/js/poll.js'],
'addons/oembed/jquery.oembed.min.js': ['addons/oembed/jquery.oembed.js'],
'addons/oembed/oembed.min.js': ['addons/oembed/oembed.js'],
}
},
'layout': {
files: {
'layouts/xedition/js/layout.min.js': ['layouts/xedition/js/layout.js'],
'layouts/xedition/js/welcome.min.js': ['layouts/xedition/js/welcome.js'],
}
},
},
cssmin: {
'common': {
files: {
'common/css/xe.min.css': ['common/css/xe.css'],
'common/css/mobile.min.css': ['common/css/mobile.css']
}
},
'modules': {
files: {
'modules/admin/tpl/css/admin.min.css': ['modules/admin/tpl/css/admin.css'],
'modules/editor/components/image_gallery/tpl/popup.min.css': ['modules/editor/components/image_gallery/tpl/popup.css'],
'modules/editor/components/image_gallery/tpl/slide_gallery.min.css': ['modules/editor/components/image_gallery/tpl/slide_gallery.css'],
'modules/widget/tpl/css/widget.min.css': ['modules/widget/tpl/css/widget.css'],
'modules/poll/tpl/css/poll.min.css': ['modules/poll/tpl/css/poll.css'],
'modules/poll/skins/default/css/poll.min.css': ['modules/poll/skins/default/css/poll.css'],
'modules/poll/skins/simple/css/poll.min.css': ['modules/poll/skins/simple/css/poll.css'],
'modules/editor/skins/xpresseditor/css/default.min.css': ['modules/editor/skins/xpresseditor/css/default.css'],
'modules/board/skins/default/board.default.min.css': ['modules/board/skins/default/board.default.css'],
'modules/board/m.skins/default/css/mboard.min.css': ['modules/board/m.skins/default/css/mboard.css'],
'modules/board/m.skins/simpleGray/css/mboard.min.css': ['modules/board/m.skins/simpleGray/css/mboard.css'],
'modules/board/skins/xedition/board.default.min.css': ['modules/board/skins/xedition/board.default.css'],
}
},
'addons': {
files: {
'addons/oembed/jquery.oembed.min.css': ['addons/oembed/jquery.oembed.css'],
}
},
'layout': {
files: {
'layouts/xedition/css/layout.min.css': ['layouts/xedition/css/layout.css'],
'layouts/xedition/css/webfont.min.css': ['layouts/xedition/css/webfont.css'],
'layouts/xedition/css/welcome.min.css': ['layouts/xedition/css/welcome.css'],
'layouts/xedition/css/widget.login.min.css': ['layouts/xedition/css/widget.login.css'],
'layouts/xedition/css/xeicon.min.css': ['layouts/xedition/css/xeicon.css'],
}
},
},
jshint: {
files: [
'Gruntfile.js',
@ -213,7 +62,6 @@ module.exports = function(grunt) {
options: {
phpCmd: "php",
},
src: [
"**/*.php",
"!files/**",
@ -227,184 +75,10 @@ module.exports = function(grunt) {
},
}
});
function createPackageChecksum(target_file) {
/* https://gist.github.com/onelaview/6475037 */
var fs = require('fs');
var crypto = require('crypto');
var md5 = crypto.createHash('md5');
var file = grunt.template.process(target_file);
var buffer = fs.readFileSync(file);
md5.update(buffer);
var md5Hash = md5.digest('hex');
grunt.verbose.writeln('file md5: ' + md5Hash);
var md5FileName = file + '.md5';
grunt.file.write(md5FileName, md5Hash);
grunt.verbose.writeln('File "' + md5FileName + '" created.').writeln('...');
}
grunt.registerTask('build', '', function(A, B) {
var _only_export = false;
var tasks = ['krzip', 'syndication'];
if(!A) {
grunt.fail.warn('Undefined build target.');
} else if(A && !B) {
_only_export = true;
}
if(!_only_export) {
tasks.push('changed');
target = A + '...' + B;
version = B;
} else {
target = A;
version = A;
}
var done = this.async();
var build_dir = 'build';
var archive_full = build_dir + '/xe.' + version + '.tar.gz';
var archive_changed = build_dir + '/xe.' + version + '.changed.tar.gz';
var diff, target, version;
var taskDone = function() {
tasks.pop();
grunt.verbose.writeln('remain tasks : '+tasks.length);
if(tasks.length === 0) {
grunt.util.spawn({
cmd: "tar",
args: ['cfz', '../xe.'+version+'.tar.gz', './'],
opts: {
cwd: 'build/xe',
cache: false
}
}, function (error, result, code) {
grunt.log.ok('Archived(full) : ' + build_dir + '/xe.'+version+'.tar.gz');
createPackageChecksum(build_dir + '/xe.'+version+'.tar.gz');
grunt.util.spawn({
cmd: "zip",
args: ['-r', '../xe.'+version+'.zip', './'],
opts: {
cwd: 'build/xe',
cache: false
}
}, function (error, result, code) {
grunt.log.ok('Archived(full) : ' + build_dir + '/xe.'+version+'.zip');
createPackageChecksum(build_dir + '/xe.'+version+'.zip');
grunt.file.delete('build/xe');
grunt.file.delete('build/temp.full.tar');
grunt.util.spawn({
cmd: "git",
args: ['diff', '--name-status', target]
}, function (error, result, code) {
var fs = require('fs');
result = 'Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R).' + grunt.util.linefeed + result;
grunt.file.write(build_dir + '/CHANGED.' + version + '.txt', result);
grunt.log.ok('Done!');
});
});
});
}
};
if(grunt.file.isDir(build_dir)) {
grunt.file.delete(build_dir);
}
grunt.file.mkdir(build_dir);
grunt.file.mkdir(build_dir + '/xe');
grunt.log.subhead('Archiving...');
grunt.log.writeln('Target : ' + target);
grunt.util.spawn({
cmd: "git",
args: ['archive', '--output=build/temp.full.tar', version, '.']
}, function (error, result, code){
if(!_only_export) {
// changed
grunt.util.spawn({
cmd: "git",
args: ['diff', '--name-only', '--diff-filter' ,'ACM', target]
}, function (error, result, code) {
diff = result.stdout;
if(diff) {
diff = diff.split(grunt.util.linefeed);
}
// changed
if(diff.length) {
var args_tar = ['archive', '-o', 'build/xe.'+version+'.changed.tar.gz', version];
var args_zip = ['archive', '-o', 'build/xe.'+version+'.changed.zip', version];
args_tar = args_tar.concat(diff);
args_zip = args_zip.concat(diff);
grunt.util.spawn({
cmd: "git",
args: args_tar
}, function (error, result, code) {
grunt.log.ok('Archived(changed) : ' + build_dir + '/xe.'+version+'.changed.tar.gz');
createPackageChecksum(build_dir + '/xe.'+version+'.changed.tar.gz');
grunt.util.spawn({
cmd: "git",
args: args_zip
}, function (error, result, code) {
grunt.log.ok('Archived(changed) : ' + build_dir + '/xe.'+version+'.changed.zip');
createPackageChecksum(build_dir + '/xe.'+version+'.changed.zip');
taskDone();
});
});
} else {
taskDone();
}
});
}
// full
grunt.util.spawn({
cmd: "tar",
args: ['xf', 'build/temp.full.tar', '-C', 'build/xe']
}, function (error, result, code) {
// krzip
grunt.util.spawn({
cmd: "git",
args: ['clone', '-b', 'master', 'git@github.com:xpressengine/xe-module-krzip.git', 'build/xe/modules/krzip']
}, function (error, result, code) {
grunt.file.delete('build/xe/modules/krzip/.git');
taskDone();
});
// syndication
grunt.util.spawn({
cmd: "git",
args: ['clone', '-b', 'master', 'git@github.com:xpressengine/xe-module-syndication.git', 'build/xe/modules/syndication']
}, function (error, result, code) {
grunt.file.delete('build/xe/modules/syndication/.git');
taskDone();
});
});
});
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-phplint');
grunt.registerTask('default', ['jshint', 'csslint']);
grunt.registerTask('lint', ['jshint', 'csslint', 'phplint']);
grunt.registerTask('minify', ['jshint', 'csslint', 'clean', 'concat', 'uglify', 'cssmin']);
};

View file

@ -1,11 +1,12 @@
Copyright (c) RhymiX Developers and Contributors <devops@rhymix.org>
Copyright (C) NAVER <http://www.navercorp.com>
XE is an opensource and being developed in the opensource project.
RhymiX is an opensource and being developed in the opensource project.
For more information, please see the link below.
- Official website: http://www.xpressengine.com
- Official Repository: http://github.com/xpressengine/
"XpressEngine (XE)" is free software; you can redistribute it and/or
RhymiX is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

View file

@ -1,10 +1,63 @@
XpressEngine XETOWN Remix
=========================
[![RhymiX](https://cloud.githubusercontent.com/assets/8565457/12227560/ba15b514-b871-11e5-802a-d5e88db2e393.png)](https://www.rhymix.org)
develop 브랜치에서 쓸만한 PR Merge!
RhymiX(라이믹스)는 누구든지 쉽고 자유롭게 독립적인 홈페이지를 만들어
자신을 표현하고 커뮤니티를 키워나갈 수 있도록 돕기 위한 CMS(content management system)입니다.
xe core 새버전이 나오면 master 브랜치에서 Merge후 develop 브랜치와 최종 Merge!
XETOWN 커뮤니티에서 [XE](https://www.xpressengine.com)를 fork(가지치기)하여 진행하는 프로젝트로,
누구나 무료로 사용할 수 있고 개발에 참여할 수도 있는 자유 소프트웨어(free software)입니다.
develop 브랜치에서 커밋 가능. (소스수정)
RhymiX는 "시를 짓다, 운을 맞추다"라는 의미의 "rhyme"과
"조합하다, 변주하다"라는 의미의 "remix"를 합친 이름입니다.
라이믹스는 인터넷 공간에서 자유롭게 창작 활동을 하고
다양한 소프트웨어와 콘텐츠를 조합하여 새로운 것을 만들어내는 모든 사용자들을 응원합니다.
참여하실 분들은 conory(conorycom@gmail.com) 에게 알려주시면 Collaborators 으로 등록해드리겠습니다.
### 개발 방향
RhymiX는 개발자와 사용자가 서로의 권리와 책임을 존중하는 인터넷 생태계,
중앙집중형 SNS 플랫폼에 의존하지 않고도 누구나 내 목소리를 낼 수 있는 세상,
벤처기업이나 스타트업의 개발자들뿐 아니라 평범한 블로거, 동호회, 학생, 장애인 등도
사이버 공간에 당당하게 집을 짓고 서로 소통할 수 있는 미래를 만들어가길 원합니다.
개발자 위주, 서비스 제공자 위주로 나아가는 현대의 IT 동향을 무차별적으로 받아들이기보다는
사용자의 주권과 열린 인터넷 환경을 보호하는 기술을 집중적으로 발굴하며,
우리나라 인터넷 커뮤니티의 성장을 이끌었던 90년대 제로보드와 2000년대 XE의 정신을 이어받아
2016년 현재 위기에 처한 오픈 웹을 지키고 회복시키는 일에 앞장서고자 합니다.
그러기 위해서는 다른 어떤 CMS보다도 일반 사용자를 위한 편리성이 가장 뛰어나야 합니다.
- 초보자도 쉽게 클릭 몇 번으로 웹사이트를 완성할 수 있을 만큼 편리한 CMS
- 최신 기술을 적극적으로 사용하고 속도가 빠르며 보안이 우수한 CMS
- 커뮤니티를 통해 사용자와 개발자의 건전한 의사소통을 돕는 CMS
- **애드온, 모듈, 위젯 등 기존 XE 서드파티 자료와의 호환성 100% 목표!**
### 설치 환경
- PHP 5.3 이상 (PHP 5.5 이상 권장, PHP 7 지원)
- MYSQL 4.1 이상 (MySQL 5.0 이상 또는 MariaDB 권장)
- 필수 모듈: curl, gd, iconv _or_ mbstring, json, mcrypt _or_ openssl, xml
- php.ini에서 session.auto_start = Off로 설정되어 있어야 합니다.
- 설치 폴더 또는 files 폴더에 쓰기 권한이 주어져야 합니다.
### 개발 참여
RhymiX는 개발자, 디자이너, 번역가 등의 도움과 일반 사용자들의 버그 신고를 환영합니다.
참여를 원하시는 분은 질서있고 효율적인 프로젝트 운영을 위해
[CONTRIBUTING.md](./CONTRIBUTING.md)를 먼저 읽어 주시기 바랍니다.
보안 취약점을 발견하셨다면 해커들에게 알려지기 전에 먼저 패치를 작성할 수 있도록
devops@rhymix.org로 알려 주시면 감사하겠습니다.
### 공식 홈페이지
- XETOWN : https://www.xetown.com
- RhymiX : https://www.rhymix.org
### 저작권 및 라이선스
RhymiX는 [XpressEngine](https://www.xpressengine.com)에 바탕을 두고 있습니다.
XpressEngine의 저작권은 [NAVER](https://www.navercorp.com/)에게 있습니다.
RhymiX 개발자들이 추가 및 변경한 부분의 저작권은 해당 개발자들에게 있습니다.
별도의 결정이 있을 때까지 라이선스는 XpressEngine과 동일한 LGPL 2.1을 유지하며,
LGPL 2.1의 관련 조항에 따라 LGPL 3.0, GPL 2, GPL 3 등으로 전환하여 사용할 수도 있습니다.

View file

@ -11,11 +11,6 @@ if(!defined('__XE__'))
*/
if($called_position == 'after_module_proc' && Context::getResponseMethod() == "HTML")
{
if(Mobile::isFromMobilePhone())
{
Context::addJsFile('./common/js/jquery.min.js', false, '', -1000000);
Context::addJsFile('./common/js/xe.min.js', false, '', -1000000);
}
Context::loadFile(array('./addons/autolink/autolink.js', 'body', '', null), true);
}
/* End of file autolink.addon.php */

View file

@ -11,13 +11,6 @@ if(!defined("__XE__")) exit();
* */
if(!class_exists('AddonCaptcha', false))
{
// On the mobile mode, XE Core does not load jquery and xe.js as normal.
if(Mobile::isFromMobilePhone())
{
Context::loadFile(array('./common/js/jquery.min.js', 'head', NULL, -100000), true);
Context::loadFile(array('./common/js/xe.min.js', 'head', NULL, -100000), true);
}
class AddonCaptcha
{
@ -81,7 +74,7 @@ if(!class_exists('AddonCaptcha', false))
if(!captchaTargetAct) {var captchaTargetAct = [];}
captchaTargetAct.push("' . implode('","', $this->target_acts) . '");
</script>');
Context::loadFile(array('./addons/captcha/captcha.min.js', 'body', '', null), true);
Context::loadFile(array('./addons/captcha/captcha.js', 'body', '', null), true);
}
}
@ -347,7 +340,7 @@ if(!class_exists('AddonCaptcha', false))
$this->createKeyword();
$swfURL = getUrl() . 'addons/captcha/swf/play.swf';
Context::unloadFile('./addons/captcha/captcha.min.js');
Context::unloadFile('./addons/captcha/captcha.js');
Context::loadFile(array('./addons/captcha/inline_captcha.js', 'body'));
global $lang;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -11,13 +11,6 @@ if(!defined("__XE__")) exit();
* */
if(!class_exists('AddonMemberCaptcha', false))
{
// On the mobile mode, XE Core does not load jquery and xe.js as normal.
if(Mobile::isFromMobilePhone())
{
Context::loadFile(array('./common/js/jquery.min.js', 'head', NULL, -100000), true);
Context::loadFile(array('./common/js/xe.min.js', 'head', NULL, -100000), true);
}
class AddonMemberCaptcha
{
var $addon_info;
@ -92,7 +85,7 @@ if(!class_exists('AddonMemberCaptcha', false))
if(!captchaTargetAct) {var captchaTargetAct = [];}
captchaTargetAct.push("' . implode('","', $this->target_acts) . '");
</script>');
Context::loadFile(array('./addons/captcha_member/captcha.min.js', 'body', '', null), true);
Context::loadFile(array('./addons/captcha_member/captcha.js', 'body', '', null), true);
}
}
@ -358,7 +351,7 @@ if(!class_exists('AddonMemberCaptcha', false))
$this->createKeyword();
$swfURL = getUrl() . 'addons/captcha_member/swf/play.swf';
Context::unloadFile('./addons/captcha_member/captcha.min.js');
Context::unloadFile('./addons/captcha_member/captcha.js');
Context::loadFile(array('./addons/captcha_member/inline_captcha.js', 'body'));
global $lang;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
!function(a){var b="(https?|ftp|news|telnet|irc|mms)://",c="(?:[\\w\\-]+\\.)+(?:[a-z]+)",d="(?:1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9]?[0-9])",e="(?:"+d+"\\.){3}"+d,f="(?::([0-9]+))?",g="(?:/~[\\w-]+)?",h='((?:/[\\w!"$-/:-@]+)*)',i="(?:#([\\w!-@]+))?",j=new RegExp("("+b+"("+c+"|"+e+"|localhost)"+f+g+h+i+")","ig"),k=xe.createPlugin("OEmbed",{targets:[],init:function(){this.targets=[],this.enableAutoLink=!1,this.castedOembedA=!1,this.embedSetting=[]},API_ONREADY:function(){var b=this;this.extractTargets(a(".xe_content")),this.oApp.getPlugin("autolink").length&&(this.enableAutoLink=!0),b.cast("OEMBEDA"),this.enableAutoLink||a(this.targets).each(function(){b.cast("OEMBED",[this])})},API_BEFORE_AUTOLINK:function(a,b){var c=this;c.cast("OEMBEDA")},API_AFTER_AUTOLINK:function(a,b){this.oembed(b[0])},API_OEMBED:function(b,c){if(!this.enableAutoLink){var d=c[0];if(!a(d).parent().length||"a"==a(d).parent().get(0).nodeName.toLowerCase())return void this.oembed(a(d));var e=d.nodeValue,f=a("<span>");e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(j,'<a href="$1" target="_blank">$1</a>'),a(d).before(f),a(d).replaceWith(e),c[0]=f.next("a"),f.remove(),this.oembed(c[0])}},API_OEMBEDA:function(b,c){if(!this.castedOembedA){var d=this;this.castedOembedA=!0,a(".read_body a").not("_oembed").each(function(){d.oembed(a(this))})}},oembed:function(b){var c=this;this.embedSetting.maxWidth||(this.embedSetting.maxWidth=a(".xe_content").width()),b&&(b&&3==b.nodeType&&(b=a(b)),b.oembed(null,c.embedSetting).addClass("_oembed"))},extractTargets:function(b){var c=this,d=a(".xe_content",b);return d.length?void this.extractTargets(d):void a(b).contents().each(function(){var b=this.nodeName.toLowerCase();if(-1==a.inArray(b,["a","pre","xml","textarea","input","select","option","code","script","style","iframe","button","img","embed","object","ins"]))if(j.exec(""),3==this.nodeType){var d=this.nodeValue;if(d.length<5)return;if(!/(http|https|ftp|news|telnet|irc|mms):\/\//i.test(d))return;c.targets.push(this)}else c.extractTargets(this)})}});xe.registerPlugin(new k)}(jQuery);

View file

@ -1 +0,0 @@
!function(a){function b(){var b,c,e,f,g,h=a(document.body);return d?(b=a("#xe_gallery_controls"),c=a("#xe_gallery_holder"),e=a("#xe_gallery_closebtn"),f=a("#xe_gallery_prevbtn"),g=a("#xe_gallery_nextbtn")):(d=a("<div>").attr("id","xe_gallery_screen").css({position:"fixed",display:"none",backgroundColor:"black",zIndex:500,opacity:.7}),b=a("<div>").attr("id","xe_gallery_controls").css({position:"fixed",display:"none",overflow:"hidden",zIndex:510}),f=a('<button type="button" id="xe_gallery_prevbtn" />').css({left:"10px",backgroundPosition:"0 -64px"}).click(function(){d.xePrev()}).appendTo(b),e=a('<button type="button" id="xe_gallery_closebtn" />').css({top:"10px",backgroundPosition:"0 0"}).click(function(){d.xeHide()}).appendTo(b),g=a('<button type="button" id="xe_gallery_nextbtn" />').attr("id","xe_gallery_nextbtn").css({right:"10px",backgroundPosition:"0 -128px"}).click(function(){d.xeNext()}).appendTo(b),b.find(">button").css({position:"absolute",width:"64px",height:"64px",zIndex:530,cursor:"pointer",border:0,margin:0,padding:0,backgroundColor:"transparent",backgroundImage:"url("+request_uri+"addons/resize_image/btn.png)",backgroundRepeat:"no-repeat",opacity:".5",filter:"alpha(opacity=50)"}).mouseover(function(){a(this).css({opacity:"1",filter:"alpha(opacity=100)"})}).mouseout(function(){a(this).css({opacity:".5",filter:"alpha(opacity=50)"})}).focus(function(){a(this).trigger("mouseover")}).blur(function(){a(this).trigger("mouseout")}),c=a(new Image),c.attr("id","xe_gallery_holder").css({border:"5px solid white",zindex:520,maxWidth:"none",borderRadius:"5px",boxShadow:"0 0 10px #000"}).appendTo(b).draggable(),h.append(d).append(b),c.live("load",function(){var b=a(window).width(),d=a(window).height();c.css({left:b/2-c.width()/2+"px",top:d/2-c.height()/2+"px"})}),d.xeShow=function(){var b=(a(window).width(),a(window).height());a("#xe_gallery_controls,#xe_gallery_screen").show().css({top:0,right:0,bottom:0,left:0}),a("#xe_gallery_prevbtn,#xe_gallery_nextbtn").css("top",Math.round(b/2-32)+"px"),this.xeMove(0)},d.xeHide=function(a){d.hide(),b.hide()},d.xePrev=function(){this.xeMove(-1)},d.xeNext=function(){this.xeMove(1)},d.xeMove=function(b){var d=a(window).width(),h=a(window).height();this.index+=b,f.css("visibility",this.index>0?"visible":"hidden"),g.css("visibility",this.index<this.list.size()-1?"visible":"hidden");var i=this.list.eq(this.index).attr("rawsrc");i||(i=this.list.eq(this.index).attr("src")),c.attr("src",i).removeAttr("width").removeAttr("height"),c.width()>0&&c.css({left:d/2-c.width()/2+"px",top:h/2-c.height()/2+"px"}),e.css({left:d/2-32+"px",top:"10px"}).focus()},a(document).keydown(function(a){return 27==a.which?(d.xeHide(),!1):!0})),d}function c(c){var d=a(this).closest(".xe_content"),e=d.find("img[rel=xe_gallery]"),f=a.inArray(a(this).get(0),e.get()),g=b();g.list=e,g.index=f,g.xeShow()}var d=null;a(window).load(function(){function b(a,c){if(c||(c=0),!(c>=10)){var d=this,e={width:d.width(),height:d.height()};if(!e.width||!e.height)return void setTimeout(function(){b.call(d,a,++c)},200);if(!(e.width<=a)){var f=a/e.width;d.removeAttr("width").removeAttr("height").css({width:a,height:parseInt(e.height*f,10)})}}}var d=/(?:(modules|addons|classes|common|layouts|libs|widgets|widgetstyles)\/)/i,e=/(?:common\/tpl\/images\/blank\.gif$)/i,f=a('<div style="height:1px;overflow:hidden;opacity:0;display:block;clear:both"></div>');a(".xe_content").each(function(){var g=f.appendTo(this).width();f.remove(),g&&(a("img",this).each(function(){var c=a(this),f=c.attr("src");(!d.test(f)||e.test(f))&&(c.attr("rel","xe_gallery"),b.call(c,g))}),a("img[rel=xe_gallery]",this).live("mouseover",function(){var b=a(this);b.parent("a").length||b.attr("onclick")||b.css("cursor","pointer").click(c)}))})})}(jQuery);

View file

@ -20,7 +20,7 @@ if($called_position == 'after_module_proc' && Context::getResponseMethod() == "H
else
{
Context::loadJavascriptPlugin('ui');
Context::loadFile(array('./addons/resize_image/js/resize_image.min.js', 'body', '', null), true);
Context::loadFile(array('./addons/resize_image/js/resize_image.js', 'body', '', null), true);
}
}

View file

@ -1,7 +0,0 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
header('Location: ../index.php?module=admin');
/* End of file index.php */
/* Location: ./admin/index.php */

View file

@ -78,10 +78,6 @@ class CacheFile extends CacheBase
$content[] = 'if(!defined(\'__XE__\')) { exit(); }';
$content[] = 'return \'' . addslashes(serialize($obj)) . '\';';
FileHandler::writeFile($cache_file, implode(PHP_EOL, $content));
if(function_exists('opcache_invalidate'))
{
@opcache_invalidate($cache_file, true);
}
}
/**
@ -145,10 +141,6 @@ class CacheFile extends CacheBase
function _delete($_key)
{
$cache_file = $this->getCacheFileName($_key);
if(function_exists('opcache_invalidate'))
{
@opcache_invalidate($cache_file, true);
}
FileHandler::removeFile($cache_file);
}

File diff suppressed because it is too large Load diff

View file

@ -178,7 +178,7 @@ class DB
*/
function create()
{
return new DB;
return new static();
}
/**
@ -382,7 +382,7 @@ class DB
{
$this->setError(0, 'success');
$this->query = $query;
$this->act_start = getMicroTime();
$this->act_start = microtime(true);
$this->elapsed_time = 0;
}
@ -396,7 +396,7 @@ class DB
{
return;
}
$this->act_finish = getMicroTime();
$this->act_finish = microtime(true);
$elapsed_time = $this->act_finish - $this->act_start;
$this->elapsed_time = $elapsed_time;
$GLOBALS['__db_elapsed_time__'] += $elapsed_time;
@ -1316,7 +1316,7 @@ class DB
function actDBClassStart()
{
$this->setError(0, 'success');
$this->act_dbclass_start = getMicroTime();
$this->act_dbclass_start = microtime(true);
$this->elapsed_dbclass_time = 0;
}
@ -1330,7 +1330,7 @@ class DB
{
return;
}
$this->act_dbclass_finish = getMicroTime();
$this->act_dbclass_finish = microtime(true);
$elapsed_dbclass_time = $this->act_dbclass_finish - $this->act_dbclass_start;
$this->elapsed_dbclass_time = $elapsed_dbclass_time;
$GLOBALS['__dbclass_elapsed_time__'] += $elapsed_dbclass_time;

View file

@ -13,13 +13,13 @@
*/
class DBMysql extends DB
{
/**
* prefix of a tablename (One or more XEs can be installed in a single DB)
* @var string
*/
var $prefix = 'xe_'; // / <
var $comment_syntax = '/* %s */';
var $charset = 'utf8';
/**
* Column type used in MySQL
@ -49,15 +49,6 @@ class DBMysql extends DB
$this->_connect();
}
/**
* Create an instance of this class
* @return DBMysql return DBMysql object instance
*/
function create()
{
return new DBMysql;
}
/**
* DB Connect
* this method is private
@ -84,12 +75,18 @@ class DBMysql extends DB
$this->setError(mysql_errno(), mysql_error());
return;
}
// Error appears if the version is lower than 4.1
if(version_compare(mysql_get_server_info($result), '4.1', '<'))
{
$this->setError(-1, 'XE cannot be installed under the version of mysql 4.1. Current mysql version is ' . mysql_get_server_info());
return;
}
// Set charset
$this->charset = isset($connection["db_charset"]) ? $connection["db_charset"] : 'utf8';
mysql_set_charset($this->charset, $result);
// select db
@mysql_select_db($connection["db_database"], $result);
if(mysql_error())
@ -101,18 +98,6 @@ class DBMysql extends DB
return $result;
}
/**
* If have a task after connection, add a taks in this method
* this method is private
* @param resource $connection
* @return void
*/
function _afterConnect($connection)
{
// Set utf8 if a database is MySQL
$this->_query("set names 'utf8'", $connection);
}
/**
* DB disconnection
* this method is private
@ -186,7 +171,7 @@ class DBMysql extends DB
exit('XE cannot handle DB connection.');
}
// Run the query statement
$result = mysql_query($query, $connection);
$result = @mysql_query($query, $connection);
// Error Check
if(mysql_error($connection))
{
@ -570,17 +555,16 @@ class DBMysql extends DB
*/
function _createTable($xml_doc)
{
// xml parsing
// Parse XML
$oXml = new XmlParser();
$xml_obj = $oXml->parse($xml_doc);
// Create a table schema
// Get table name and column list
$table_name = $xml_obj->table->attrs->name;
if($this->isTableExists($table_name))
{
return;
}
$table_name = $this->prefix . $table_name;
if(!is_array($xml_obj->table->column))
{
$columns[] = $xml_obj->table->column;
@ -589,11 +573,14 @@ class DBMysql extends DB
{
$columns = $xml_obj->table->column;
}
// Initialize the list of columns and indexes
$column_schema = array();
$primary_list = array();
$unique_list = array();
$index_list = array();
// Process columns
foreach($columns as $column)
{
$name = $column->attrs->name;
@ -605,49 +592,96 @@ class DBMysql extends DB
$unique = $column->attrs->unique;
$default = $column->attrs->default;
$auto_increment = $column->attrs->auto_increment;
$column_schema[] = sprintf('`%s` %s%s %s %s %s', $name, $this->column_type[$type], $size ? '(' . $size . ')' : '', isset($default) ? "default '" . $default . "'" : '', $notnull ? 'not null' : '', $auto_increment ? 'auto_increment' : '');
$column_charset = '';
$index_size_limit = '';
// MySQL only supports 767 bytes for indexed columns.
// This is 191 characters in utf8mb4 and 255 characters in utf8.
if($column->attrs->utf8mb4 === 'false')
{
$column_charset = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci';
}
elseif(($primary_key || $unique || $index) && stripos($type, 'char') !== false)
{
if($size > 255 || ($size > 191 && $this->charset === 'utf8mb4'))
{
if($primary_key || $unique)
{
$size = ($this->charset === 'utf8mb4') ? 191 : 255;
}
else
{
$index_size_limit = '(' . (($this->charset === 'utf8mb4') ? 191 : 255) . ')';
}
}
}
$column_schema[$name] = sprintf('`%s` %s%s %s %s %s %s',
$name,
$this->column_type[$type],
$size ? "($size)" : '',
$column_charset,
isset($default) ? "DEFAULT '$default'" : '',
$notnull ? 'NOT NULL' : '',
$auto_increment ? 'AUTO_INCREMENT' : ''
);
if($primary_key)
{
$primary_list[] = $name;
$primary_list[] = "`$name`";
}
else if($unique)
{
$unique_list[$unique][] = $name;
$unique_list[$unique][] = "`$name`" . $index_size_limit;
}
else if($index)
{
$index_list[$index][] = $name;
$index_list[$index][] = "`$name`" . $index_size_limit;
}
}
// Process
// Process indexes
if(count($primary_list))
{
$column_schema[] = sprintf("primary key (%s)", '`' . implode($primary_list, '`,`') . '`');
$column_schema[] = sprintf("PRIMARY KEY (%s)", implode($primary_list, ', '));
}
if(count($unique_list))
{
foreach($unique_list as $key => $val)
{
$column_schema[] = sprintf("unique %s (%s)", $key, '`' . implode($val, '`,`') . '`');
$column_schema[] = sprintf("UNIQUE %s (%s)", $key, implode($val, ', '));
}
}
if(count($index_list))
{
foreach($index_list as $key => $val)
{
$column_schema[] = sprintf("index %s (%s)", $key, '`' . implode($val, '`,`') . '`');
$column_schema[] = sprintf("INDEX %s (%s)", $key, implode($val, ', '));
}
}
$schema = sprintf('create table `%s` (%s%s) %s;', $this->addQuotes($table_name), "\n", implode($column_schema, ",\n"), "ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci");
// Generate table schema
$engine = stripos(get_class($this), 'innodb') === false ? 'MYISAM' : 'INNODB';
$charset = $this->charset ?: 'utf8';
$collation = $charset . '_unicode_ci';
$schema = sprintf("CREATE TABLE `%s` (%s) %s",
$this->addQuotes($this->prefix . $table_name),
"\n" . implode($column_schema, ",\n") . "\n",
"ENGINE = $engine CHARACTER SET $charset COLLATE $collation"
);
// Execute the complete query
$output = $this->_query($schema);
if(!$output)
if($output)
{
return true;
}
else
{
return false;
}
}
/**
@ -788,7 +822,7 @@ class DBMysql extends DB
* @param boolean $force
* @return DBParser
*/
function &getParser($force = FALSE)
function getParser($force = FALSE)
{
$dbParser = new DBParser('`', '`', $this->prefix);
return $dbParser;
@ -967,6 +1001,30 @@ class DBMysql extends DB
return $select . ' ' . $from . ' ' . $where . ' ' . $groupBy . ' ' . $orderBy . ' ' . $limit;
}
/**
* Find out the best supported character set
*
* @return string
*/
function getBestSupportedCharset()
{
if($output = $this->_fetch($this->_query("SHOW CHARACTER SET LIKE 'utf8%'")))
{
$mb4_support = false;
foreach($output as $row)
{
if($row->Charset === 'utf8mb4')
{
$mb4_support = true;
}
}
return $mb4_support ? 'utf8mb4' : 'utf8';
}
else
{
return 'utf8';
}
}
}
DBMysql::$isSupported = function_exists('mysql_connect');

View file

@ -15,37 +15,6 @@ require_once('DBMysql.class.php');
*/
class DBMysql_innodb extends DBMysql
{
/**
* Constructor
* @return void
*/
function __construct()
{
$this->_setDBInfo();
$this->_connect();
}
/**
* Create an instance of this class
* @return DBMysql_innodb return DBMysql_innodb object instance
*/
function create()
{
return new DBMysql_innodb;
}
/**
* DB disconnection
* this method is private
* @param resource $connection
* @return void
*/
function _close($connection)
{
@mysql_close($connection);
}
/**
* DB transaction start
* this method is private
@ -96,123 +65,9 @@ class DBMysql_innodb extends DBMysql
function _commit()
{
$connection = $this->_getConnection('master');
$this->_query("commit", $connection);
$this->_query("COMMIT", $connection);
return true;
}
/**
* Execute the query
* this method is private
* @param string $query
* @param resource $connection
* @return resource
*/
function __query($query, $connection)
{
if(!$connection)
{
exit('XE cannot handle DB connection.');
}
// Run the query statement
$result = @mysql_query($query, $connection);
// Error Check
if(mysql_error($connection))
{
$this->setError(mysql_errno($connection), mysql_error($connection));
}
// Return result
return $result;
}
/**
* Create table by using the schema xml
*
* type : number, varchar, tinytext, text, bigtext, char, date, \n
* opt : notnull, default, size\n
* index : primary key, index, unique\n
* @param string $xml_doc xml schema contents
* @return void|object
*/
function _createTable($xml_doc)
{
// xml parsing
$oXml = new XmlParser();
$xml_obj = $oXml->parse($xml_doc);
// Create a table schema
$table_name = $xml_obj->table->attrs->name;
if($this->isTableExists($table_name))
{
return;
}
$table_name = $this->prefix . $table_name;
if(!is_array($xml_obj->table->column))
{
$columns[] = $xml_obj->table->column;
}
else
{
$columns = $xml_obj->table->column;
}
foreach($columns as $column)
{
$name = $column->attrs->name;
$type = $column->attrs->type;
$size = $column->attrs->size;
$notnull = $column->attrs->notnull;
$primary_key = $column->attrs->primary_key;
$index = $column->attrs->index;
$unique = $column->attrs->unique;
$default = $column->attrs->default;
$auto_increment = $column->attrs->auto_increment;
$column_schema[] = sprintf('`%s` %s%s %s %s %s', $name, $this->column_type[$type], $size ? '(' . $size . ')' : '', isset($default) ? "default '" . $default . "'" : '', $notnull ? 'not null' : '', $auto_increment ? 'auto_increment' : '');
if($primary_key)
{
$primary_list[] = $name;
}
else if($unique)
{
$unique_list[$unique][] = $name;
}
else if($index)
{
$index_list[$index][] = $name;
}
}
if(count($primary_list))
{
$column_schema[] = sprintf("primary key (%s)", '`' . implode($primary_list, '`,`') . '`');
}
if(count($unique_list))
{
foreach($unique_list as $key => $val)
{
$column_schema[] = sprintf("unique %s (%s)", $key, '`' . implode($val, '`,`') . '`');
}
}
if(count($index_list))
{
foreach($index_list as $key => $val)
{
$column_schema[] = sprintf("index %s (%s)", $key, '`' . implode($val, '`,`') . '`');
}
}
$schema = sprintf('create table `%s` (%s%s) %s;', $this->addQuotes($table_name), "\n", implode($column_schema, ",\n"), "ENGINE = INNODB CHARACTER SET utf8 COLLATE utf8_general_ci");
$output = $this->_query($schema);
if(!$output)
{
return false;
}
}
}
DBMysql_innodb::$isSupported = function_exists('mysql_connect');

View file

@ -15,26 +15,6 @@ require_once('DBMysql.class.php');
*/
class DBMysqli extends DBMysql
{
/**
* Constructor
* @return void
*/
function __construct()
{
$this->_setDBInfo();
$this->_connect();
}
/**
* Create an instance of this class
* @return DBMysqli return DBMysqli object instance
*/
function create()
{
return new DBMysqli;
}
/**
* DB Connect
* this method is private
@ -65,7 +45,8 @@ class DBMysqli extends DBMysql
$this->setError($error, mysqli_connect_error());
return;
}
mysqli_set_charset($result, 'utf8');
$this->charset = isset($connection["db_charset"]) ? $connection["db_charset"] : 'utf8';
mysqli_set_charset($result, $this->charset);
return $result;
}

View file

@ -2,6 +2,7 @@
/* Copyright (C) NAVER <http://www.navercorp.com> */
require_once('DBMysql.class.php');
require_once('DBMysqli.class.php');
/**
* Class to use MySQLi innoDB DBMS as mysqli_*
@ -13,73 +14,8 @@ require_once('DBMysql.class.php');
* @package /classes/db
* @version 0.1
*/
class DBMysqli_innodb extends DBMysql
class DBMysqli_innodb extends DBMysqli
{
/**
* Constructor
* @return void
*/
function __construct()
{
$this->_setDBInfo();
$this->_connect();
}
/**
* Create an instance of this class
* @return DBMysqli_innodb return DBMysqli_innodb object instance
*/
function create()
{
return new DBMysqli_innodb;
}
/**
* DB Connect
* this method is private
* @param array $connection connection's value is db_hostname, db_port, db_database, db_userid, db_password
* @return resource
*/
function __connect($connection)
{
// Attempt to connect
if($connection["db_port"])
{
$result = @mysqli_connect($connection["db_hostname"]
, $connection["db_userid"]
, $connection["db_password"]
, $connection["db_database"]
, $connection["db_port"]);
}
else
{
$result = @mysqli_connect($connection["db_hostname"]
, $connection["db_userid"]
, $connection["db_password"]
, $connection["db_database"]);
}
$error = mysqli_connect_errno();
if($error)
{
$this->setError($error, mysqli_connect_error());
return;
}
mysqli_set_charset($result, 'utf8');
return $result;
}
/**
* DB disconnection
* this method is private
* @param resource $connection
* @return void
*/
function _close($connection)
{
mysqli_close($connection);
}
/**
* DB transaction start
* this method is private
@ -91,7 +27,15 @@ class DBMysqli_innodb extends DBMysql
if(!$transactionLevel)
{
$this->_query("begin");
if(function_exists('mysqli_begin_transaction'))
{
mysqli_begin_transaction($connection);
$this->setQueryLog(array('query' => 'START TRANSACTION'));
}
else
{
$this->_query("START TRANSACTION" . $point, $connection);
}
}
else
{
@ -108,7 +52,6 @@ class DBMysqli_innodb extends DBMysql
function _rollback($transactionLevel = 0)
{
$connection = $this->_getConnection('master');
$point = $transactionLevel - 1;
if($point)
@ -118,7 +61,7 @@ class DBMysqli_innodb extends DBMysql
else
{
mysqli_rollback($connection);
$this->setQueryLog( array("query"=>"rollback") );
$this->setQueryLog(array('query' => 'ROLLBACK'));
}
return true;
}
@ -132,449 +75,9 @@ class DBMysqli_innodb extends DBMysql
{
$connection = $this->_getConnection('master');
mysqli_commit($connection);
$this->setQueryLog( array("query"=>"commit") );
$this->setQueryLog(array('query' => 'COMMIT'));
return true;
}
/**
* Handles quatation of the string variables from the query
* @param string $string
* @return string
*/
function addQuotes($string)
{
if(version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc())
{
$string = stripslashes(str_replace("\\", "\\\\", $string));
}
if(!is_numeric($string))
{
$connection = $this->_getConnection('master');
$string = mysqli_escape_string($connection, $string);
}
return $string;
}
/**
* Execute the query
* this method is private
* @param string $query
* @param resource $connection
* @return resource
*/
function __query($query, $connection)
{
if($this->use_prepared_statements == 'Y')
{
// 1. Prepare query
$stmt = mysqli_prepare($connection, $query);
if($stmt)
{
$types = '';
$params = array();
$this->_prepareQueryParameters($types, $params);
if(!empty($params))
{
$args[0] = $stmt;
$args[1] = $types;
$i = 2;
foreach($params as $key => $param)
{
$copy[$key] = $param;
$args[$i++] = &$copy[$key];
}
// 2. Bind parameters
$status = call_user_func_array('mysqli_stmt_bind_param', $args);
if(!$status)
{
$this->setError(-1, "Invalid arguments: $query" . mysqli_error($connection) . PHP_EOL . print_r($args, true));
}
}
// 3. Execute query
$status = mysqli_stmt_execute($stmt);
if(!$status)
{
$this->setError(-1, "Prepared statement failed: $query" . mysqli_error($connection) . PHP_EOL . print_r($args, true));
}
// Return stmt for other processing - like retrieving resultset (_fetch)
return $stmt;
// mysqli_stmt_close($stmt);
}
}
// Run the query statement
$result = mysqli_query($connection, $query);
// Error Check
$error = mysqli_error($connection);
if($error)
{
$this->setError(mysqli_errno($connection), $error);
}
// Return result
return $result;
}
/**
* Before execute query, prepare statement
* this method is private
* @param string $types
* @param array $params
* @return void
*/
function _prepareQueryParameters(&$types, &$params)
{
$types = '';
$params = array();
if(!$this->param)
{
return;
}
foreach($this->param as $k => $o)
{
$value = $o->getUnescapedValue();
$type = $o->getType();
// Skip column names -> this should be concatenated to query string
if($o->isColumnName())
{
continue;
}
switch($type)
{
case 'number' :
$type = 'i';
break;
case 'varchar' :
$type = 's';
break;
default:
$type = 's';
}
if(is_array($value))
{
foreach($value as $v)
{
$params[] = $v;
$types .= $type;
}
}
else
{
$params[] = $value;
$types .= $type;
}
}
}
/**
* Fetch the result
* @param resource $result
* @param int|NULL $arrayIndexEndValue
* @return array
*/
function _fetch($result, $arrayIndexEndValue = NULL)
{
if($this->use_prepared_statements != 'Y')
{
return parent::_fetch($result, $arrayIndexEndValue);
}
$output = array();
if(!$this->isConnected() || $this->isError() || !$result)
{
return $output;
}
// Prepared stements: bind result variable and fetch data
$stmt = $result;
$meta = mysqli_stmt_result_metadata($stmt);
$fields = mysqli_fetch_fields($meta);
/**
* Mysqli has a bug that causes LONGTEXT columns not to get loaded
* Unless store_result is called before
* MYSQLI_TYPE for longtext is 252
*/
$longtext_exists = false;
foreach($fields as $field)
{
if(isset($resultArray[$field->name])) // When joined tables are used and the same column name appears twice, we should add it separately, otherwise bind_result fails
{
$field->name = 'repeat_' . $field->name;
}
// Array passed needs to contain references, not values
$row[$field->name] = "";
$resultArray[$field->name] = &$row[$field->name];
if($field->type == 252)
{
$longtext_exists = true;
}
}
$resultArray = array_merge(array($stmt), $resultArray);
if($longtext_exists)
{
mysqli_stmt_store_result($stmt);
}
call_user_func_array('mysqli_stmt_bind_result', $resultArray);
$rows = array();
while(mysqli_stmt_fetch($stmt))
{
$resultObject = new stdClass();
foreach($resultArray as $key => $value)
{
if($key === 0)
{
continue; // Skip stmt object
}
if(strpos($key, 'repeat_'))
{
$key = substr($key, 6);
}
$resultObject->$key = $value;
}
$rows[] = $resultObject;
}
mysqli_stmt_close($stmt);
if($arrayIndexEndValue)
{
foreach($rows as $row)
{
$output[$arrayIndexEndValue--] = $row;
}
}
else
{
$output = $rows;
}
if(count($output) == 1)
{
if(isset($arrayIndexEndValue))
{
return $output;
}
else
{
return $output[0];
}
}
return $output;
}
/**
* Handles insertAct
* @param Object $queryObject
* @param boolean $with_values
* @return resource
*/
function _executeInsertAct($queryObject, $with_values = false)
{
if($this->use_prepared_statements != 'Y')
{
return parent::_executeInsertAct($queryObject);
}
$this->param = $queryObject->getArguments();
$result = parent::_executeInsertAct($queryObject, $with_values);
unset($this->param);
return $result;
}
/**
* Handles updateAct
* @param Object $queryObject
* @param boolean $with_values
* @return resource
*/
function _executeUpdateAct($queryObject, $with_values = false)
{
if($this->use_prepared_statements != 'Y')
{
return parent::_executeUpdateAct($queryObject);
}
$this->param = $queryObject->getArguments();
$result = parent::_executeUpdateAct($queryObject, $with_values);
unset($this->param);
return $result;
}
/**
* Handles deleteAct
* @param Object $queryObject
* @param boolean $with_values
* @return resource
*/
function _executeDeleteAct($queryObject, $with_values = false)
{
if($this->use_prepared_statements != 'Y')
{
return parent::_executeDeleteAct($queryObject);
}
$this->param = $queryObject->getArguments();
$result = parent::_executeDeleteAct($queryObject, $with_values);
unset($this->param);
return $result;
}
/**
* Handle selectAct
* In order to get a list of pages easily when selecting \n
* it supports a method as navigation
* @param Object $queryObject
* @param resource $connection
* @param boolean $with_values
* @return Object
*/
function _executeSelectAct($queryObject, $connection = null, $with_values = false)
{
if($this->use_prepared_statements != 'Y')
{
return parent::_executeSelectAct($queryObject, $connection);
}
$this->param = $queryObject->getArguments();
$result = parent::_executeSelectAct($queryObject, $connection, $with_values);
unset($this->param);
return $result;
}
/**
* Get the ID generated in the last query
* Return next sequence from sequence table
* This method use only mysql
* @return int
*/
function db_insert_id()
{
$connection = $this->_getConnection('master');
return mysqli_insert_id($connection);
}
/**
* Fetch a result row as an object
* @param resource $result
* @return object
*/
function db_fetch_object(&$result)
{
return mysqli_fetch_object($result);
}
/**
* Free result memory
* @param resource $result
* @return boolean Returns TRUE on success or FALSE on failure.
*/
function db_free_result(&$result)
{
return mysqli_free_result($result);
}
/**
* Create table by using the schema xml
*
* type : number, varchar, tinytext, text, bigtext, char, date, \n
* opt : notnull, default, size\n
* index : primary key, index, unique\n
* @param string $xml_doc xml schema contents
* @return void|object
*/
function _createTable($xml_doc)
{
// xml parsing
$oXml = new XmlParser();
$xml_obj = $oXml->parse($xml_doc);
// Create a table schema
$table_name = $xml_obj->table->attrs->name;
if($this->isTableExists($table_name))
{
return;
}
$table_name = $this->prefix . $table_name;
if(!is_array($xml_obj->table->column))
{
$columns[] = $xml_obj->table->column;
}
else
{
$columns = $xml_obj->table->column;
}
foreach($columns as $column)
{
$name = $column->attrs->name;
$type = $column->attrs->type;
$size = $column->attrs->size;
$notnull = $column->attrs->notnull;
$primary_key = $column->attrs->primary_key;
$index = $column->attrs->index;
$unique = $column->attrs->unique;
$default = $column->attrs->default;
$auto_increment = $column->attrs->auto_increment;
$column_schema[] = sprintf('`%s` %s%s %s %s %s', $name, $this->column_type[$type], $size ? '(' . $size . ')' : '', isset($default) ? "default '" . $default . "'" : '', $notnull ? 'not null' : '', $auto_increment ? 'auto_increment' : '');
if($primary_key)
{
$primary_list[] = $name;
}
else if($unique)
{
$unique_list[$unique][] = $name;
}
else if($index)
{
$index_list[$index][] = $name;
}
}
if(count($primary_list))
{
$column_schema[] = sprintf("primary key (%s)", '`' . implode($primary_list, '`,`') . '`');
}
if(count($unique_list))
{
foreach($unique_list as $key => $val)
{
$column_schema[] = sprintf("unique %s (%s)", $key, '`' . implode($val, '`,`') . '`');
}
}
if(count($index_list))
{
foreach($index_list as $key => $val)
{
$column_schema[] = sprintf("index %s (%s)", $key, '`' . implode($val, '`,`') . '`');
}
}
$schema = sprintf('create table `%s` (%s%s) %s;', $this->addQuotes($table_name), "\n", implode($column_schema, ",\n"), "ENGINE = INNODB CHARACTER SET utf8 COLLATE utf8_general_ci");
$output = $this->_query($schema);
if(!$output)
{
return false;
}
}
}
DBMysqli_innodb::$isSupported = function_exists('mysqli_connect');

View file

@ -142,7 +142,7 @@ class DisplayHandler extends Handler
return;
}
$end = getMicroTime();
$end = microtime(true);
// Firebug console output
if(__DEBUG_OUTPUT__ == 2 && version_compare(PHP_VERSION, '6.0.0') === -1)

View file

@ -3,6 +3,18 @@
class HTMLDisplayHandler
{
/**
* Reserved scripts
*/
public static $reservedCSS = '@\bcommon/css/(?:xe|mobile)\.(?:min\.)?css$@';
public static $reservedJS = '@\bcommon/js/(?:jquery(?:-[123]\.x)?|xe?|common|js_app|xml_handler|xml_js_filter)\.(?:min\.)?js$@';
/**
* Replacement table for XE compatibility
*/
public static $replacements = array(
'@\bcommon/xeicon/@' => 'common/css/xeicon/',
);
/**
* Produce HTML compliant content given a module object.\n
@ -76,7 +88,7 @@ class HTMLDisplayHandler
{
if(__DEBUG__ == 3)
{
$start = getMicroTime();
$start = microtime(true);
}
Context::set('content', $output, false);
@ -132,7 +144,7 @@ class HTMLDisplayHandler
if(__DEBUG__ == 3)
{
$GLOBALS['__layout_compile_elapsed__'] = getMicroTime() - $start;
$GLOBALS['__layout_compile_elapsed__'] = microtime(true) - $start;
}
if(stripos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE && (Context::get('_use_ssl') == 'optional' || Context::get('_use_ssl') == 'always'))
@ -158,7 +170,7 @@ class HTMLDisplayHandler
if(__DEBUG__ == 3)
{
$start = getMicroTime();
$start = microtime(true);
}
// move <style ..></style> in body to the header
@ -208,7 +220,7 @@ class HTMLDisplayHandler
if(__DEBUG__ == 3)
{
$GLOBALS['__trans_content_elapsed__'] = getMicroTime() - $start;
$GLOBALS['__trans_content_elapsed__'] = microtime(true) - $start;
}
// Remove unnecessary information
@ -231,7 +243,7 @@ class HTMLDisplayHandler
}
else
{
$this->_loadJSCSS();
$this->_loadDesktopJSCSS();
$output = $oTemplate->compile('./common/tpl', 'common_layout');
}
@ -385,56 +397,21 @@ class HTMLDisplayHandler
* import basic .js files.
* @return void
*/
function _loadJSCSS()
function _loadDesktopJSCSS()
{
$oContext = Context::getInstance();
$lang_type = Context::getLangType();
// add common JS/CSS files
if(__DEBUG__ || !__XE_VERSION_STABLE__)
{
$oContext->loadFile(array('./common/js/jquery-1.x.js', 'head', 'lt IE 9', -111000), true);
$oContext->loadFile(array('./common/js/jquery.js', 'head', 'gte IE 9', -110000), true);
$oContext->loadFile(array('./common/js/modernizr.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/x.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/common.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/js_app.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/xml_handler.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/xml_js_filter.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/css/xe.css', '', '', -1000000), true);
}
else
{
$oContext->loadFile(array('./common/js/jquery-1.x.min.js', 'head', 'lt IE 9', -111000), true);
$oContext->loadFile(array('./common/js/jquery.min.js', 'head', 'gte IE 9', -110000), true);
$oContext->loadFile(array('./common/js/x.min.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/xe.min.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/css/xe.min.css', '', '', -1000000), true);
}
$this->_loadCommonJSCSS();
// for admin page, add admin css
if(Context::get('module') == 'admin' || strpos(Context::get('act'), 'Admin') > 0)
{
if(__DEBUG__ || !__XE_VERSION_STABLE__)
{
$oContext->loadFile(array('./modules/admin/tpl/css/admin.css', '', '', 10), true);
$oContext->loadFile(array("./modules/admin/tpl/css/admin_{$lang_type}.css", '', '', 10), true);
$oContext->loadFile(array("./modules/admin/tpl/css/admin.iefix.css", '', 'ie', 10), true);
$oContext->loadFile('./modules/admin/tpl/js/admin.js', true);
$oContext->loadFile(array('./modules/admin/tpl/css/admin.bootstrap.css', '', '', 1), true);
$oContext->loadFile(array('./modules/admin/tpl/js/jquery.tmpl.js', '', '', 1), true);
$oContext->loadFile(array('./modules/admin/tpl/js/jquery.jstree.js', '', '', 1), true);
}
else
{
$oContext->loadFile(array('./modules/admin/tpl/css/admin.min.css', '', '', 10), true);
$oContext->loadFile(array("./modules/admin/tpl/css/admin_{$lang_type}.css", '', '', 10), true);
$oContext->loadFile(array("./modules/admin/tpl/css/admin.iefix.css", '', 'ie', 10), true);
$oContext->loadFile('./modules/admin/tpl/js/admin.min.js', true);
$oContext->loadFile(array('./modules/admin/tpl/css/admin.bootstrap.min.css', '', '', 1), true);
$oContext->loadFile(array('./modules/admin/tpl/js/jquery.tmpl.js', '', '', 1), true);
$oContext->loadFile(array('./modules/admin/tpl/js/jquery.jstree.js', '', '', 1), true);
}
Context::loadFile(array('./modules/admin/tpl/css/admin.css', '', '', 10), true);
Context::loadFile(array("./modules/admin/tpl/css/admin_{$lang_type}.css", '', '', 10), true);
Context::loadFile(array("./modules/admin/tpl/css/admin.iefix.css", '', 'ie', 10), true);
Context::loadFile('./modules/admin/tpl/js/admin.js', true);
Context::loadFile(array('./modules/admin/tpl/css/admin.bootstrap.css', '', '', 1), true);
Context::loadFile(array('./modules/admin/tpl/js/jquery.tmpl.js', '', '', 1), true);
Context::loadFile(array('./modules/admin/tpl/js/jquery.jstree.js', '', '', 1), true);
}
}
@ -443,32 +420,56 @@ class HTMLDisplayHandler
*/
private function _loadMobileJSCSS()
{
$oContext = Context::getInstance();
$lang_type = Context::getLangType();
$this->_loadCommonJSCSS();
Context::loadFile(array('./common/css/mobile.css', '', '', -1500000), true);
}
// add common JS/CSS files
if(__DEBUG__ || !__XE_VERSION_STABLE__)
/**
* import common .js and .css files for (both desktop and mobile)
*/
private function _loadCommonJSCSS()
{
Context::loadFile(array('./common/css/xe.css', '', '', -1600000), true);
$original_file_list = array('x', 'common', 'js_app', 'xml_handler', 'xml_js_filter');
if(Context::getDBInfo()->minify_scripts === 'none')
{
$oContext->loadFile(array('./common/js/jquery.js', 'head', '', -110000), true);
$oContext->loadFile(array('./common/js/modernizr.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/x.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/common.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/js_app.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/xml_handler.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/xml_js_filter.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/css/xe.css', '', '', -1000000), true);
$oContext->loadFile(array('./common/css/mobile.css', '', '', -1000000), true);
Context::loadFile(array('./common/js/jquery-1.x.js', 'head', 'lt IE 9', -1730000), true);
Context::loadFile(array('./common/js/jquery.js', 'head', 'gte IE 9', -1720000), true);
foreach($original_file_list as $filename)
{
Context::loadFile(array('./common/js/' . $filename . '.js', 'head', '', -1700000), true);
}
}
else
{
$oContext->loadFile(array('./common/js/jquery.min.js', 'head', '', -110000), true);
$oContext->loadFile(array('./common/js/x.min.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/xe.min.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/css/xe.min.css', '', '', -1000000), true);
$oContext->loadFile(array('./common/css/mobile.min.css', '', '', -1000000), true);
Context::loadFile(array('./common/js/jquery-1.x.min.js', 'head', 'lt IE 9', -1730000), true);
Context::loadFile(array('./common/js/jquery.min.js', 'head', 'gte IE 9', -1720000), true);
$concat_target_filename = 'files/cache/minify/xe.min.js';
if(file_exists(_XE_PATH_ . $concat_target_filename))
{
$concat_target_mtime = filemtime(_XE_PATH_ . $concat_target_filename);
$original_mtime = 0;
foreach($original_file_list as $filename)
{
$original_mtime = max($original_mtime, filemtime(_XE_PATH_ . 'common/js/' . $filename . '.js'));
}
if($concat_target_mtime > $original_mtime)
{
Context::loadFile(array('./' . $concat_target_filename, 'head', '', -100000), true);
return;
}
}
$minifier = new MatthiasMullie\Minify\JS();
foreach($original_file_list as $filename)
{
$minifier->add(_XE_PATH_ . 'common/js/' . $filename . '.js');
}
FileHandler::writeFile(_XE_PATH_ . $concat_target_filename, $minifier->execute());
Context::loadFile(array('./' . $concat_target_filename, 'head', '', -100000), true);
}
}
}
/* End of file HTMLDisplayHandler.class.php */
/* Location: ./classes/display/HTMLDisplayHandler.class.php */

View file

@ -14,14 +14,12 @@ class JSCallbackDisplayHandler
$variables = $oModule->getVariables();
$variables['error'] = $oModule->getError();
$variables['message'] = $oModule->getMessage();
$json = str_replace(array("\r\n", "\n", "\t"), array('\n', '\n', '\t'), json_encode2($variables));
return sprintf('<script type="text/javascript">
//<![CDATA[
%s(%s);
//]]>
</script>', Context::getJSCallbackFunc(), $json);
</script>', Context::getJSCallbackFunc(), json_encode($variables));
}
}
/* End of file JSCallback.class.php */
/* Location: ./classes/display/JSCallback.class.php */

View file

@ -14,8 +14,7 @@ class JSONDisplayHandler
$variables = $oModule->getVariables();
$variables['error'] = $oModule->getError();
$variables['message'] = $oModule->getMessage();
$json = str_replace(array("\r\n", "\n", "\t"), array('\n', '\n', '\t'), json_encode2($variables));
return $json;
return json_encode($variables);
}
}

View file

@ -156,6 +156,10 @@ class FileHandler
@file_put_contents($filename, $buff, $flags|LOCK_EX);
@chmod($filename, 0644);
if(function_exists('opcache_invalidate') && substr($filename, -4) === '.php')
{
@opcache_invalidate($filename, true);
}
}
/**
@ -166,7 +170,16 @@ class FileHandler
*/
public static function removeFile($filename)
{
return (($filename = self::exists($filename)) !== FALSE) && @unlink($filename);
if(($filename = self::exists($filename)) === false)
{
return false;
}
$status = @unlink($filename);
if(function_exists('opcache_invalidate') && substr($filename, -4) === '.php')
{
@opcache_invalidate($filename, true);
}
return $status;
}
/**

View file

@ -8,7 +8,8 @@
class FrontEndFileHandler extends Handler
{
static $isSSL = null;
public static $isSSL = null;
public static $minify = null;
/**
* Map for css
@ -92,7 +93,14 @@ class FrontEndFileHandler extends Handler
{
$args = array($args);
}
$file = $this->getFileInfo($args[0], $args[2], $args[1]);
$args[0] = preg_replace(array_keys(HTMLDisplayHandler::$replacements), array_values(HTMLDisplayHandler::$replacements), $args[0]);
$isCommon = preg_match(HTMLDisplayHandler::$reservedCSS, $args[0]) || preg_match(HTMLDisplayHandler::$reservedJS, $args[0]);
if($args[3] > -1500000 && $isCommon)
{
return;
}
$file = $this->getFileInfo($args[0], $args[2], $args[1], $isCommon);
$file->index = (int)$args[3];
$availableExtension = array('css' => 1, 'js' => 1);
if(!isset($availableExtension[$file->fileExtension]))
@ -100,8 +108,6 @@ class FrontEndFileHandler extends Handler
return;
}
$file->index = (int) $args[3];
if($file->fileExtension == 'css')
{
$map = &$this->cssMap;
@ -123,7 +129,6 @@ class FrontEndFileHandler extends Handler
}
}
(is_null($file->index)) ? $file->index = 0 : $file->index = $file->index;
if(!isset($mapIndex[$file->key]) || $mapIndex[$file->key] > $file->index)
{
$this->unloadFile($args[0], $args[2], $args[1]);
@ -138,12 +143,18 @@ class FrontEndFileHandler extends Handler
* @param string $fileName The file name
* @param string $targetIe Target IE of file
* @param string $media Media of file
* @param bool $forceMinify Whether this file should be minified
* @return stdClass The file information
*/
private function getFileInfo($fileName, $targetIe = '', $media = 'all')
private function getFileInfo($fileName, $targetIe = '', $media = 'all', $forceMinify = false)
{
static $existsInfo = array();
if(self::$minify === null)
{
self::$minify = Context::getDBInfo()->minify_scripts ?: 'common';
}
if(isset($existsInfo[$existsKey]))
{
return $existsInfo[$existsKey];
@ -155,34 +166,83 @@ class FrontEndFileHandler extends Handler
$file->filePath = $this->_getAbsFileUrl($pathInfo['dirname']);
$file->fileRealPath = FileHandler::getRealPath($pathInfo['dirname']);
$file->fileExtension = strtolower($pathInfo['extension']);
$file->fileNameNoExt = preg_replace('/\.min$/', '', $pathInfo['filename']);
$file->keyName = implode('.', array($file->fileNameNoExt, $file->fileExtension));
$file->cdnPath = $this->_normalizeFilePath($pathInfo['dirname']);
if(strpos($file->filePath, '://') === FALSE)
if(preg_match('/^(.+)\.min$/', $pathInfo['filename'], $matches))
{
if(!__DEBUG__ && __XE_VERSION_STABLE__)
$file->fileNameNoExt = $matches[1];
$file->isMinified = true;
}
else
{
$file->fileNameNoExt = $pathInfo['filename'];
$file->isMinified = false;
}
$file->isExternalURL = preg_match('@^(https?:)?//@i', $file->filePath) ? true : false;
$file->isCachedScript = !$file->isExternalURL && strpos($file->filePath, 'files/cache/') !== false;
$file->keyName = $file->fileNameNoExt . '.' . $file->fileExtension;
$file->cdnPath = $this->_normalizeFilePath($pathInfo['dirname']);
$originalFilePath = $file->fileRealPath . '/' . $pathInfo['basename'];
// Fix incorrectly minified URL
if($file->isMinified && !$file->isExternalURL && (!file_exists($originalFilePath) || is_link($originalFilePath) ||
(filesize($originalFilePath) < 32 && trim(file_get_contents($originalFilePath)) === $file->keyName)))
{
if(file_exists($file->fileRealPath . '/' . $file->fileNameNoExt . '.' . $file->fileExtension))
{
// if no debug mode, load minifed file
$minifiedFileName = implode('.', array($file->fileNameNoExt, 'min', $file->fileExtension));
$minifiedRealPath = implode('/', array($file->fileRealPath, $minifiedFileName));
if(file_exists($minifiedRealPath))
{
$file->fileName = $minifiedFileName;
}
}
else
{
// Remove .min
if(file_exists(implode('/', array($file->fileRealPath, $file->keyName))))
{
$file->fileName = $file->keyName;
}
$file->fileName = $file->fileNameNoExt . '.' . $file->fileExtension;
$file->isMinified = false;
$originalFilePath = $file->fileRealPath . '/' . $file->fileNameNoExt . '.' . $file->fileExtension;
}
}
$file->targetIe = $targetIe;
// Decide whether to minify this file
if(self::$minify === 'all')
{
$minify_enabled = true;
}
elseif(self::$minify === 'none')
{
$minify_enabled = false;
}
else
{
$minify_enabled = $forceMinify;
}
// Minify file
if($minify_enabled && !$file->isMinified && !$file->isExternalURL && !$file->isCachedScript && strpos($file->filePath, 'common/js/plugins') === false)
{
if(($file->fileExtension === 'css' || $file->fileExtension === 'js') && file_exists($originalFilePath))
{
$minifiedFileName = $file->fileNameNoExt . '.min.' . $file->fileExtension;
$minifiedFileHash = ltrim(str_replace(array('/', '\\'), '.', $pathInfo['dirname']), '.');
$minifiedFilePath = _XE_PATH_ . 'files/cache/minify/' . $minifiedFileHash . '.' . $minifiedFileName;
if(!file_exists($minifiedFilePath) || filemtime($minifiedFilePath) < filemtime($originalFilePath))
{
if($file->fileExtension === 'css')
{
$minifier = new MatthiasMullie\Minify\CSS($originalFilePath);
$content = $minifier->execute($minifiedFilePath);
}
else
{
$minifier = new MatthiasMullie\Minify\JS($originalFilePath);
$content = $minifier->execute($minifiedFilePath);
}
FileHandler::writeFile($minifiedFilePath, $content);
}
$file->fileName = $minifiedFileHash . '.' . $minifiedFileName;
$file->filePath = $this->_getAbsFileUrl('./files/cache/minify');
$file->fileRealPath = _XE_PATH_ . 'files/cache/minify';
$file->keyName = $minifiedFileHash . '.' . $file->fileNameNoExt . '.' . $file->fileExtension;
$file->cdnPath = $this->_normalizeFilePath('./files/cache/minify');
$file->isMinified = true;
}
}
// Process targetIe and media attributes
$file->targetIe = $targetIe;
if($file->fileExtension == 'css')
{
$file->media = $media;

View file

@ -1052,7 +1052,7 @@ class ModuleHandler extends Handler
if(__DEBUG__ == 3)
{
$start_time = getMicroTime();
$start_time = microtime(true);
}
$parent_module = $module;
@ -1127,7 +1127,7 @@ class ModuleHandler extends Handler
if(__DEBUG__ == 3)
{
$GLOBALS['__elapsed_class_load__'] += getMicroTime() - $start_time;
$GLOBALS['__elapsed_class_load__'] += microtime(true) - $start_time;
}
// return the instance

View file

@ -17,244 +17,12 @@ class EmbedFilter
* @var int
*/
var $allowscriptaccessKey = 0;
var $whiteUrlXmlFile = './classes/security/conf/embedWhiteUrl.xml';
var $whiteUrlCacheFile = './files/cache/embedfilter/embedWhiteUrl.php';
var $whiteUrlDefaultFile = './classes/security/conf/whitelist.php';
var $whiteUrlList = array();
var $whiteIframeUrlList = array();
var $mimeTypeList = array();
var $extList = array();
var $parser = NULL;
var $mimeTypeList = array('application/andrew-inset' => 1, 'application/applixware' => 1, 'application/atom+xml' => 1, 'application/atomcat+xml' => 1, 'application/atomsvc+xml' => 1,
'application/ccxml+xml' => 1, 'application/cdmi-capability' => 1, 'application/cdmi-container' => 1, 'application/cdmi-domain' => 1, 'application/cdmi-object' => 1,
'application/cdmi-queue' => 1, 'application/cu-seeme' => 1, 'application/davmount+xml' => 1, 'application/docbook+xml' => 1, 'application/dssc+der' => 1, 'application/dssc+xml' => 1,
'application/ecmascript' => 1, 'application/emma+xml' => 1, 'application/epub+zip' => 1, 'application/exi' => 1, 'application/font-tdpfr' => 1, 'application/gml+xml' => 1,
'application/gpx+xml' => 1, 'application/gxf' => 1, 'application/hyperstudio' => 1, 'application/inkml+xml' => 1, 'application/inkml+xml' => 1, 'application/ipfix' => 1,
'application/java-archive' => 1, 'application/java-serialized-object' => 1, 'application/java-vm' => 1, 'application/javascript' => 1, 'application/json' => 1,
'application/jsonml+json' => 1, 'application/lost+xml' => 1, 'application/mac-binhex40' => 1, 'application/mac-compactpro' => 1, 'application/mads+xml' => 1,
'application/marc' => 1, 'application/marcxml+xml' => 1, 'application/mathematica' => 1, 'application/mathematica' => 1, 'application/mathematica' => 1, 'application/mathml+xml' => 1,
'application/mbox' => 1, 'application/mediaservercontrol+xml' => 1, 'application/metalink+xml' => 1, 'application/metalink4+xml' => 1, 'application/mets+xml' => 1,
'application/mods+xml' => 1, 'application/mp21' => 1, 'application/mp4' => 1, 'application/msword' => 1, 'application/mxf' => 1, 'application/octet-stream' => 1,
'application/octet-stream' => 1, 'application/octet-stream' => 1, 'application/octet-stream' => 1, 'application/octet-stream' => 1, 'application/octet-stream' => 1,
'application/octet-stream' => 1, 'application/octet-stream' => 1, 'application/octet-stream' => 1, 'application/octet-stream' => 1, 'application/octet-stream' => 1,
'application/octet-stream' => 1, 'application/oda' => 1, 'application/oebps-package+xml' => 1, 'application/ogg' => 1, 'application/omdoc+xml' => 1, 'application/onenote' => 1,
'application/onenote' => 1, 'application/onenote' => 1, 'application/onenote' => 1, 'application/oxps' => 1, 'application/patch-ops-error+xml' => 1, 'application/pdf' => 1,
'application/pgp-encrypted' => 1, 'application/pgp-signature' => 1, 'application/pgp-signature' => 1, 'application/pics-rules' => 1, 'application/pkcs10' => 1,
'application/pkcs7-mime' => 1, 'application/pkcs7-mime' => 1, 'application/pkcs7-signature' => 1, 'application/pkcs8' => 1, 'application/pkix-attr-cert' => 1,
'application/pkix-cert' => 1, 'application/pkix-crl' => 1, 'application/pkix-pkipath' => 1, 'application/pkixcmp' => 1, 'application/pls+xml' => 1,
'application/postscript' => 1, 'application/postscript' => 1, 'application/postscript' => 1, 'application/prs.cww' => 1, 'application/pskc+xml' => 1,
'application/rdf+xml' => 1, 'application/reginfo+xml' => 1, 'application/relax-ng-compact-syntax' => 1, 'application/resource-lists+xml' => 1,
'application/resource-lists-diff+xml' => 1, 'application/rls-services+xml' => 1, 'application/rpki-ghostbusters' => 1, 'application/rpki-manifest' => 1,
'application/rpki-roa' => 1, 'application/rsd+xml' => 1, 'application/rss+xml' => 1, 'application/rtf' => 1, 'application/sbml+xml' => 1, 'application/scvp-cv-request' => 1,
'application/scvp-cv-response' => 1, 'application/scvp-vp-request' => 1, 'application/scvp-vp-response' => 1, 'application/sdp' => 1, 'application/set-payment-initiation' => 1,
'application/set-registration-initiation' => 1, 'application/shf+xml' => 1, 'application/smil+xml' => 1, 'application/smil+xml' => 1, 'application/sparql-query' => 1,
'application/sparql-results+xml' => 1, 'application/srgs' => 1, 'application/srgs+xml' => 1, 'application/sru+xml' => 1, 'application/ssdl+xml' => 1,
'application/ssml+xml' => 1, 'application/tei+xml' => 1, 'application/tei+xml' => 1, 'application/thraud+xml' => 1, 'application/timestamped-data' => 1,
'application/vnd.3gpp.pic-bw-large' => 1, 'application/vnd.3gpp.pic-bw-small' => 1, 'application/vnd.3gpp.pic-bw-var' => 1, 'application/vnd.3gpp2.tcap' => 1,
'application/vnd.3m.post-it-notes' => 1, 'application/vnd.accpac.simply.aso' => 1, 'application/vnd.accpac.simply.imp' => 1, 'application/vnd.acucobol' => 1,
'application/vnd.acucorp' => 1, 'application/vnd.acucorp' => 1, 'application/vnd.adobe.air-application-installer-package+zip' => 1, 'application/vnd.adobe.formscentral.fcdt' => 1,
'application/vnd.adobe.fxp' => 1, 'application/vnd.adobe.fxp' => 1, 'application/vnd.adobe.xdp+xml' => 1, 'application/vnd.adobe.xfdf' => 1, 'application/vnd.ahead.space' => 1,
'application/vnd.airzip.filesecure.azf' => 1, 'application/vnd.airzip.filesecure.azs' => 1, 'application/vnd.amazon.ebook' => 1, 'application/vnd.americandynamics.acc' => 1,
'application/vnd.amiga.ami' => 1, 'application/vnd.android.package-archive' => 1, 'application/vnd.anser-web-certificate-issue-initiation' => 1,
'application/vnd.anser-web-funds-transfer-initiation' => 1, 'application/vnd.antix.game-component' => 1, 'application/vnd.apple.installer+xml' => 1,
'application/vnd.apple.mpegurl' => 1, 'application/vnd.aristanetworks.swi' => 1, 'application/vnd.astraea-software.iota' => 1, 'application/vnd.audiograph' => 1,
'application/vnd.blueice.multipass' => 1, 'application/vnd.bmi' => 1, 'application/vnd.businessobjects' => 1, 'application/vnd.chemdraw+xml' => 1,
'application/vnd.chipnuts.karaoke-mmd' => 1, 'application/vnd.cinderella' => 1, 'application/vnd.claymore' => 1, 'application/vnd.cloanto.rp9' => 1,
'application/vnd.clonk.c4group' => 1, 'application/vnd.clonk.c4group' => 1, 'application/vnd.clonk.c4group' => 1, 'application/vnd.clonk.c4group' => 1,
'application/vnd.clonk.c4group' => 1, 'application/vnd.cluetrust.cartomobile-config' => 1, 'application/vnd.cluetrust.cartomobile-config-pkg' => 1,
'application/vnd.commonspace' => 1, 'application/vnd.contact.cmsg' => 1, 'application/vnd.cosmocaller' => 1, 'application/vnd.crick.clicker' => 1,
'application/vnd.crick.clicker.keyboard' => 1, 'application/vnd.crick.clicker.palette' => 1, 'application/vnd.crick.clicker.template' => 1,
'application/vnd.crick.clicker.wordbank' => 1, 'application/vnd.criticaltools.wbs+xml' => 1, 'application/vnd.ctc-posml' => 1, 'application/vnd.cups-ppd' => 1,
'application/vnd.curl.car' => 1, 'application/vnd.curl.pcurl' => 1, 'application/vnd.dart' => 1, 'application/vnd.data-vision.rdz' => 1, 'application/vnd.dece.data' => 1,
'application/vnd.dece.data' => 1, 'application/vnd.dece.data' => 1, 'application/vnd.dece.data' => 1, 'application/vnd.dece.ttml+xml' => 1, 'application/vnd.dece.ttml+xml' => 1,
'application/vnd.dece.unspecified' => 1, 'application/vnd.dece.unspecified' => 1, 'application/vnd.dece.zip' => 1, 'application/vnd.dece.zip' => 1,
'application/vnd.denovo.fcselayout-link' => 1, 'application/vnd.dna' => 1, 'application/vnd.dolby.mlp' => 1, 'application/vnd.dpgraph' => 1, 'application/vnd.dreamfactory' => 1,
'application/vnd.ds-keypoint' => 1, 'application/vnd.dvb.ait' => 1, 'application/vnd.dvb.service' => 1, 'application/vnd.dynageo' => 1, 'application/vnd.ecowin.chart' => 1,
'application/vnd.enliven' => 1, 'application/vnd.epson.esf' => 1, 'application/vnd.epson.msf' => 1, 'application/vnd.epson.quickanime' => 1, 'application/vnd.epson.salt' => 1,
'application/vnd.epson.ssf' => 1, 'application/vnd.eszigno3+xml' => 1, 'application/vnd.eszigno3+xml' => 1, 'application/vnd.ezpix-album' => 1, 'application/vnd.ezpix-package' => 1,
'application/vnd.fdf' => 1, 'application/vnd.fdsn.mseed' => 1, 'application/vnd.fdsn.seed' => 1, 'application/vnd.fdsn.seed' => 1, 'application/vnd.flographit' => 1,
'application/vnd.fluxtime.clip' => 1, 'application/vnd.framemaker' => 1, 'application/vnd.framemaker' => 1, 'application/vnd.framemaker' => 1, 'application/vnd.framemaker' => 1,
'application/vnd.frogans.fnc' => 1, 'application/vnd.frogans.ltf' => 1, 'application/vnd.fsc.weblaunch' => 1, 'application/vnd.fujitsu.oasys' => 1,
'application/vnd.fujitsu.oasys2' => 1, 'application/vnd.fujitsu.oasys3' => 1, 'application/vnd.fujitsu.oasysgp' => 1, 'application/vnd.fujitsu.oasysprs' => 1,
'application/vnd.fujixerox.ddd' => 1, 'application/vnd.fujixerox.docuworks' => 1, 'application/vnd.fujixerox.docuworks.binder' => 1, 'application/vnd.fuzzysheet' => 1,
'application/vnd.genomatix.tuxedo' => 1, 'application/vnd.geogebra.file' => 1, 'application/vnd.geogebra.tool' => 1, 'application/vnd.geometry-explorer' => 1,
'application/vnd.geometry-explorer' => 1, 'application/vnd.geonext' => 1, 'application/vnd.geoplan' => 1, 'application/vnd.geospace' => 1, 'application/vnd.gmx' => 1,
'application/vnd.google-earth.kml+xml' => 1, 'application/vnd.google-earth.kmz' => 1, 'application/vnd.grafeq' => 1, 'application/vnd.grafeq' => 1,
'application/vnd.groove-account' => 1, 'application/vnd.groove-help' => 1, 'application/vnd.groove-identity-message' => 1, 'application/vnd.groove-injector' => 1,
'application/vnd.groove-tool-message' => 1, 'application/vnd.groove-tool-template' => 1, 'application/vnd.groove-vcard' => 1, 'application/vnd.hal+xml' => 1,
'application/vnd.handheld-entertainment+xml' => 1, 'application/vnd.hbci' => 1, 'application/vnd.hhe.lesson-player' => 1, 'application/vnd.hp-hpgl' => 1,
'application/vnd.hp-hpid' => 1, 'application/vnd.hp-hps' => 1, 'application/vnd.hp-jlyt' => 1, 'application/vnd.hp-pcl' => 1, 'application/vnd.hp-pclxl' => 1,
'application/vnd.hydrostatix.sof-data' => 1, 'application/vnd.ibm.minipay' => 1, 'application/vnd.ibm.modcap' => 1, 'application/vnd.ibm.modcap' => 1, 'application/vnd.ibm.modcap' => 1,
'application/vnd.ibm.rights-management' => 1, 'application/vnd.ibm.secure-container' => 1, 'application/vnd.iccprofile' => 1, 'application/vnd.iccprofile' => 1,
'application/vnd.igloader' => 1, 'application/vnd.immervision-ivp' => 1, 'application/vnd.immervision-ivu' => 1, 'application/vnd.insors.igm' => 1, 'application/vnd.intercon.formnet' => 1,
'application/vnd.intercon.formnet' => 1, 'application/vnd.intergeo' => 1, 'application/vnd.intu.qbo' => 1, 'application/vnd.intu.qfx' => 1, 'application/vnd.ipunplugged.rcprofile' => 1,
'application/vnd.irepository.package+xml' => 1, 'application/vnd.is-xpr' => 1, 'application/vnd.isac.fcs' => 1, 'application/vnd.jam' => 1, 'application/vnd.jcp.javame.midlet-rms' => 1,
'application/vnd.jisp' => 1, 'application/vnd.joost.joda-archive' => 1, 'application/vnd.kahootz' => 1, 'application/vnd.kahootz' => 1, 'application/vnd.kde.karbon' => 1,
'application/vnd.kde.kchart' => 1, 'application/vnd.kde.kformula' => 1, 'application/vnd.kde.kivio' => 1, 'application/vnd.kde.kontour' => 1, 'application/vnd.kde.kpresenter' => 1,
'application/vnd.kde.kpresenter' => 1, 'application/vnd.kde.kspread' => 1, 'application/vnd.kde.kword' => 1, 'application/vnd.kde.kword' => 1, 'application/vnd.kenameaapp' => 1,
'application/vnd.kidspiration' => 1, 'application/vnd.kinar' => 1, 'application/vnd.kinar' => 1, 'application/vnd.koan' => 1, 'application/vnd.koan' => 1, 'application/vnd.koan' => 1,
'application/vnd.koan' => 1, 'application/vnd.kodak-descriptor' => 1, 'application/vnd.las.las+xml' => 1, 'application/vnd.llamagraphics.life-balance.desktop' => 1,
'application/vnd.llamagraphics.life-balance.exchange+xml' => 1, 'application/vnd.lotus-1-2-3' => 1, 'application/vnd.lotus-approach' => 1, 'application/vnd.lotus-freelance' => 1,
'application/vnd.lotus-notes' => 1, 'application/vnd.lotus-organizer' => 1, 'application/vnd.lotus-screencam' => 1, 'application/vnd.lotus-wordpro' => 1,
'application/vnd.macports.portpkg' => 1, 'application/vnd.mcd' => 1, 'application/vnd.medcalcdata' => 1, 'application/vnd.mediastation.cdkey' => 1, 'application/vnd.mfer' => 1,
'application/vnd.mfmp' => 1, 'application/vnd.micrografx.flo' => 1, 'application/vnd.micrografx.igx' => 1, 'application/vnd.mif' => 1, 'application/vnd.mobius.daf' => 1,
'application/vnd.mobius.dis' => 1, 'application/vnd.mobius.mbk' => 1, 'application/vnd.mobius.mqy' => 1, 'application/vnd.mobius.msl' => 1, 'application/vnd.mobius.plc' => 1,
'application/vnd.mobius.txf' => 1, 'application/vnd.mophun.application' => 1, 'application/vnd.mophun.certificate' => 1, 'application/vnd.mozilla.xul+xml' => 1,
'application/vnd.ms-artgalry' => 1, 'application/vnd.ms-cab-compressed' => 1, 'application/vnd.ms-excel' => 1, 'application/vnd.ms-excel' => 1, 'application/vnd.ms-excel' => 1,
'application/vnd.ms-excel' => 1, 'application/vnd.ms-excel' => 1, 'application/vnd.ms-excel' => 1, 'application/vnd.ms-excel.addin.macroenabled.12' => 1,
'application/vnd.ms-excel.sheet.binary.macroenabled.12' => 1, 'application/vnd.ms-excel.sheet.macroenabled.12' => 1, 'application/vnd.ms-excel.template.macroenabled.12' => 1,
'application/vnd.ms-fontobject' => 1, 'application/vnd.ms-htmlhelp' => 1, 'application/vnd.ms-ims' => 1, 'application/vnd.ms-lrm' => 1, 'application/vnd.ms-officetheme' => 1,
'application/vnd.ms-pki.seccat' => 1, 'application/vnd.ms-pki.stl' => 1, 'application/vnd.ms-powerpoint' => 1, 'application/vnd.ms-powerpoint' => 1,
'application/vnd.ms-powerpoint' => 1, 'application/vnd.ms-powerpoint.addin.macroenabled.12' => 1, 'application/vnd.ms-powerpoint.presentation.macroenabled.12' => 1,
'application/vnd.ms-powerpoint.slide.macroenabled.12' => 1, 'application/vnd.ms-powerpoint.slideshow.macroenabled.12' => 1,
'application/vnd.ms-powerpoint.template.macroenabled.12' => 1, 'application/vnd.ms-project' => 1, 'application/vnd.ms-project' => 1,
'application/vnd.ms-word.document.macroenabled.12' => 1, 'application/vnd.ms-word.template.macroenabled.12' => 1, 'application/vnd.ms-works' => 1,
'application/vnd.ms-works' => 1, 'application/vnd.ms-works' => 1, 'application/vnd.ms-works' => 1, 'application/vnd.ms-wpl' => 1, 'application/vnd.ms-xpsdocument' => 1,
'application/vnd.mseq' => 1, 'application/vnd.musician' => 1, 'application/vnd.muvee.style' => 1, 'application/vnd.mynfc' => 1, 'application/vnd.neurolanguage.nlu' => 1,
'application/vnd.nitf' => 1, 'application/vnd.nitf' => 1, 'application/vnd.noblenet-directory' => 1, 'application/vnd.noblenet-sealer' => 1, 'application/vnd.noblenet-web' => 1,
'application/vnd.nokia.n-gage.data' => 1, 'application/vnd.nokia.n-gage.symbian.install' => 1, 'application/vnd.nokia.radio-preset' => 1, 'application/vnd.nokia.radio-presets' => 1,
'application/vnd.novadigm.edm' => 1, 'application/vnd.novadigm.edx' => 1, 'application/vnd.novadigm.ext' => 1, 'application/vnd.oasis.opendocument.chart' => 1,
'application/vnd.oasis.opendocument.chart-template' => 1, 'application/vnd.oasis.opendocument.database' => 1, 'application/vnd.oasis.opendocument.formula' => 1,
'application/vnd.oasis.opendocument.formula-template' => 1, 'application/vnd.oasis.opendocument.graphics' => 1, 'application/vnd.oasis.opendocument.graphics-template' => 1,
'application/vnd.oasis.opendocument.image' => 1, 'application/vnd.oasis.opendocument.image-template' => 1, 'application/vnd.oasis.opendocument.presentation' => 1,
'application/vnd.oasis.opendocument.presentation-template' => 1, 'application/vnd.oasis.opendocument.spreadsheet' => 1, 'application/vnd.oasis.opendocument.spreadsheet-template' => 1,
'application/vnd.oasis.opendocument.text' => 1, 'application/vnd.oasis.opendocument.text-master' => 1, 'application/vnd.oasis.opendocument.text-template' => 1,
'application/vnd.oasis.opendocument.text-web' => 1, 'application/vnd.olpc-sugar' => 1, 'application/vnd.oma.dd2+xml' => 1, 'application/vnd.openofficeorg.extension' => 1,
'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 1, 'application/vnd.openxmlformats-officedocument.presentationml.slide' => 1,
'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 1, 'application/vnd.openxmlformats-officedocument.presentationml.template' => 1,
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 1, 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 1,
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 1, 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 1,
'application/vnd.osgeo.mapguide.package' => 1, 'application/vnd.osgi.dp' => 1, 'application/vnd.osgi.subsystem' => 1, 'application/vnd.palm' => 1, 'application/vnd.palm' => 1,
'application/vnd.palm' => 1, 'application/vnd.pawaafile' => 1, 'application/vnd.pg.format' => 1, 'application/vnd.pg.osasli' => 1, 'application/vnd.picsel' => 1, 'application/vnd.pmi.widget' => 1,
'application/vnd.pocketlearn' => 1, 'application/vnd.powerbuilder6' => 1, 'application/vnd.previewsystems.box' => 1, 'application/vnd.proteus.magazine' => 1,
'application/vnd.publishare-delta-tree' => 1, 'application/vnd.pvi.ptid1' => 1, 'application/vnd.quark.quarkxpress' => 1, 'application/vnd.quark.quarkxpress' => 1,
'application/vnd.quark.quarkxpress' => 1, 'application/vnd.quark.quarkxpress' => 1, 'application/vnd.quark.quarkxpress' => 1, 'application/vnd.quark.quarkxpress' => 1,
'application/vnd.realvnc.bed' => 1, 'application/vnd.recordare.musicxml' => 1, 'application/vnd.recordare.musicxml+xml' => 1, 'application/vnd.rig.cryptonote' => 1,
'application/vnd.rim.cod' => 1, 'application/vnd.rn-realmedia' => 1, 'application/vnd.rn-realmedia-vbr' => 1, 'application/vnd.route66.link66+xml' => 1, 'application/vnd.sailingtracker.track' => 1,
'application/vnd.seemail' => 1, 'application/vnd.sema' => 1, 'application/vnd.semd' => 1, 'application/vnd.semf' => 1, 'application/vnd.shana.informed.formdata' => 1,
'application/vnd.shana.informed.formtemplate' => 1, 'application/vnd.shana.informed.interchange' => 1, 'application/vnd.shana.informed.package' => 1, 'application/vnd.simtech-mindmapper' => 1,
'application/vnd.simtech-mindmapper' => 1, 'application/vnd.smaf' => 1, 'application/vnd.smart.teacher' => 1, 'application/vnd.solent.sdkm+xml' => 1, 'application/vnd.solent.sdkm+xml' => 1,
'application/vnd.spotfire.dxp' => 1, 'application/vnd.spotfire.sfs' => 1, 'application/vnd.stardivision.calc' => 1, 'application/vnd.stardivision.draw' => 1,
'application/vnd.stardivision.impress' => 1, 'application/vnd.stardivision.math' => 1, 'application/vnd.stardivision.writer' => 1, 'application/vnd.stardivision.writer' => 1,
'application/vnd.stardivision.writer-global' => 1, 'application/vnd.stepmania.package' => 1, 'application/vnd.stepmania.stepchart' => 1, 'application/vnd.sun.xml.calc' => 1,
'application/vnd.sun.xml.calc.template' => 1, 'application/vnd.sun.xml.draw' => 1, 'application/vnd.sun.xml.draw.template' => 1, 'application/vnd.sun.xml.impress' => 1,
'application/vnd.sun.xml.impress.template' => 1, 'application/vnd.sun.xml.math' => 1, 'application/vnd.sun.xml.writer' => 1, 'application/vnd.sun.xml.writer.global' => 1,
'application/vnd.sun.xml.writer.template' => 1, 'application/vnd.sus-calendar' => 1, 'application/vnd.sus-calendar' => 1, 'application/vnd.svd' => 1, 'application/vnd.symbian.install' => 1,
'application/vnd.symbian.install' => 1, 'application/vnd.syncml+xml' => 1, 'application/vnd.syncml.dm+wbxml' => 1, 'application/vnd.syncml.dm+xml' => 1,
'application/vnd.tao.intent-module-archive' => 1, 'application/vnd.tcpdump.pcap' => 1, 'application/vnd.tcpdump.pcap' => 1, 'application/vnd.tcpdump.pcap' => 1,
'application/vnd.tmobile-livetv' => 1, 'application/vnd.trid.tpt' => 1, 'application/vnd.triscape.mxs' => 1, 'application/vnd.trueapp' => 1, 'application/vnd.ufdl' => 1, 'application/vnd.ufdl' => 1,
'application/vnd.uiq.theme' => 1, 'application/vnd.umajin' => 1, 'application/vnd.unity' => 1, 'application/vnd.uoml+xml' => 1, 'application/vnd.vcx' => 1, 'application/vnd.visio' => 1,
'application/vnd.visio' => 1, 'application/vnd.visio' => 1, 'application/vnd.visio' => 1, 'application/vnd.visionary' => 1, 'application/vnd.vsf' => 1, 'application/vnd.wap.wbxml' => 1,
'application/vnd.wap.wmlc' => 1, 'application/vnd.wap.wmlscriptc' => 1, 'application/vnd.webturbo' => 1, 'application/vnd.wolfram.player' => 1, 'application/vnd.wordperfect' => 1,
'application/vnd.wqd' => 1, 'application/vnd.wt.stf' => 1, 'application/vnd.xara' => 1, 'application/vnd.xfdl' => 1, 'application/vnd.yamaha.hv-dic' => 1, 'application/vnd.yamaha.hv-script' => 1,
'application/vnd.yamaha.hv-voice' => 1, 'application/vnd.yamaha.openscoreformat' => 1, 'application/vnd.yamaha.openscoreformat.osfpvg+xml' => 1, 'application/vnd.yamaha.smaf-audio' => 1,
'application/vnd.yamaha.smaf-phrase' => 1, 'application/vnd.yellowriver-custom-menu' => 1, 'application/vnd.zul' => 1, 'application/vnd.zul' => 1, 'application/vnd.zzazz.deck+xml' => 1,
'application/voicexml+xml' => 1, 'application/widget' => 1, 'application/winhlp' => 1, 'application/wsdl+xml' => 1, 'application/wspolicy+xml' => 1, 'application/x-7z-compressed' => 1,
'application/x-abiword' => 1, 'application/x-ace-compressed' => 1, 'application/x-apple-diskimage' => 1, 'application/x-authorware-bin' => 1, 'application/x-authorware-bin' => 1,
'application/x-authorware-bin' => 1, 'application/x-authorware-bin' => 1, 'application/x-authorware-map' => 1, 'application/x-authorware-seg' => 1, 'application/x-bcpio' => 1,
'application/x-bittorrent' => 1, 'application/x-blorb' => 1, 'application/x-blorb' => 1, 'application/x-bzip' => 1, 'application/x-bzip2' => 1, 'application/x-bzip2' => 1, 'application/x-cbr' => 1,
'application/x-cbr' => 1, 'application/x-cbr' => 1, 'application/x-cbr' => 1, 'application/x-cbr' => 1, 'application/x-cdlink' => 1, 'application/x-cfs-compressed' => 1, 'application/x-chat' => 1,
'application/x-chess-pgn' => 1, 'application/x-conference' => 1, 'application/x-cpio' => 1, 'application/x-csh' => 1, 'application/x-debian-package' => 1, 'application/x-debian-package' => 1,
'application/x-dgc-compressed' => 1, 'application/x-director' => 1, 'application/x-director' => 1, 'application/x-director' => 1, 'application/x-director' => 1, 'application/x-director' => 1,
'application/x-director' => 1, 'application/x-director' => 1, 'application/x-director' => 1, 'application/x-director' => 1, 'application/x-doom' => 1, 'application/x-dtbncx+xml' => 1,
'application/x-dtbook+xml' => 1, 'application/x-dtbresource+xml' => 1, 'application/x-dvi' => 1, 'application/x-envoy' => 1, 'application/x-eva' => 1, 'application/x-font-bdf' => 1,
'application/x-font-ghostscript' => 1, 'application/x-font-linux-psf' => 1, 'application/x-font-otf' => 1, 'application/x-font-pcf' => 1, 'application/x-font-snf' => 1,
'application/x-font-ttf' => 1, 'application/x-font-ttf' => 1, 'application/x-font-type1' => 1, 'application/x-font-type1' => 1, 'application/x-font-type1' => 1, 'application/x-font-type1' => 1,
'application/x-font-woff' => 1, 'application/x-freearc' => 1, 'application/x-futuresplash' => 1, 'application/x-gca-compressed' => 1, 'application/x-glulx' => 1, 'application/x-gnumeric' => 1,
'application/x-gramps-xml' => 1, 'application/x-gtar' => 1, 'application/x-hdf' => 1, 'application/x-install-instructions' => 1, 'application/x-iso9660-image' => 1,
'application/x-java-jnlp-file' => 1, 'application/x-latex' => 1, 'application/x-lzh-compressed' => 1, 'application/x-lzh-compressed' => 1, 'application/x-mie' => 1,
'application/x-mobipocket-ebook' => 1, 'application/x-mobipocket-ebook' => 1, 'application/x-ms-application' => 1, 'application/x-ms-shortcut' => 1, 'application/x-ms-wmd' => 1,
'application/x-ms-wmz' => 1, 'application/x-ms-xbap' => 1, 'application/x-msaccess' => 1, 'application/x-msbinder' => 1, 'application/x-mscardfile' => 1, 'application/x-msclip' => 1,
'application/x-msdownload' => 1, 'application/x-msdownload' => 1, 'application/x-msdownload' => 1, 'application/x-msdownload' => 1, 'application/x-msdownload' => 1, 'application/x-msmediaview' => 1,
'application/x-msmediaview' => 1, 'application/x-msmediaview' => 1, 'application/x-msmetafile' => 1, 'application/x-msmetafile' => 1, 'application/x-msmetafile' => 1, 'application/x-msmetafile' => 1,
'application/x-msmoney' => 1, 'application/x-mspublisher' => 1, 'application/x-msschedule' => 1, 'application/x-msterminal' => 1, 'application/x-mswrite' => 1, 'application/x-netcdf' => 1,
'application/x-netcdf' => 1, 'application/x-nzb' => 1, 'application/x-pkcs12' => 1, 'application/x-pkcs12' => 1, 'application/x-pkcs7-certificates' => 1, 'application/x-pkcs7-certificates' => 1,
'application/x-pkcs7-certreqresp' => 1, 'application/x-rar-compressed' => 1, 'application/x-research-info-systems' => 1, 'application/x-sh' => 1, 'application/x-shar' => 1,
'application/x-shockwave-flash' => 1, 'application/x-silverlight-app' => 1, 'application/x-silverlight-2' => 1, 'application/x-sql' => 1, 'application/x-stuffit' => 1, 'application/x-stuffitx' => 1,
'application/x-subrip' => 1, 'application/x-sv4cpio' => 1, 'application/x-sv4crc' => 1, 'application/x-t3vm-image' => 1, 'application/x-tads' => 1, 'application/x-tar' => 1, 'application/x-tcl' => 1,
'application/x-tex' => 1, 'application/x-tex-tfm' => 1, 'application/x-texinfo' => 1, 'application/x-texinfo' => 1, 'application/x-tgif' => 1, 'application/x-ustar' => 1, 'application/x-wais-source' => 1,
'application/x-x509-ca-cert' => 1, 'application/x-x509-ca-cert' => 1, 'application/x-xfig' => 1, 'application/x-xliff+xml' => 1, 'application/x-xpinstall' => 1, 'application/x-xz' => 1,
'application/x-zmachine' => 1, 'application/x-zmachine' => 1, 'application/x-zmachine' => 1, 'application/x-zmachine' => 1, 'application/x-zmachine' => 1, 'application/x-zmachine' => 1,
'application/x-zmachine' => 1, 'application/x-zmachine' => 1, 'application/xaml+xml' => 1, 'application/xcap-diff+xml' => 1, 'application/xenc+xml' => 1, 'application/xhtml+xml' => 1,
'application/xhtml+xml' => 1, 'application/xml' => 1, 'application/xml' => 1, 'application/xml-dtd' => 1, 'application/xop+xml' => 1, 'application/xproc+xml' => 1, 'application/xslt+xml' => 1,
'application/xspf+xml' => 1, 'application/xv+xml' => 1, 'application/xv+xml' => 1, 'application/xv+xml' => 1, 'application/xv+xml' => 1, 'application/yang' => 1, 'application/yin+xml' => 1,
'application/zip' => 1, 'audio/adpcm' => 1, 'audio/basic' => 1, 'audio/basic' => 1, 'audio/midi' => 1, 'audio/midi' => 1, 'audio/midi' => 1, 'audio/midi' => 1, 'audio/mp4' => 1, 'audio/mpeg' => 1,
'audio/mpeg' => 1, 'audio/mpeg' => 1, 'audio/mpeg' => 1, 'audio/mpeg' => 1, 'audio/mpeg' => 1, 'audio/ogg' => 1, 'audio/ogg' => 1, 'audio/ogg' => 1, 'audio/s3m' => 1, 'audio/silk' => 1,
'audio/vnd.dece.audio' => 1, 'audio/vnd.dece.audio' => 1, 'audio/vnd.digital-winds' => 1, 'audio/vnd.dra' => 1, 'audio/vnd.dts' => 1, 'audio/vnd.dts.hd' => 1, 'audio/vnd.lucent.voice' => 1,
'audio/vnd.ms-playready.media.pya' => 1, 'audio/vnd.nuera.ecelp4800' => 1, 'audio/vnd.nuera.ecelp7470' => 1, 'audio/vnd.nuera.ecelp9600' => 1, 'audio/vnd.rip' => 1, 'audio/webm' => 1,
'audio/x-aac' => 1, 'audio/x-aiff' => 1, 'audio/x-aiff' => 1, 'audio/x-aiff' => 1, 'audio/x-caf' => 1, 'audio/x-flac' => 1, 'audio/x-matroska' => 1, 'audio/x-mpegurl' => 1, 'audio/x-ms-wax' => 1,
'audio/x-ms-wma' => 1, 'audio/x-pn-realaudio' => 1, 'audio/x-pn-realaudio' => 1, 'audio/x-pn-realaudio-plugin' => 1, 'audio/x-wav' => 1, 'audio/xm' => 1, 'chemical/x-cdx' => 1, 'chemical/x-cif' => 1,
'chemical/x-cmdf' => 1, 'chemical/x-cml' => 1, 'chemical/x-csml' => 1, 'chemical/x-xyz' => 1, 'image/bmp' => 1, 'image/cgm' => 1, 'image/g3fax' => 1, 'image/gif' => 1, 'image/ief' => 1, 'image/jpeg' => 1,
'image/jpeg' => 1, 'image/jpeg' => 1, 'image/ktx' => 1, 'image/png' => 1, 'image/prs.btif' => 1, 'image/sgi' => 1, 'image/svg+xml' => 1, 'image/svg+xml' => 1, 'image/tiff' => 1, 'image/tiff' => 1,
'image/vnd.adobe.photoshop' => 1, 'image/vnd.dece.graphic' => 1, 'image/vnd.dece.graphic' => 1, 'image/vnd.dece.graphic' => 1, 'image/vnd.dece.graphic' => 1, 'image/vnd.dvb.subtitle' => 1,
'image/vnd.djvu' => 1, 'image/vnd.djvu' => 1, 'image/vnd.dwg' => 1, 'image/vnd.dxf' => 1, 'image/vnd.fastbidsheet' => 1, 'image/vnd.fpx' => 1, 'image/vnd.fst' => 1, 'image/vnd.fujixerox.edmics-mmr' => 1,
'image/vnd.fujixerox.edmics-rlc' => 1, 'image/vnd.ms-modi' => 1, 'image/vnd.ms-photo' => 1, 'image/vnd.net-fpx' => 1, 'image/vnd.wap.wbmp' => 1, 'image/vnd.xiff' => 1, 'image/webp' => 1,
'image/x-3ds' => 1, 'image/x-cmu-raster' => 1, 'image/x-cmx' => 1, 'image/x-freehand' => 1, 'image/x-freehand' => 1, 'image/x-freehand' => 1, 'image/x-freehand' => 1, 'image/x-freehand' => 1,
'image/x-icon' => 1, 'image/x-mrsid-image' => 1, 'image/x-pcx' => 1, 'image/x-pict' => 1, 'image/x-pict' => 1, 'image/x-portable-anymap' => 1, 'image/x-portable-bitmap' => 1,
'image/x-portable-graymap' => 1, 'image/x-portable-pixmap' => 1, 'image/x-rgb' => 1, 'image/x-tga' => 1, 'image/x-xbitmap' => 1, 'image/x-xpixmap' => 1, 'image/x-xwindowdump' => 1,
'message/rfc822' => 1, 'message/rfc822' => 1, 'model/iges' => 1, 'model/iges' => 1, 'model/mesh' => 1, 'model/mesh' => 1, 'model/mesh' => 1, 'model/vnd.collada+xml' => 1, 'model/vnd.dwf' => 1,
'model/vnd.gdl' => 1, 'model/vnd.gtw' => 1, 'model/vnd.mts' => 1, 'model/vnd.vtu' => 1, 'model/vrml' => 1, 'model/vrml' => 1, 'model/x3d+binary' => 1, 'model/x3d+binary' => 1, 'model/x3d+vrml' => 1,
'model/x3d+vrml' => 1, 'model/x3d+xml' => 1, 'model/x3d+xml' => 1, 'video/3gpp' => 1, 'video/3gpp2' => 1, 'video/h261' => 1, 'video/h263' => 1, 'video/h264' => 1, 'video/jpeg' => 1, 'video/jpm' => 1,
'video/jpm' => 1, 'video/mj2' => 1, 'video/mj2' => 1, 'video/mp4' => 1, 'video/mp4' => 1, 'video/mp4' => 1, 'video/mpeg' => 1, 'video/mpeg' => 1, 'video/mpeg' => 1, 'video/mpeg' => 1, 'video/mpeg' => 1,
'video/ogg' => 1, 'video/quicktime' => 1, 'video/quicktime' => 1, 'video/vnd.dece.hd' => 1, 'video/vnd.dece.hd' => 1, 'video/vnd.dece.mobile' => 1, 'video/vnd.dece.mobile' => 1, 'video/vnd.dece.pd' => 1,
'video/vnd.dece.pd' => 1, 'video/vnd.dece.sd' => 1, 'video/vnd.dece.sd' => 1, 'video/vnd.dece.video' => 1, 'video/vnd.dece.video' => 1, 'video/vnd.dvb.file' => 1, 'video/vnd.fvt' => 1,
'video/vnd.mpegurl' => 1, 'video/vnd.mpegurl' => 1, 'video/vnd.ms-playready.media.pyv' => 1, 'video/vnd.uvvu.mp4' => 1, 'video/vnd.uvvu.mp4' => 1, 'video/vnd.vivo' => 1, 'video/webm' => 1,
'video/x-f4v' => 1, 'video/x-fli' => 1, 'video/x-flv' => 1, 'video/x-m4v' => 1, 'video/x-matroska' => 1, 'video/x-matroska' => 1, 'video/x-matroska' => 1, 'video/x-mng' => 1, 'video/x-ms-asf' => 1,
'video/x-ms-asf' => 1, 'video/x-ms-vob' => 1, 'video/x-ms-wm' => 1, 'video/x-ms-wmv' => 1, 'video/x-ms-wmx' => 1, 'video/x-ms-wvx' => 1, 'video/x-msvideo' => 1, 'video/x-sgi-movie' => 1,
'video/x-smv' => 1, 'x-conference/x-cooltalk' => 1
);
var $extList = array('ez' => 1, 'aw' => 1, 'atom' => 1, 'atomcat' => 1, 'atomsvc' => 1, 'ccxml' => 1, 'cdmia' => 1, 'cdmic' => 1, 'cdmid' => 1, 'cdmio' => 1, 'cdmiq' => 1, 'cu' => 1, 'davmount' => 1,
'dbk' => 1, 'dssc' => 1, 'xdssc' => 1, 'ecma' => 1, 'emma' => 1, 'epub' => 1, 'exi' => 1, 'pfr' => 1, 'gml' => 1, 'gpx' => 1, 'gxf' => 1, 'stk' => 1, 'ink' => 1, 'inkml' => 1, 'ipfix' => 1, 'jar' => 1,
'ser' => 1, 'class' => 1, 'js' => 1, 'json' => 1, 'jsonml' => 1, 'lostxml' => 1, 'hqx' => 1, 'cpt' => 1, 'mads' => 1, 'mrc' => 1, 'mrcx' => 1, 'ma' => 1, 'nb' => 1, 'mb' => 1, 'mathml' => 1, 'mbox' => 1,
'mscml' => 1, 'metalink' => 1, 'meta4' => 1, 'mets' => 1, 'mods' => 1, 'm21 mp21' => 1, 'mp4s' => 1, 'doc dot' => 1, 'mxf' => 1, 'bin' => 1, 'dms' => 1, 'lrf' => 1, 'mar' => 1, 'so' => 1, 'dist' => 1,
'distz' => 1, 'pkg' => 1, 'bpk' => 1, 'dump' => 1, 'elc' => 1, 'deploy' => 1, 'oda' => 1, 'opf' => 1, 'ogx' => 1, 'omdoc' => 1, 'onetoc' => 1, 'onetoc2' => 1, 'onetmp' => 1, 'onepkg' => 1, 'oxps' => 1,
'xer' => 1, 'pdf' => 1, 'pgp' => 1, 'asc' => 1, 'sig' => 1, 'prf' => 1, 'p10' => 1, 'p7m' => 1, 'p7c' => 1, 'p7s' => 1, 'p8' => 1, 'ac' => 1, 'cer' => 1, 'crl' => 1, 'pkipath' => 1, 'pki' => 1, 'pls' => 1,
'ai' => 1, 'eps' => 1, 'ps' => 1, 'cww' => 1, 'pskcxml' => 1, 'rdf' => 1, 'rif' => 1, 'rnc' => 1, 'rl' => 1, 'rld' => 1, 'rs' => 1, 'gbr' => 1, 'mft' => 1, 'roa' => 1, 'rsd' => 1, 'rss' => 1, 'rtf' => 1,
'sbml' => 1, 'scq' => 1, 'scs' => 1, 'spq' => 1, 'spp' => 1, 'sdp' => 1, 'setpay' => 1, 'setreg' => 1, 'shf' => 1, 'smi' => 1, 'smil' => 1, 'rq' => 1, 'srx' => 1, 'gram' => 1, 'grxml' => 1, 'sru' => 1,
'ssdl' => 1, 'ssml' => 1, 'tei' => 1, 'teicorpus' => 1, 'tfi' => 1, 'tsd' => 1, 'plb' => 1, 'psb' => 1, 'pvb' => 1, 'tcap' => 1, 'pwn' => 1, 'aso' => 1, 'imp' => 1, 'acu' => 1, 'atc' => 1, 'acutc' => 1,
'air' => 1, 'fcdt' => 1, 'fxp' => 1, 'fxpl' => 1, 'xdp' => 1, 'xfdf' => 1, 'ahead' => 1, 'azf' => 1, 'azs' => 1, 'azw' => 1, 'acc' => 1, 'ami' => 1, 'apk' => 1, 'cii' => 1, 'fti' => 1, 'atx' => 1, 'mpkg' => 1,
'm3u8' => 1, 'swi' => 1, 'iota' => 1, 'aep' => 1, 'mpm' => 1, 'bmi' => 1, 'rep' => 1, 'cdxml' => 1, 'mmd' => 1, 'cdy' => 1, 'cla' => 1, 'rp9' => 1, 'c4g' => 1, 'c4d' => 1, 'c4f' => 1, 'c4p' => 1, 'c4u' => 1,
'c11amc' => 1, 'c11amz' => 1, 'csp' => 1, 'cdbcmsg' => 1, 'cmc' => 1, 'clkx' => 1, 'clkk' => 1, 'clkp' => 1, 'clkt' => 1, 'clkw' => 1, 'wbs' => 1, 'pml' => 1, 'ppd' => 1, 'car' => 1, 'pcurl' => 1, 'dart' => 1,
'rdz' => 1, 'uvf' => 1, 'uvvf' => 1, 'uvd' => 1, 'uvvd' => 1, 'uvt' => 1, 'uvvt' => 1, 'uvx' => 1, 'uvvx' => 1, 'uvz' => 1, 'uvvz' => 1, 'fe_launch' => 1, 'dna' => 1, 'mlp' => 1, 'dpg' => 1, 'dfac' => 1,
'kpxx' => 1, 'ait' => 1, 'svc' => 1, 'geo' => 1, 'mag' => 1, 'nml' => 1, 'esf' => 1, 'msf' => 1, 'qam' => 1, 'slt' => 1, 'ssf' => 1, 'es3' => 1, 'et3' => 1, 'ez2' => 1, 'ez3' => 1, 'fdf' => 1, 'mseed' => 1,
'seed' => 1, 'dataless' => 1, 'gph' => 1, 'ftc' => 1, 'fm' => 1, 'frame' => 1, 'maker' => 1, 'book' => 1, 'fnc' => 1, 'ltf' => 1, 'fsc' => 1, 'oas' => 1, 'oa2' => 1, 'oa3' => 1, 'fg5' => 1, 'bh2' => 1, 'ddd' => 1,
'xdw' => 1, 'xbd' => 1, 'fzs' => 1, 'txd' => 1, 'ggb' => 1, 'ggt' => 1, 'gex' => 1, 'gre' => 1, 'gxt' => 1, 'g2w' => 1, 'g3w' => 1, 'gmx' => 1, 'kml' => 1, 'kmz' => 1, 'gqf' => 1, 'gqs' => 1, 'gac' => 1, 'ghf' => 1,
'gim' => 1, 'grv' => 1, 'gtm' => 1, 'tpl' => 1, 'vcg' => 1, 'hal' => 1, 'zmm' => 1, 'hbci' => 1, 'les' => 1, 'hpgl' => 1, 'hpid' => 1, 'hps' => 1, 'jlt' => 1, 'pcl' => 1, 'pclxl' => 1, 'sfd-hdstx' => 1, 'mpy' => 1,
'afp' => 1, 'listafp' => 1, 'list3820' => 1, 'irm' => 1, 'sc' => 1, 'icc' => 1, 'icm' => 1, 'igl' => 1, 'ivp' => 1, 'ivu' => 1, 'igm' => 1, 'xpw' => 1, 'xpx' => 1, 'i2g' => 1, 'qbo' => 1, 'qfx' => 1,
'rcprofile' => 1, 'irp' => 1, 'xpr' => 1, 'fcs' => 1, 'jam' => 1, 'rms' => 1, 'jisp' => 1, 'joda' => 1, 'ktz' => 1, 'ktr' => 1, 'karbon' => 1, 'chrt' => 1, 'kfo' => 1, 'flw' => 1, 'kon' => 1, 'kpr' => 1, 'kpt' => 1,
'ksp' => 1, 'kwd' => 1, 'kwt' => 1, 'htke' => 1, 'kia' => 1, 'kne' => 1, 'knp' => 1, 'skp' => 1, 'skd' => 1, 'skt' => 1, 'skm' => 1, 'sse' => 1, 'lasxml' => 1, 'lbd' => 1, 'lbe' => 1, '123' => 1, 'apr' => 1,
'pre' => 1, 'nsf' => 1, 'org' => 1, 'scm' => 1, 'lwp' => 1, 'portpkg' => 1, 'mcd' => 1, 'mc1' => 1, 'cdkey' => 1, 'mwf' => 1, 'mfm' => 1, 'flo' => 1, 'igx' => 1, 'mif' => 1, 'daf' => 1, 'dis' => 1, 'mbk' => 1,
'mqy' => 1, 'msl' => 1, 'plc' => 1, 'txf' => 1, 'mpn' => 1, 'mpc' => 1, 'xul' => 1, 'cil' => 1, 'cab' => 1, 'xls' => 1, 'xlm' => 1, 'xla' => 1, 'xlc' => 1, 'xlt' => 1, 'xlw' => 1, 'xlam' => 1, 'xlsb' => 1, 'xlsm' => 1,
'xltm' => 1, 'eot' => 1, 'chm' => 1, 'ims' => 1, 'lrm' => 1, 'thmx' => 1, 'cat' => 1, 'stl' => 1, 'ppt' => 1, 'pps' => 1, 'pot' => 1, 'ppam' => 1, 'pptm' => 1, 'sldm' => 1, 'ppsm' => 1, 'potm' => 1, 'mpp' => 1,
'mpt' => 1, 'docm' => 1, 'dotm' => 1, 'wps' => 1, 'wks' => 1, 'wcm' => 1, 'wdb' => 1, 'wpl' => 1, 'xps' => 1, 'mseq' => 1, 'mus' => 1, 'msty' => 1, 'taglet' => 1, 'nlu' => 1, 'nitf' => 1, 'nitf' => 1, 'nnd' => 1,
'nns' => 1, 'nnw' => 1, 'ngdat' => 1, 'n-gage' => 1, 'rpst' => 1, 'rpss' => 1, 'edm' => 1, 'edx' => 1, 'ext' => 1, 'odc' => 1, 'otc' => 1, 'odb' => 1, 'odf' => 1, 'odft' => 1, 'odg' => 1, 'otg' => 1, 'odi' => 1,
'oti' => 1, 'odp' => 1, 'otp' => 1, 'ods' => 1, 'ots' => 1, 'odt' => 1, 'odm' => 1, 'ott' => 1, 'oth' => 1, 'xo' => 1, 'dd2' => 1, 'oxt' => 1, 'pptx' => 1, 'sldx' => 1, 'ppsx' => 1, 'potx' => 1, 'xlsx' => 1, 'xltx' => 1,
'docx' => 1, 'dotx' => 1, 'mgp' => 1, 'dp' => 1, 'esa' => 1, 'pdb' => 1, 'pqa' => 1, 'oprc' => 1, 'paw' => 1, 'str' => 1, 'ei6' => 1, 'efif' => 1, 'wg' => 1, 'plf' => 1, 'pbd' => 1, 'box' => 1, 'mgz' => 1, 'qps' => 1,
'ptid' => 1, 'qxd' => 1, 'qxt' => 1, 'qwd' => 1, 'qwt' => 1, 'qxl' => 1, 'qxb' => 1, 'bed' => 1, 'mxl' => 1, 'musicxml' => 1, 'cryptonote' => 1, 'cod' => 1, 'rm' => 1, 'rmvb' => 1, 'link66' => 1, 'st' => 1, 'see' => 1,
'sema' => 1, 'semd' => 1, 'semf' => 1, 'ifm' => 1, 'itp' => 1, 'iif' => 1, 'ipk' => 1, 'twd' => 1, 'twds' => 1, 'mmf' => 1, 'teacher' => 1, 'sdkm' => 1, 'sdkd' => 1, 'dxp' => 1, 'sfs' => 1, 'sdc' => 1, 'sda' => 1,
'sdd' => 1, 'smf' => 1, 'sdw' => 1, 'vor' => 1, 'sgl' => 1, 'smzip' => 1, 'sm' => 1, 'sxc' => 1, 'stc' => 1, 'sxd' => 1, 'std' => 1, 'sxi' => 1, 'sti' => 1, 'sxm' => 1, 'sxw' => 1, 'sxg' => 1, 'stw' => 1, 'sus' => 1,
'susp' => 1, 'svd' => 1, 'sis' => 1, 'sisx' => 1, 'xsm' => 1, 'bdm' => 1, 'xdm' => 1, 'tao' => 1, 'pcap' => 1, 'cap' => 1, 'dmp' => 1, 'tmo' => 1, 'tpt' => 1, 'mxs' => 1, 'tra' => 1, 'ufd' => 1, 'ufdl' => 1, 'utz' => 1,
'umj' => 1, 'unityweb' => 1, 'uoml' => 1, 'vcx' => 1, 'vsd' => 1, 'vst' => 1, 'vss' => 1, 'vsw' => 1, 'vis' => 1, 'vsf' => 1, 'wbxml' => 1, 'wmlc' => 1, 'wmlsc' => 1, 'wtb' => 1, 'nbp' => 1, 'wpd' => 1, 'wqd' => 1,
'stf' => 1, 'xar' => 1, 'xfdl' => 1, 'hvd' => 1, 'hvs' => 1, 'hvp' => 1, 'osf' => 1, 'osfpvg' => 1, 'saf' => 1, 'spf' => 1, 'cmp' => 1, 'zir' => 1, 'zirz' => 1, 'zaz' => 1, 'vxml' => 1, 'wgt' => 1, 'hlp' => 1, 'wsdl' => 1,
'wspolicy' => 1, '7z' => 1, 'abw' => 1, 'ace' => 1, 'dmg' => 1, 'aab' => 1, 'x32' => 1, 'u32' => 1, 'vox' => 1, 'aam' => 1, 'aas' => 1, 'bcpio' => 1, 'torrent' => 1, 'blb' => 1, 'blorb' => 1, 'bz' => 1, 'bz2' => 1,
'boz' => 1, 'cbr' => 1, 'cba' => 1, 'cbt' => 1, 'cbz' => 1, 'cb7' => 1, 'vcd' => 1, 'cfs' => 1, 'chat' => 1, 'pgn' => 1, 'nsc' => 1, 'cpio' => 1, 'csh' => 1, 'deb' => 1, 'udeb' => 1, 'dgc' => 1, 'dir' => 1, 'dcr' => 1,
'dxr' => 1, 'cst' => 1, 'cct' => 1, 'cxt' => 1, 'w3d' => 1, 'fgd' => 1, 'swa' => 1, 'wad' => 1, 'ncx' => 1, 'dtb' => 1, 'res' => 1, 'dvi' => 1, 'evy' => 1, 'eva' => 1, 'bdf' => 1, 'gsf' => 1, 'psf' => 1, 'otf' => 1,
'pcf' => 1, 'snf' => 1, 'ttf' => 1, 'ttc' => 1, 'pfa' => 1, 'pfb' => 1, 'pfm' => 1, 'afm' => 1, 'woff' => 1, 'arc' => 1, 'spl' => 1, 'gca' => 1, 'ulx' => 1, 'gnumeric' => 1, 'gramps' => 1, 'gtar' => 1, 'hdf' => 1,
'install' => 1, 'iso' => 1, 'jnlp' => 1, 'latex' => 1, 'lzh' => 1, 'lha' => 1, 'mie' => 1, 'prc' => 1, 'mobi' => 1, 'application' => 1, 'lnk' => 1, 'wmd' => 1, 'wmz' => 1, 'xbap' => 1, 'mdb' => 1, 'obd' => 1,
'crd' => 1, 'clp' => 1, 'exe' => 1, 'dll' => 1, 'com' => 1, 'bat' => 1, 'msi' => 1, 'mvb' => 1, 'm13' => 1, 'm14' => 1, 'wmf' => 1, 'wmz' => 1, 'emf' => 1, 'emz' => 1, 'mny' => 1, 'pub' => 1, 'scd' => 1, 'trm' => 1,
'wri' => 1, 'nc' => 1, 'cdf' => 1, 'nzb' => 1, 'p12' => 1, 'pfx' => 1, 'p7b' => 1, 'spc' => 1, 'p7r' => 1, 'rar' => 1, 'ris' => 1, 'sh' => 1, 'shar' => 1, 'swf' => 1, 'xap' => 1, 'sql' => 1, 'sit' => 1, 'sitx' => 1,
'srt' => 1, 'sv4cpio' => 1, 'sv4crc' => 1, 't3' => 1, 'gam' => 1, 'tar' => 1, 'tcl' => 1, 'tex' => 1, 'tfm' => 1, 'texinfo' => 1, 'texi' => 1, 'obj' => 1, 'ustar' => 1, 'src' => 1, 'der' => 1, 'crt' => 1, 'fig' => 1,
'xlf' => 1, 'xpi' => 1, 'xz' => 1, 'z1' => 1, 'z2' => 1, 'z3' => 1, 'z4' => 1, 'z5' => 1, 'z6' => 1, 'z7' => 1, 'z8' => 1, 'xaml' => 1, 'xdf' => 1, 'xenc' => 1, 'xhtml' => 1, 'xht' => 1, 'xml' => 1, 'xsl' => 1, 'dtd' => 1,
'xop' => 1, 'xpl' => 1, 'xslt' => 1, 'xspf' => 1, 'mxml' => 1, 'xhvml' => 1, 'xvml' => 1, 'xvm' => 1, 'yang' => 1, 'yin' => 1, 'zip' => 1, 'adp' => 1, 'au' => 1, 'snd' => 1, 'mid' => 1, 'midi' => 1, 'kar' => 1, 'rmi' => 1,
'mp4a' => 1, 'mpga' => 1, 'mp2' => 1, 'mp2a' => 1, 'mp3' => 1, 'm2a' => 1, 'm3a' => 1, 'oga' => 1, 'ogg' => 1, 'spx' => 1, 's3m' => 1, 'sil' => 1, 'uva' => 1, 'uvva' => 1, 'eol' => 1, 'dra' => 1, 'dts' => 1, 'dtshd' => 1,
'lvp' => 1, 'pya' => 1, 'ecelp4800' => 1, 'ecelp7470' => 1, 'ecelp9600' => 1, 'rip' => 1, 'weba' => 1, 'aac' => 1, 'aif' => 1, 'aiff' => 1, 'aifc' => 1, 'caf' => 1, 'flac' => 1, 'mka' => 1, 'm3u' => 1, 'wax' => 1,
'wma' => 1, 'ram' => 1, 'ra' => 1, 'rmp' => 1, 'wav' => 1, 'xm' => 1, 'cdx' => 1, 'cif' => 1, 'cmdf' => 1, 'cml' => 1, 'csml' => 1, 'xyz' => 1, 'bmp' => 1, 'cgm' => 1, 'g3' => 1, 'gif' => 1, 'ief' => 1, 'jpeg' => 1,
'jpg' => 1, 'jpe' => 1, 'ktx' => 1, 'png' => 1, 'btif' => 1, 'sgi' => 1, 'svg' => 1, 'svgz' => 1, 'tiff' => 1, 'tif' => 1, 'psd' => 1, 'uvi' => 1, 'uvvi' => 1, 'uvg' => 1, 'uvvg' => 1, 'sub' => 1, 'djvu' => 1, 'djv' => 1,
'dwg' => 1, 'dxf' => 1, 'fbs' => 1, 'fpx' => 1, 'fst' => 1, 'mmr' => 1, 'rlc' => 1, 'mdi' => 1, 'wdp' => 1, 'npx' => 1, 'wbmp' => 1, 'xif' => 1, 'webp' => 1, '3ds' => 1, 'ras' => 1, 'cmx' => 1, 'fh' => 1, 'fhc' => 1,
'fh4' => 1, 'fh5' => 1, 'fh7' => 1, 'ico' => 1, 'sid' => 1, 'pcx' => 1, 'pic' => 1, 'pct' => 1, 'pnm' => 1, 'pbm' => 1, 'pgm' => 1, 'ppm' => 1, 'rgb' => 1, 'tga' => 1, 'xbm' => 1, 'xpm' => 1, 'xwd' => 1, 'eml' => 1,
'mime' => 1, 'igs' => 1, 'iges' => 1, 'msh' => 1, 'mesh' => 1, 'silo' => 1, 'dae' => 1, 'dwf' => 1, 'gdl' => 1, 'gtw' => 1, 'mts' => 1, 'vtu' => 1, 'wrl' => 1, 'vrml' => 1, 'x3db' => 1, 'x3dbz' => 1, 'x3dv' => 1,
'x3dvz' => 1, 'x3d' => 1, 'x3dz' => 1, '3gp' => 1, '3g2' => 1, 'h261' => 1, 'h263' => 1, 'h264' => 1, 'jpgv' => 1, 'jpm' => 1, 'jpgm' => 1, 'mj2' => 1, 'mjp2' => 1, 'mp4' => 1, 'mp4v' => 1, 'mpg4' => 1, 'mpeg' => 1,
'mpg' => 1, 'mpe' => 1, 'm1v' => 1, 'm2v' => 1, 'ogv' => 1, 'qt' => 1, 'mov' => 1, 'uvh' => 1, 'uvvh' => 1, 'uvm' => 1, 'uvvm' => 1, 'uvp' => 1, 'uvvp' => 1, 'uvs' => 1, 'uvvs' => 1, 'uvv' => 1, 'uvvv' => 1, 'dvb' => 1,
'fvt' => 1, 'mxu' => 1, 'm4u' => 1, 'pyv' => 1, 'uvu' => 1, 'uvvu' => 1, 'viv' => 1, 'webm' => 1, 'f4v' => 1, 'fli' => 1, 'flv' => 1, 'm4v' => 1, 'mkv' => 1, 'mk3d' => 1, 'mks' => 1, 'mng' => 1, 'asf' => 1, 'asx' => 1,
'vob' => 1, 'wm' => 1, 'wmv' => 1, 'wmx' => 1, 'wvx' => 1, 'avi' => 1, 'movie' => 1, 'smv' => 1, 'ice' => 1,
);
/**
* @constructor
@ -263,10 +31,6 @@ class EmbedFilter
function __construct()
{
$this->_makeWhiteDomainList();
include FileHandler::getRealPath($this->whiteUrlCacheFile);
$this->whiteUrlList = $whiteUrlList;
$this->whiteIframeUrlList = $whiteIframeUrlList;
}
/**
@ -495,7 +259,7 @@ class EmbedFilter
{
foreach($this->whiteUrlList AS $key => $value)
{
if(preg_match('@^' . preg_quote($value) . '@i', $urlAttribute))
if(preg_match('@^https?://' . preg_quote($value, '@') . '@i', $urlAttribute))
{
return TRUE;
}
@ -514,7 +278,7 @@ class EmbedFilter
{
foreach($this->whiteIframeUrlList AS $key => $value)
{
if(preg_match('@^' . preg_quote($value) . '@i', $urlAttribute))
if(preg_match('@^https?://' . preg_quote($value, '@') . '@i', $urlAttribute))
{
return TRUE;
}
@ -595,109 +359,64 @@ class EmbedFilter
*/
function _makeWhiteDomainList($whitelist = NULL)
{
$whiteUrlXmlFile = FileHandler::getRealPath($this->whiteUrlXmlFile);
$whiteUrlCacheFile = FileHandler::getRealPath($this->whiteUrlCacheFile);
$whiteUrlDefaultFile = FileHandler::getRealPath($this->whiteUrlDefaultFile);
$whiteUrlDefaultList = (include $whiteUrlDefaultFile);
$this->extList = $whiteUrlDefaultList['extensions'];
$this->mimeTypeList = $whiteUrlDefaultList['mime'];
$this->whiteUrlList = array();
$this->whiteIframeUrlList = array();
$isMake = FALSE;
if(!file_exists($whiteUrlCacheFile))
if($whitelist !== NULL)
{
$isMake = TRUE;
}
if(file_exists($whiteUrlCacheFile) && filemtime($whiteUrlCacheFile) < filemtime($whiteUrlXmlFile))
{
$isMake = TRUE;
}
if(gettype($whitelist) == 'array' && gettype($whitelist['object']) == 'array' && gettype($whitelist['iframe']) == 'array')
{
$isMake = FALSE;
}
if(isset($whitelist) && gettype($whitelist) == 'object')
{
$isMake = TRUE;
}
if($isMake)
{
$whiteUrlList = array();
$whiteIframeUrlList = array();
if(gettype($whitelist->object) == 'array' && gettype($whitelist->iframe) == 'array')
if(!is_array($whitelist) || !isset($whitelist['object']) || !isset($whitelist['iframe']))
{
$whiteUrlList = $whitelist->object;
$whiteIframeUrlList = $whitelist->iframe;
$whitelist = array(
'object' => isset($whitelist->object) ? $whitelist->object : array(),
'iframe' => isset($whitelist->iframe) ? $whitelist->iframe : array(),
);
}
else
foreach ($whitelist['object'] as $prefix)
{
$xmlBuff = FileHandler::readFile($this->whiteUrlXmlFile);
$xmlParser = new XmlParser();
$domainListObj = $xmlParser->parse($xmlBuff);
$embedDomainList = $domainListObj->whiteurl->embed->domain;
$iframeDomainList = $domainListObj->whiteurl->iframe->domain;
if(!is_array($embedDomainList)) $embedDomainList = array();
if(!is_array($iframeDomainList)) $iframeDomainList = array();
foreach($embedDomainList AS $key => $value)
{
$patternList = $value->pattern;
if(is_array($patternList))
{
foreach($patternList AS $key => $value)
{
$whiteUrlList[] = $value->body;
}
}
else
{
$whiteUrlList[] = $patternList->body;
}
}
foreach($iframeDomainList AS $key => $value)
{
$patternList = $value->pattern;
if(is_array($patternList))
{
foreach($patternList AS $key => $value)
{
$whiteIframeUrlList[] = $value->body;
}
}
else
{
$whiteIframeUrlList[] = $patternList->body;
}
}
$this->whiteUrlList[] = preg_match('@^https?://(.*)$@i', $prefix, $matches) ? $matches[1] : $prefix;
}
foreach ($whitelist['iframe'] as $prefix)
{
$this->whiteIframeUrlList[] = preg_match('@^https?://(.*)$@i', $prefix, $matches) ? $matches[1] : $prefix;
}
}
else
{
foreach ($whiteUrlDefaultList['object'] as $prefix)
{
$this->whiteUrlList[] = $prefix;
}
foreach ($whiteUrlDefaultList['iframe'] as $prefix)
{
$this->whiteIframeUrlList[] = $prefix;
}
$db_info = Context::getDBInfo();
if($db_info->embed_white_object)
if(isset($db_info->embed_white_object) && count($db_info->embed_white_object))
{
$whiteUrlList = array_merge($whiteUrlList, $db_info->embed_white_object);
foreach ($db_info->embed_white_object as $prefix)
{
$this->whiteUrlList[] = preg_match('@^https?://(.*)$@i', $prefix, $matches) ? $matches[1] : $prefix;
}
}
if($db_info->embed_white_iframe)
if(isset($db_info->embed_white_iframe) && count($db_info->embed_white_iframe))
{
$whiteIframeUrlList = array_merge($whiteIframeUrlList, $db_info->embed_white_iframe);
foreach ($db_info->embed_white_iframe as $prefix)
{
$this->whiteIframeUrlList[] = preg_match('@^https?://(.*)$@i', $prefix, $matches) ? $matches[1] : $prefix;
}
}
$whiteUrlList = array_unique($whiteUrlList);
$whiteIframeUrlList = array_unique($whiteIframeUrlList);
asort($whiteUrlList);
asort($whiteIframeUrlList);
$buff = array();
$buff[] = '<?php if(!defined("__XE__")) exit();';
$buff[] = '$whiteUrlList = ' . var_export($whiteUrlList, TRUE) . ';';
$buff[] = '$whiteIframeUrlList = ' . var_export($whiteIframeUrlList, TRUE) . ';';
FileHandler::writeFile($this->whiteUrlCacheFile, implode(PHP_EOL, $buff));
}
}
$this->whiteUrlList = array_unique($this->whiteUrlList);
$this->whiteIframeUrlList = array_unique($this->whiteIframeUrlList);
natcasesort($this->whiteUrlList);
natcasesort($this->whiteIframeUrlList);
}
}
/* End of file : EmbedFilter.class.php */
/* Location: ./classes/security/EmbedFilter.class.php */

View file

@ -26,20 +26,17 @@ class Purifier
private function _setConfig()
{
$whiteDomainRegex = $this->_getWhiteDomainRegx();
//$allowdClasses = array('emoticon');
$this->_config = HTMLPurifier_Config::createDefault();
$this->_config->set('HTML.TidyLevel', 'light');
$this->_config->set('Output.FlashCompat', TRUE);
$this->_config->set('HTML.SafeObject', TRUE);
$this->_config->set('HTML.SafeEmbed', TRUE);
$this->_config->set('HTML.SafeIframe', TRUE);
$this->_config->set('URI.SafeIframeRegexp', $whiteDomainRegex);
$this->_config->set('URI.SafeIframeRegexp', $this->_getWhiteDomainRegexp());
$this->_config->set('Cache.SerializerPath', $this->_cacheDir);
$this->_config->set('Attr.AllowedFrameTargets', array('_blank'));
//$allowdClasses = array('emoticon');
//$this->_config->set('Attr.AllowedClasses', $allowdClasses);
$this->_def = $this->_config->getHTMLDefinition(TRUE);
}
@ -135,32 +132,17 @@ class Purifier
return array_unique($attributeList);
}
private function _getWhiteDomainRegx()
private function _getWhiteDomainRegexp()
{
require_once(_XE_PATH_ . 'classes/security/EmbedFilter.class.php');
$oEmbedFilter = EmbedFilter::getInstance();
$whiteIframeUrlList = $oEmbedFilter->getWhiteIframeUrlList();
$whiteDomainRegex = '%^(';
$whiteDomainCount = count($whiteIframeUrlList);
$i=1;
if(is_array($whiteIframeUrlList))
$whiteDomains = array();
foreach($whiteIframeUrlList as $domain)
{
foreach($whiteIframeUrlList as $value)
{
$whiteDomainRegex .= $value;
if($i < $whiteDomainCount)
{
$whiteDomainRegex .= '|';
}
$i++;
}
$whiteDomains[] = preg_quote($domain, '%');
}
$whiteDomainRegex .= ')%';
return $whiteDomainRegex;
return '%^https?://(' . implode('|', $whiteDomains) . ')%';
}
private function _checkCacheDir()

View file

@ -1,90 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<whiteurl>
<embed>
<domain name="http://www.naver.com" isNAVER="true" desc="네이버">
<pattern>http://serviceapi.nmv.naver.com/</pattern>
<pattern>http://scrap.ad.naver.com/</pattern>
<pattern>http://event.dn.naver.com/sbsplayer/vmplayer.xap</pattern>
</domain>
<domain name="" isNAVER="true" desc="네이버 뮤직 서비스">
<pattern>http://musicplayer.naver.com/naverPlayer/posting/</pattern>
<pattern>http://player.music.naver.com/naverPlayer/posting/</pattern>
</domain>
<domain name="http://www.daum.net" desc="다음">
<pattern>http://flvs.daum.net/flvPlayer.swf</pattern>
<pattern>http://api.v.daum.net/</pattern>
<pattern>http://tvpot.daum.net/playlist/playlist.swf</pattern>
<pattern>http://videofarm.daum.net/</pattern>
</domain>
<domain name="http://www.youtube.com" desc="Youtube">
<pattern>http://www.youtube.com/</pattern>
<pattern>https://www.youtube.com/</pattern>
<pattern>http://www.youtube-nocookie.com/</pattern>
<pattern>https://www.youtube-nocookie.com/</pattern>
</domain>
<domain name="http://www.mgoon.com" desc="엠군">
<pattern>http://play.mgoon.com/</pattern>
<pattern>http://doc.mgoon.com/player/</pattern>
</domain>
<domain name="http://www.pandora.tv" desc="판도라TV">
<pattern>http://flvr.pandora.tv/flv2pan/</pattern>
<pattern>http://imgcdn.pandora.tv/gplayer/pandora_EGplayer.swf</pattern>
<pattern>http://imgcdn.pandora.tv/gplayer/flJal.swf</pattern>
</domain>
<domain name="http://www.tagstory.com" desc="태그스토리">
<pattern>http://play.tagstory.com/player/</pattern>
<pattern>http://www.tagstory.com/player/basic/</pattern>
</domain>
<domain name="" desc="싸이월드">
<pattern>http://dbi.video.cyworld.com/v.sk/</pattern>
</domain>
<domain name="" desc="이글루스 동영상">
<pattern>http://v.egloos.com/v.sk/</pattern>
</domain>
<domain name="http://www.nate.com" desc="네이트">
<pattern>http://v.nate.com/v.sk/</pattern>
<pattern>http://w.blogdoc.nate.com/</pattern>
<pattern>http://blogdoc.nate.com/flash/blogdoc_widget_reco.swf</pattern>
</domain>
<domain name="http://www.kbs.co.kr" desc="KBS">
<pattern>http://www.kbs.co.kr/zzim/vmplayer/vmplayer.xap</pattern>
<pattern>http://vmark.kbs.co.kr/zzim/vmplayer/vmplayer.xap</pattern>
</domain>
<domain name="http://www.sbs.co.kr" desc="SBS">
<pattern>http://netv.sbs.co.kr/sbox/</pattern>
<pattern>http://news.sbs.co.kr/</pattern>
<pattern>http://wizard2.sbs.co.kr/</pattern>
<pattern>http://sbsplayer.sbs.co.kr/</pattern>
</domain>
<domain name="http://www.imbc.com" desc="MBC">
<pattern>http://onemore.imbc.com/ClientBin/oneplus.xap</pattern>
</domain>
<domain name="" isNAVER="true" desc="socialsearch">
<pattern>http://static.campaign.naver.com/</pattern>
</domain>
</embed>
<iframe>
<domain name="http://www.youtube.com" desc="유튜브 동영상" mobile="true">
<pattern>http://www.youtube.com/</pattern>
<pattern>https://www.youtube.com/</pattern>
<pattern>http://www.youtube-nocookie.com/</pattern>
<pattern>https://www.youtube-nocookie.com/</pattern>
</domain>
<domain name="http://maps.google.com" desc="구글맵스" mobile="true">
<pattern>http://maps.google.com/</pattern>
<pattern>http://maps.google.co.kr/</pattern>
</domain>
<domain name="http://flvs.daum.net" desc="다음 TV 팟 동영상" mobile="false">
<pattern>http://flvs.daum.net/</pattern>
</domain>
<domain name="http://www.sbs.co.kr" desc="SBS">
<pattern>http://sbsplayer.sbs.co.kr/</pattern>
</domain>
<domain name="http://www.vimeo.com" desc="vimeo.com">
<pattern>http://player.vimeo.com/</pattern>
</domain>
<domain name="http://tvcast.naver.com" isNAVER="true" desc="NAVER TVCAST">
<pattern>http://serviceapi.rmcnmv.naver.com/</pattern>
</domain>
</iframe>
</whiteurl>

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,6 @@
*/
class TemplateHandler
{
private $compiled_path = 'files/cache/template_compiled/'; ///< path of compiled caches files
private $path = NULL; ///< target directory
private $filename = NULL; ///< target filename
@ -73,11 +72,11 @@ class TemplateHandler
protected function init($tpl_path, $tpl_filename, $tpl_file = '')
{
// verify arguments
if(substr($tpl_path, -1) != '/')
if(!$tpl_path || substr($tpl_path, -1) != '/')
{
$tpl_path .= '/';
}
if(!is_dir($tpl_path))
if($tpl_path === '/' || !is_dir($tpl_path))
{
return;
}
@ -123,7 +122,7 @@ class TemplateHandler
// store the starting time for debug information
if(__DEBUG__ == 3)
{
$start = getMicroTime();
$start = microtime(true);
}
// initiation
@ -184,7 +183,7 @@ class TemplateHandler
// store the ending time for debug information
if(__DEBUG__ == 3)
{
$GLOBALS['__template_elapsed__'] += getMicroTime() - $start;
$GLOBALS['__template_elapsed__'] += microtime(true) - $start;
}
return $output;
@ -366,14 +365,9 @@ class TemplateHandler
return;
}
$__Context = &$GLOBALS['__Context__'];
$__Context = Context::getInstance();
$__Context->tpl_path = $this->path;
if($_SESSION['is_logged'])
{
$__Context->logged_info = Context::get('logged_info');
}
$level = ob_get_level();
ob_start();
if(substr($buff, 0, 7) == 'file://')
@ -694,6 +688,8 @@ class TemplateHandler
case 'load':
case 'unload':
$metafile = '';
$replacements = HTMLDisplayHandler::$replacements;
$attr['target'] = preg_replace(array_keys($replacements), array_values($replacements), $attr['target']);
$pathinfo = pathinfo($attr['target']);
$doUnload = ($m[3] === 'unload');
$isRemote = !!preg_match('@^(https?:)?//@i', $attr['target']);

View file

@ -91,7 +91,7 @@ class XmlParser
// Save the compile starting time for debugging
if(__DEBUG__ == 3)
{
$start = getMicroTime();
$start = microtime(true);
}
$this->lang = Context::getLangType();
@ -143,7 +143,7 @@ class XmlParser
// Save compile starting time for debugging
if(__DEBUG__ == 3)
{
$GLOBALS['__xmlparse_elapsed__'] += getMicroTime() - $start;
$GLOBALS['__xmlparse_elapsed__'] += microtime(true) - $start;
}
return $output;

View file

@ -8,4 +8,4 @@ settings:
bootstrap: _bootstrap.php
colors: true
memory_limit: 1024M
error_level: "E_ALL & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED & ~E_NOTICE"
error_level: "E_ALL & ~E_STRICT & ~E_DEPRECATED & ~E_NOTICE"

View file

@ -1 +0,0 @@
@charset "utf-8";/*! Copyright (C) NAVER <http://www.navercorp.com> */.message{position:relative;margin:1em 0;padding:0 1em;border:1px solid #ddd;border-radius:4px;line-height:1.4;font-size:13px;text-shadow:0 1px 0 rgba(255,255,255,.5);background-color:#f8f8f8}body>.message{margin:1em}.message p{margin:1em 0!important}.message.info{border-color:#BCE8F1;color:#3A87AD;background-color:#D9EDF7}.message.error{border-color:#EED3D7;color:#B94A48;background-color:#F2DEDE}.message.update{border-color:#D6E9C6;color:#468847;background-color:#DFF0D8}

View file

@ -1 +0,0 @@
@charset "utf-8";/*! Copyright (C) NAVER <http://www.navercorp.com> */body,button,input,select,table,textarea{font-family:Tahoma,Geneva,sans-serif;font-size:12px}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}body{position:relative;word-wrap:break-word}a img{border:0}[hidden]{display:none}.xe_content img{max-width:100%;height:auto}@media \0screen{img{max-width:none}}.xe-clearfix:after,.xe-clearfix:before{content:" ";display:table}.xe-clearfix:after{clear:both}.xe-clearfix{zoom:1}.xe-widget-wrapper{overflow:hidden}#popup_menu_area{position:absolute;margin:10px 0;padding:10px;border:1px solid #e9e9e9;border-radius:3px;font-size:12px;box-shadow:0 0 6px #666;filter:progid:DXImageTransform.Microsoft.Shadow(color=#999999, direction=135, strength=5);background:#fff}#popup_menu_area ul{margin:0;padding:0;list-style:none}#popup_menu_area li{margin:0;padding:0;line-height:1.25}#popup_menu_area a{display:block;padding:1px 3px;border-radius:2px;text-decoration:none;color:#333}#popup_menu_area a:active,#popup_menu_area a:focus,#popup_menu_area a:hover{color:#fff;background:#666}.message{position:relative;margin:1em 0;padding:0 1em;border:1px solid #ddd;border-radius:4px;line-height:1.4;font-size:13px;text-shadow:0 1px 0 rgba(255,255,255,.5);background-color:#f8f8f8}body>.message{margin:1em}.message p{margin:1em 0!important}.message.info{border-color:#BCE8F1;color:#3A87AD;background-color:#D9EDF7}.message.error{border-color:#EED3D7;color:#B94A48;background-color:#F2DEDE}.message.update{border-color:#D6E9C6;color:#468847;background-color:#DFF0D8}.wfsr{z-index:100;display:none;position:fixed;left:0;top:0;right:0;margin:0;padding:20px 0 0;border-bottom:1px solid #ccc;text-align:center;font:700 16px/60px "Helvetica Neue",Helvetica,Arial,,Dotum,sans-serif;color:#fff;opacity:.8;filter:alpha(opacity=80);box-shadow:0 0 5px #000;background:#333 url(../../common/img/msg.loading.gif) no-repeat center 15px}.btnArea{clear:both;margin:10px 0;padding:0;text-align:right;zoom:1}.btnArea:after{clear:both;display:block;content:""}.btn{display:inline-block;*display:inline;margin:0;padding:0 12px!important;height:24px!important;overflow:visible;border:1px solid #bbb;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);border-bottom-color:#a2a2a2;border-radius:2px;text-decoration:none!important;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,.75);vertical-align:top;line-height:24px!important;font-family:inherit;font-size:12px;color:#333;*zoom:1;cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}button.btn,input.btn{height:26px!important}.btn:active,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn>a,.btn>button,.btn>input,.btn>span{display:inline-block;*zoom:1;margin:0 -12px!important;padding:0 12px!important;overflow:visible;width:auto;height:24px;border:0;vertical-align:top;text-decoration:none!important;line-height:24px;font-family:inherit;font-size:12px;color:#333;cursor:pointer;background:0 0}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;white-space:nowrap;vertical-align:middle;font-size:0;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px}.btn-group>.btn:last-child{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}

View file

@ -0,0 +1,74 @@
# [XEIcon v2.0.0](http://xpressengine.github.io/XEIcon/)
[한글 문서 바로가기 →](https://github.com/xpressengine/XEIcon/blob/2.0.0-wip/README_kor.md)
### The iconic font and CSS toolkit
XEIcon is a full shite of 820 pictographic icons for easy scalable vector graphics on websites,
created by designer, [Lee Junha](https://github.com/junnaa), and maintained by [XpressEngine](http://www.xpressengine.com).
To get stared, check out [http://xpressengine.github.io/XEIcon](http://xpressengine.github.io/XEIcon)!
## Getting icons
- [Download the latest release](https://github.com/xpressengine/XEIcon/archive/v2.0.0.zip).
- Clone the repo:
```
$ git clone https://github.com/xpressengine/XEIcon.git
```
- Install with [Bower](http://bower.io):
```
$ bower install XEIcon
```
- CDN by [jsDelivr](http://www.jsdelivr.com/#!xeicon):
```html
<link href="//cdn.jsdelivr.net/xeicon/2.0.0/xeicon.min.css"
rel="stylesheet">
```
Read the [Get started page](http://xpressengine.github.io/XEIcon/started.html) for information on the contents and examples, and more.
## Changelog
- v1.0 - Basic icons added, optimized for 24px default.
- v1.0.1 - Detail fix.
- v1.0.2 - Added 78 icons.
- [v1.0.3 GitHub milestone](https://github.com/xpressengine/XEIcon/issues?q=milestone%3A%22XEIcon+1.0.3%22)
- [v1.0.4 GitHub milestone](https://github.com/xpressengine/XEIcon/milestones/XEIcon%201.0.4)
- [v2.0.0 Github milestone](https://github.com/xpressengine/XEIcon/milestones/XEIcon%202.1) - Change all icons style.
## Contributing
Please read through our [contributing guidelines](https://github.com/xpressengine/XEIcon/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
## Versioning
XEIcon library will be maintained under the Semantic Versioning guidelines as much as possible. Releases will be numbered with the following format:
`<major>.<minor>.<patch>`
for more information on SemVer, please visit http://semver.org/
## Maintainors
[@juna](https://github.com/junnaa), [@gunil](http://github.com/gunil), [@bnu](https://github.com/bnu).
## Contributors
[@LeeYoonGu](https://github.com/LeeYoonGu), [@marob](https://www.facebook.com/marob.99).
## Authors
- Email : lee_junha@xpressengine.com
- Facebook : https://www.facebook.com/juna.junhalee
- GitHub : https://github.com/junnaa
## License
- The XEIcon font is licensed under SIL OFL 1.1 :
- http://scripts.sil.org/OFL
- XEIcon CSS, LESS, and SASS files are licensed under the MIT License :
- http://opensource.org/licenses/mit-license.html
- The XEIcon documentation is licensed under the CC BY 4.0 License :
- http://creativecommons.org/licenses/by-sa/4.0
- Full detail : http://xpressengine.github.io/XEIcon/xe_icon_license.html

View file

View file

Before

Width:  |  Height:  |  Size: 775 KiB

After

Width:  |  Height:  |  Size: 775 KiB

Before After
Before After

View file

2864
common/css/xeicon/xeicon.css Normal file

File diff suppressed because it is too large Load diff

1
common/css/xeicon/xeicon.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -21,6 +21,16 @@ if(jQuery) jQuery.noConflict();
($.os.Unix) ? 'Unix' :
($.os.Mac) ? 'Mac' : '';
/* Intercept getScript error due to broken minified script URL */
$(document).ajaxError(function(event, jqxhr, settings, thrownError) {
if(settings.dataType === "script" && (jqxhr.status >= 400 || (jqxhr.responseText && jqxhr.responseText.length < 32))) {
var match = /^(.+)\.min\.(css|js)($|\?)/.exec(settings.url);
if(match) {
$.getScript(match[1] + "." + match[2], settings.success);
}
}
});
/**
* @brief XE 공용 유틸리티 함수
* @namespace XE

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
main.js

1
common/js/x.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

7
common/js/xe.min.js vendored

File diff suppressed because one or more lines are too long

View file

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 6 KiB

After

Width:  |  Height:  |  Size: 6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before After
Before After

Some files were not shown because too many files have changed in this diff Show more