Skip to content

Commit

Permalink
Merge pull request #2 from xpressengine/develop
Browse files Browse the repository at this point in the history
Develop merge from xpressengine:develop
  • Loading branch information
upgle committed May 14, 2014
2 parents 40d92fb + 3e12f70 commit c493dd6
Show file tree
Hide file tree
Showing 72 changed files with 710 additions and 386 deletions.
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Contribution Guide

## Issue 작성
Issue 작성 시 참고해주세요.

* 작성하려는 이슈가 이미 있는지 검색 후 등록해주세요. 비슷한 이슈가 있다면 댓글로 추가 내용을 덧붙일 수 있습니다.
* 이슈에는 하나의 문제 또는 제안을 작성해주세요. 절대 하나의 이슈에 2개 이상의 내용을 적지마세요.
* 이슈는 가능한 상세하고 간결하게 작성해주세요
* 필요하다면 화면을 캡쳐하여 이미지를 업로드할 수 있습니다

## Pull request(PR)
* `master` 브랜치의 코드는 수정하지마세요
* PR은 `develop` 브랜치만 허용합니다.
* `develop` 브랜치를 부모로한 토픽 브랜치를 활용하면 편리합니다.


## 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에 맞지 않는 코드를 발견 하더라도 목적과 관계 없는 코드는 절대 고치지 마세요**
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
# XpressEngine
XpressEngine
============

[![Build Status](https://travis-ci.org/xpressengine/xe-core.svg?branch=master)](https://travis-ci.org/xpressengine/xe-core)
[![License](http://img.shields.io/badge/license-GNU%20LGPL-brightgreen.svg)](http://www.gnu.org/licenses/gpl.html)
[![Latest release](http://img.shields.io/github/release/xpressengine/xe-core.svg)](https://github.com/xpressengine/xe-core/releases)

XpressEngine(XE)은 PHP로 작성한 설치형 CMS(Content Management System)입니다.
오픈소스 라이선스로 누구나 사용 또는 개작할 수 있으며, 개방형 프로젝트로서 누구나 개발에 참여할 수 있습니다.

## Support
* Official sitie (Korean) : http://www.xpressengine.com/

## Maintainers
@akasima @bnu @jhyeon1010 @khongchi @ngleader

## Authors
adrian.vasile.constantin, aerofleet, @akasima, @andreimarin, araste, @bnu, bradly1, buffkj, c2joy, @canto, cbrghost, @ccata17, @ChanMyeong, chinaskyking, chschy, clench, @devjin, @dionisrom, @dorami, @dragan-dan, ducduydaovn, duvent, @Eundong, @florinutz, @flourscent, @flyskyko, @ForPeople, FruitsHake, guny, @haneul, hankm2004, haojilin, heemin, ikko, johnsonshu, juanlee0, k10206, kagami, @khongchi, @lansi951, @largeden, liahona, lickawtl, mayoojin, mglclub, @misol, mmx900, mooo, mosmartin, @nagoon97, @ngleader, nicetwo, ovclas, risapapa, rokmcssu, royallin, rubyeye, ryin005, sanghunjun, @sejin7940, @SMaker, sspa3141, @stellar12, supershop, @taggon, @ucorina, unryong, venister, wdlee91, welcomeju, @YJSoft, ysnglee2000, zero
adrian.vasile.constantin, aerofleet, @akasima, @andreimarin, araste, @bnu, @bongkeun, bradly1, buffkj, c2joy, @canto, cbrghost, @ccata17, @ChanMyeong, chinaskyking, chschy, clench, @cometdev, @devdho, @devjin, @dionisrom, @dorami, @dragan-dan, ducduydaovn, duvent, @Eundong, @florinutz, @flourscent, @flyskyko, @ForPeople, FruitsHake, guny, @haneul, hankm2004, @hansim, haojilin, heemin, @hyeon0142, ikko, @izuzero, johnsonshu, juanlee0, k10206, kagami, @khongchi, @lansi951, @largeden, liahona, lickawtl, @mAKEkr, mayoojin, mglclub, @misol, mmx900, @mog422, mooo, mosmartin, @nagoon97, @ngleader, nicetwo, ovclas, @qw5414, @Rayyin, risapapa, rokmcssu, royallin, rubyeye, ryin005, @samswnlee, sanghunjun, @sejin7940, @smaker, @solidh, sspa3141, @stellar12, supershop, @taggon, @ucorina, unryong, venister, wdlee91, welcomeju, @YJSoft, ysnglee2000, zero

## Contribution Guide
`CONTRIBUTING.md`파일을 참고하세요.

## License
Copyright (C) NAVER <http://www.navercorp.com>
Copyright 2014 NAVER Corp. <http://www.navercorp.com>

This library is free software; you can redistribute it and/or
This program 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.
Expand Down
7 changes: 5 additions & 2 deletions addons/captcha/captcha.addon.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
if(!class_exists('AddonCaptcha', false))
{
// On the mobile mode, XE Core does not load jquery and xe.js as normal.
Context::loadFile(array('./common/js/jquery.min.js', 'head', NULL, -100000), true);
Context::loadFile(array('./common/js/xe.min.js', 'head', NULL, -100000), true);
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
{
Expand Down
7 changes: 5 additions & 2 deletions addons/captcha_member/captcha_member.addon.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
if(!class_exists('AddonMemberCaptcha', false))
{
// On the mobile mode, XE Core does not load jquery and xe.js as normal.
Context::loadFile(array('./common/js/jquery.min.js', 'head', NULL, -100000), true);
Context::loadFile(array('./common/js/xe.min.js', 'head', NULL, -100000), true);
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
{
Expand Down
13 changes: 13 additions & 0 deletions classes/context/Context.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ function init()
$this->context->lang = &$GLOBALS['lang'];
$this->context->_COOKIE = $_COOKIE;

// 20140429 editor/image_link
$this->_checkGlobalVars();

$this->setRequestMethod('');

$this->_setXmlRpcArgument();
Expand Down Expand Up @@ -1115,6 +1118,16 @@ function setRequestMethod($type = '')
($self->request_method = $_SERVER['REQUEST_METHOD']);
}

/**
* handle global arguments
*
* @return void
*/
function _checkGlobalVars()
{
$this->_recursiveCheckVar($_SERVER['HTTP_HOST']);
}

/**
* handle request areguments for GET/POST
*
Expand Down
8 changes: 4 additions & 4 deletions classes/display/HTMLDisplayHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function prepareToPrint(&$output)
$output = preg_replace_callback('!<meta(.*?)(?:\/|)>!is', array($this, '_moveMetaToHeader'), $output);

// change a meta fine(widget often put the tag like <!--Meta:path--> to the content because of caching)
$output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\/\.\@]+)-->/is', array($this, '_transMeta'), $output);
$output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\-\/\.\@]+)-->/is', array($this, '_transMeta'), $output);

// handles a relative path generated by using the rewrite module
if(Context::isAllowRewrite())
Expand Down Expand Up @@ -394,7 +394,7 @@ function _loadJSCSS()
$lang_type = Context::getLangType();

// add common JS/CSS files
if(__DEBUG__)
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);
Expand All @@ -417,7 +417,7 @@ function _loadJSCSS()
// for admin page, add admin css
if(Context::get('module') == 'admin' || strpos(Context::get('act'), 'Admin') > 0)
{
if(__DEBUG__)
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);
Expand Down Expand Up @@ -449,7 +449,7 @@ private function _loadMobileJSCSS()
$lang_type = Context::getLangType();

// add common JS/CSS files
if(__DEBUG__)
if(__DEBUG__ || !__XE_VERSION_STABLE__)
{
$oContext->loadFile(array('./common/css/mobile.css', '', '', -1000000), true);
}
Expand Down
17 changes: 7 additions & 10 deletions classes/extravar/Extravar.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function _getTypeValue($type, $value)

for($i = 0, $c = count($values); $i < $c; $i++)
{
$values[$i] = htmlspecialchars($values[$i], ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
$values[$i] = trim(htmlspecialchars($values[$i], ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
}

return $values;
Expand Down Expand Up @@ -302,21 +302,15 @@ function getValueHTML()
case 'textarea' :
return nl2br($value);

case 'checkbox' :
if(is_array($value))
{
return implode(', ', $value);
}
return $value;

case 'date' :
return zdate($value, "Y-m-d");

case 'checkbox' :
case 'select' :
case 'radio' :
if(is_array($value))
{
return implode(', ', $value);
return implode(',', $value);
}
return $value;

Expand Down Expand Up @@ -426,7 +420,8 @@ function getFormHTML()
Context::loadJavascriptPlugin('ui.datepicker');

$buff[] = '<input type="hidden" name="' . $column_name . '" value="' . $value . '" />';
$buff[] = '<input type="text" id="date_' . $column_name . '" value="' . zdate($value, 'Y-m-d') . '" class="date" /> <input type="button" value="' . Context::getLang('cmd_delete') . '" id="dateRemover_' . $column_name . '" />';
$buff[] = '<input type="text" id="date_' . $column_name . '" value="' . zdate($value, 'Y-m-d') . '" class="date" />';
$buff[] = '<input type="button" value="' . Context::getLang('cmd_delete') . '" class="btn" id="dateRemover_' . $column_name . '" />';
$buff[] = '<script type="text/javascript">';
$buff[] = '//<![CDATA[';
$buff[] = '(function($){';
Expand Down Expand Up @@ -458,6 +453,8 @@ function getFormHTML()
}
if($this->desc)
{
$oModuleController = getController('module');
$oModuleController->replaceDefinedLangCode($this->desc);
$buff[] = '<p>' . htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '</p>';
}

Expand Down
2 changes: 1 addition & 1 deletion classes/frontendfile/FrontEndFileHandler.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private function getFileInfo($fileName, $targetIe = '', $media = 'all')

if(strpos($file->filePath, '://') === FALSE)
{
if(!__DEBUG__)
if(!__DEBUG__ && __XE_VERSION_STABLE__)
{
// if no debug mode, load minifed file
$minifiedFileName = implode('.', array($file->fileNameNoExt, 'min', $file->fileExtension));
Expand Down
4 changes: 0 additions & 4 deletions classes/security/conf/embedWhiteUrl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
<pattern>http://api.v.daum.net/</pattern>
<pattern>http://tvpot.daum.net/playlist/playlist.swf</pattern>
</domain>
<domain name="http://www.mncast.com" desc="엠엔캐스트">
<pattern>http://dory.mncast.com/mncHMovie.swf</pattern>
<pattern>http://dory.mncast.com/mncastPlayer.swf</pattern>
</domain>
<domain name="http://www.youtube.com" desc="Youtube">
<pattern>http://www.youtube.com/v/</pattern>
<pattern>http://www.youtube-nocookie.com/</pattern>
Expand Down
Loading

0 comments on commit c493dd6

Please sign in to comment.