Commit graph

2291 commits

Author SHA1 Message Date
Kijin Sung
c707b3915d
Merge pull request #1009 from kijin/pr/context-tpl-vars
Context 클래스에서 static 속성과 인스턴스 속성을 분명히 구분
2018-03-06 20:49:27 +09:00
Kijin Sung
ed7ed13bb9 Remove and consolidate remainder of non-static methods in Context 2018-03-06 20:30:52 +09:00
Kijin Sung
a1848f5e89 Fix more unnecessary non-static method calls 2018-03-04 00:14:53 +09:00
conory
fe1c182ecc php7.2 Warning: count(): Parameter must be an array or an object that implements Countable 2018-03-03 21:45:45 +09:00
Kijin Sung
61114c5198 Clean up Context::getInstance(), constructor, and oFrontEndFileHandler
대부분의 Context 함수가 static으로 바뀌었기 때문에 기존 자료 호환성을 제외하면
instance를 사용할 일은 이제 거의 없음. instance에는 최소한의 속성만 남기고
생성자(__construct)에 있던 기능도 모두 getInstance()로 옮김.
2018-03-03 12:30:22 +09:00
Kijin Sung
b2852e1936 Clean up SSL action cache file handling 2018-03-03 02:06:19 +09:00
Kijin Sung
e0a762d03a Use $lang as a local variable in template handler 2018-03-03 01:57:16 +09:00
Kijin Sung
9d06f6a9e2 Enable static calling of Context::init() and convert unnecessary instance properties into static properties 2018-03-03 01:44:05 +09:00
Kijin Sung
76aafac4a7 Set Context::$_tpl_vars to global $__Context__ 2018-03-02 21:17:52 +09:00
Kijin Sung
513f136c34 Isolate user-created template vars (Context::set) from Context instance properties 2018-03-02 21:02:59 +09:00
BJRambo
488181eaae FileHandler::writeFile 의 리턴 주석 고침.
기존의 경우 FileHandler::writeFile의 주석이 void으로 반환한다고 되어잇지만 실제 리턴값은 bool과 string으로 리턴합니다. 해당 리턴값주석을 Rhymix\Framework\Storage::write에 있는 내용과 일치 시켰습니다.
2018-02-26 13:36:32 +09:00
conory
54ff7076c7 문서가 존재하지 않는 경우 엉뚱하게 403 코드를 출력하는 문제수정 2018-02-05 18:11:08 +09:00
conory
13ebfbfa8c Revert "context property의 이름과 템플릿 내의 변수 이름이 같을 경우 덮어쓰지는 문제 수정"
This reverts commit 51bd96b66a.
2018-02-01 15:34:00 +09:00
conory
51bd96b66a context property의 이름과 템플릿 내의 변수 이름이 같을 경우 덮어쓰지는 문제 수정 2018-02-01 15:01:40 +09:00
conory
bbba3d013e 28dfc44a86 보완 @kijin 2018-01-30 00:22:38 +09:00
conory
28dfc44a86 913ccf4a3c 보완 2018-01-29 23:38:19 +09:00
conory
913ccf4a3c 디버그 기능 사용시 템플릿 경로를 표시하는 주석 태그 추가
관리자일 경우에만 표시
위젯 캐시 등 사용시 템플릿 주석이 노출될 가능성이 있으므로 HTMLDisplayHandler->prepareToPrint()에서 주석 제거 처리
2018-01-29 22:08:39 +09:00
Kijin Sung
afc0f26d6c Fix path handling in TemplateHandler 2018-01-29 15:07:00 +09:00
BJRambo
6496055581 각종 PHP 7.2 에서 나는 워닝에러를 고침 2018-01-25 20:57:01 +09:00
BJRambo
f2d2867069 PHP7.2 count 관련 워닝에러를 고침. 2018-01-24 16:26:57 +09:00
conory
b180270e08 getExtraVars() 항상 array로 반환될 수 있도록 수정 2018-01-20 18:45:15 +09:00
Kijin Sung
fa2b2914f2 Add getAffectedRows() and getInsertID() to DB classes
쿼리 실행 후 affected rows, last insert ID 값을 받아올 수 있도록
DB 클래스에 관련 메소드를 추가함
2018-01-15 13:59:14 +09:00
Kijin Sung
8ef0d05ecb Fix incorrect translation of use_object_cache setting to XE format 2018-01-13 20:15:48 +09:00
Kijin Sung
038621d1a0 Fix recursion when initializing memberModel 2018-01-13 14:33:00 +09:00
Kijin Sung
c0007767ad Fix recursion when initializing memberModel 2018-01-13 14:26:18 +09:00
Kijin Sung
9a87376e35 Always get $this->user directly from Rhymix\Framework\Session
서드파티 자료가 Context->get('logged_info')에 stdClass를 넣는 경우
$this->user->isAdmin() 등의 메소드를 사용할 수 없게 되는 문제 수정
2018-01-13 14:13:53 +09:00
Kijin Sung
7563ab859d Update jQuery, jQuery Migrate, jQuery UI 2018-01-10 23:53:44 +09:00
Kijin Sung
e0d7ae3641 Fix fatal error when using index hint with mysqli, mysqli_innodb, etc. 2018-01-04 12:07:45 +09:00
Kijin Sung
42a57421f1 Fix check for DB connection in ModuleHandler 2017-12-21 00:19:51 +09:00
Kijin Sung
d3b78d1d47 Fix unnecessary cache file refresh in menu module 2017-12-19 12:00:19 +09:00
conory
f8ac11bda6 isAccessible()로 통일 2017-12-12 13:23:45 +09:00
Kijin Sung
3dbc600aa9 Suppress warnings thrown by count() in template parser 2017-12-09 02:39:14 +09:00
Kijin Sung
b25ce87ae5 Import new XE functions clearStatCache() and invalidateOpcache()
xpressengine/xe-core 23ec7b7

라이믹스는 Storage 클래스에서 파일을 쓸 때마다 opcache와 stat cache를
자동으로 비워주고 있으므로 이런 조치가 필요하지 않으나,
XE와의 호환성을 위해 동일한 함수를 제공함. 사용을 권장하지 않음.
2017-12-09 01:38:46 +09:00
bnu
89e4936fb1 Context::convertEncoding() charset 목록 정리 2017-12-07 12:55:50 +09:00
Kijin Sung
e78189ea5c Fix invisible message content on mobile default skin
- 모바일에서 쪽지 본문이 보이지 않는 문제 수정
- 모바일 쪽지 기본 스킨에서 본문 아래에 목록을 표시하도록 수정
- 항상 Context::get('m') 변수를 사용할 수 있도록 수정
2017-12-03 22:23:48 +09:00
Kijin Sung
487509c1e5 Revert "Revert "Convert default SCSS stylesheet to LESS""
This reverts commit 5586956fea.
2017-12-01 18:02:41 +09:00
Kijin Sung
5586956fea Revert "Convert default SCSS stylesheet to LESS"
This reverts commit 1a98f0974c.
2017-12-01 17:57:30 +09:00
Kijin Sung
1a98f0974c Convert default SCSS stylesheet to LESS
서버단에서 컴파일하는 속도가 SCSS보다 LESS가 훨씬 빠름
2017-12-01 17:32:55 +09:00
Kijin Sung
6f35f5bafc Fix strict count() behavior in PHP 7.2 2017-12-01 01:42:03 +09:00
Kijin Sung
2dbc77ff68 Eliminate null returns in DB class 2017-11-30 23:03:18 +09:00
람츠
f4c19a3e0f $request_method 속성에 대한 주석변경
JSON 추가.
2017-11-28 19:41:52 +09:00
람츠
e2704f684a Update Context.class.php 2017-11-28 19:41:41 +09:00
Kijin Sung
1a81fd43f3 Convert Object class to BaseObject in core classes 2017-11-27 22:34:28 +09:00
Kijin Sung
9a83e71bff Allow adding error message and sprintf() variables using setError()
xpressengine/xe-core#2181 적용시 에러 반환 문법을 단순화하기 위한 조치

기존 방식: return new Object(-1, '에러메시지');
XE 제안 방식: return class_exists('BaseObject') ? new BaseObject(-1, '에러메시지') : new Object('에러메시지');
라이믹스 방식: return $this->setError('에러메시지');

기존의 setError() 메소드가 에러 코드만 받을 수 있어서 호환성 보장에 도움이 안 되므로
에러 코드와 에러 메시지를 동시에 넣을 수 있도록 개선하고,
에러 코드를 넣지 않고 에러 메시지만 지정해도 자동으로 -1 에러 코드가 들어가도록 하였음.
(첫 번째 인자가 정수인지 아닌지에 따라 판단함.)

setError(), setMessage(), setMessageType() 등 기존에 무의미한 반환값을 가지던 메소스들 모두
$this를 반환하도록 함으로써 액션이나 트리거 등의 반환값으로 유효하도록 하고,
원할 경우 method chaining까지 사용할 수 있음.

또한 에러메시지에 변수를 넣어야 할 경우
return new Object(-1, sprintf(Context::getLang('error_msg'), $var1, $var2));
이렇게 복잡해지는 문제도 해결하기 위해
setError()에 추가로 넣은 인자는 모두 자동으로 sprintf() 처리를 거치도록 함.
예: return $this->setError('error_msg', $var1, $var2);

즉, 아래와 같은 호출 형태가 모두 유효함.

  - $this->setError(-1);
  - $this->setError(-1, 'error_msg');
  - $this->setError(-1, 'error_msg', $var1, $var2);
  - $this->setError('error_msg');
  - $this->setError('error_msg', $var1, $var2);

단, 이 커밋 이후 신규 작성하는 코어 클래스나 서드파티 자료에서만 사용할 수 있음.
기존 버전과의 호환성을 유지하기를 원하는 서드파티 자료는 XE에서 제안한 삼항식을 사용해야 함.
2017-11-27 16:33:33 +09:00
Kijin Sung
a8da651f29 Change data type of module_config.config to bigtext
xpressengine/xe-core#2179
xpressengine/xe-core#2180
2017-11-27 13:03:47 +09:00
Kijin Sung
a29fa554c1 Fix compatibility with sketchbook skin after removal of XpressEditor
스케치북 스킨 등에서 XpressEditor 파일을 강제로 로딩하려고 할 경우
CKEditor의 동일 파일로 치환하도록 변경함

https://www.xetown.com/qna/778780

오류가 발생하는 사이트에서는 캐시파일 재생성이 필요할 수 있음
2017-10-29 01:43:22 +09:00
Kijin Sung
87d8ba41e3 Update procMemberAuthAccount
- 불필요한 중복 체크 제거
- 인증 성공시 alert을 사용하지 않고 인증 관련 안내 메시지를 XE_VALIDATOR_MESSAGE에 넣은 후 로그인 화면으로 리다이렉트
- XE_VALIDATOR_MESSAGE를 임의로 지정할 수 있도록 Context::setValidatorMessage() 함수 추가
2017-10-13 17:08:35 +09:00
Kijin Sung
c686cb3229 Clean up duplicate blocking of common scripts 2017-09-20 17:32:11 +09:00
Kijin Sung
a722f279d9 Fix #922 failure to load scripts with the name 'jquery' in it 2017-09-20 17:16:48 +09:00
bnu
f867efacea fix #2146 XEVE-17-028 2017-09-12 23:38:43 +09:00