메뉴얼:$wgVersion
Outdated translations are marked like this.
This deprecated feature should no longer be used, but is still available for reasons of backwards compatibility. This feature was deprecated in version 1.35.0. |
General Settings: $wgVersion | |
---|---|
미디어위키 버전. |
|
이 변수가 소개된 버전: | 1.2.0 |
폐지예정이 된 버전: | 1.35.0 (Gerrit change 481950; git #a5d5ea82) |
이 변수가 사라진 버전: | 계속해서 쓰이고 있음 |
허용값: | (문자열) |
기본값: | Current MediaWiki version - you shouldn't change this! |
기타 설정: 알파벳 순 | 기능별 순 |
설명
미디어위키의 현재 버전 (예를 들면, "1.41.1"). 이 옵션은 지정할 필요가 없습니다. 내부적으로만 이용됩니다.
MW_VERSION
미디어위키 버전: | ≥ 1.35 |
Starting with MediaWiki 1.35, $wgVersion
is deprecated, and replaced with the MW_VERSION
constant.
It is also available in MediaWiki 1.31.7, 1.33.3 and 1.34.1, though this should not be relied on as its presence is required for some release tools.
$wgVersion
will continue to function the same as before in those versions.
예시
미디어위키 1.19 이후에 동작되는 새 기능을 구현하면서, 그 이전 버전의 하위 호환을 원한다면, 다음과 같이 구성할 수 있습니다:
global $wgVersion;
$oldVersion = version_compare( $wgVersion, '1.18', '<=' );
if ( $oldVersion ) {
# 미디어위키 1.18 이전 버전을 위한 코드
} else {
# 미디어위키 1.19 이후를 위한 코드
}
미디어위키 버전: | ≥ 1.35 |
$oldVersion = version_compare( MW_VERSION, '1.39', '<' );
if ( $oldVersion ) {
# Do stuff for MediaWiki 1.35 - 1.38
} else {
# Do stuff for MediaWiki 1.39+
}
However, it is typically recommended that you use feature detection to see whether the method or class you wish to use is available instead of depending upon raw version strings.
같이 보기
- Special:Version – view the version number of a MediaWiki installation (plus much more information) from the web interface.
- 메뉴얼:업그레이드
- 버전