Manual:$wgExternalDiffEngine/ko
| Content handlers and storage: $wgExternalDiffEngine | |
|---|---|
| Name of the external diff engine to use. |
|
| 이 변수가 소개된 버전: | 1.6.0 (r12987) |
| 이 변수가 사라진 버전: | 계속해서 쓰이고 있음 |
| 허용값: | (string) or false |
| 기본값: | false |
| 기타 설정: 알파벳 순 | 기능별 순 | |
상세
Name of the external diff engine to use, or false to use the internal engine.
The possible values are:
false- wikidiff2 if available, PHP implementation else.
- any other string is treated as a path to external diff executable, which is passed two file-path arguments.
The following values are no longer supported as of MW 1.32:
| 미디어위키 버전: | ≤ 1.32 |
'wikidiff2'- Wikimedia's fast difference engine implemented as a PHP/HHVM module.
The following values are no longer supported as of MW 1.27:
| 미디어위키 버전: | ≤ 1.27 |
'wikidiff'그리고'wikidiff3'- treated as false for backwards compatibility.
The external engine should return HTML for a table row containing four columns (two 'marker/content' pairs).
These can be collapsed into one for diff formats that don't require columns, e.g. <tr><td colspan="4"> … </td></tr>
This setting replaces $wgUseExternalDiffEngine.
예시
To display diffs in the format of the common GNU diff program, it is necessary to wrap that executable in a small script such as the following.
This is needed both to get the required HTML wrapper, and also because diff returns non-zero when inputs don't match (which they generally don't for wiki changes).
- externaldiff.sh
#!/bin/bash echo "<tr><td colspan=4><pre>" # @todo This should also escape HTML. diff "$1" "$2" DIFFRET=$? echo "</pre></td></tr>" if [[ $DIFFRET -eq 1 ]]; then exit 0 else exit $DIFFRET fi
- LocalSettings.php
$wgDiffEngine = 'external'; $wgExternalDiffEngine = '/path/to/externaldiff.sh';