dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add hook for cleaning up data that depends on purged recentchanges rows"
[lhc/web/wiklou.git]
/
maintenance
/
mwdocgen.php
diff --git
a/maintenance/mwdocgen.php
b/maintenance/mwdocgen.php
index
35fca8e
..
43041a4
100644
(file)
--- a/
maintenance/mwdocgen.php
+++ b/
maintenance/mwdocgen.php
@@
-72,7
+72,7
@@
class MWDocGen extends Maintenance {
}
protected function init() {
}
protected function init() {
- global $IP;
+ global $
wgPhpCli, $
IP;
$this->doxygen = $this->getOption( 'doxygen', 'doxygen' );
$this->mwVersion = $this->getOption( 'version', 'master' );
$this->doxygen = $this->getOption( 'doxygen', 'doxygen' );
$this->mwVersion = $this->getOption( 'version', 'master' );
@@
-86,20
+86,26
@@
class MWDocGen extends Maintenance {
$this->output = $this->getOption( 'output', "$IP/docs" );
$this->output = $this->getOption( 'output', "$IP/docs" );
- $this->inputFilter = wfShellWikiCmd( $IP . '/maintenance/mwdoc-filter.php' );
+ // Do not use wfShellWikiCmd, because mwdoc-filter.php is not
+ // a Maintenance script.
+ $this->inputFilter = wfEscapeShellArg( [
+ $wgPhpCli,
+ $IP . '/maintenance/mwdoc-filter.php'
+ ] );
+
$this->template = $IP . '/maintenance/Doxyfile';
$this->template = $IP . '/maintenance/Doxyfile';
- $this->excludes =
array(
+ $this->excludes =
[
'vendor',
'node_modules',
'images',
'static',
'vendor',
'node_modules',
'images',
'static',
-
)
;
- $this->excludePatterns =
array()
;
+
]
;
+ $this->excludePatterns =
[]
;
if ( $this->hasOption( 'no-extensions' ) ) {
$this->excludePatterns[] = 'extensions';
}
if ( $this->hasOption( 'no-extensions' ) ) {
$this->excludePatterns[] = 'extensions';
}
- $this->doDot =
`which dot`
;
+ $this->doDot =
shell_exec( 'which dot' )
;
$this->doMan = $this->hasOption( 'generate-man' );
}
$this->doMan = $this->hasOption( 'generate-man' );
}
@@
-117,7
+123,7
@@
class MWDocGen extends Maintenance {
$excludePatterns = implode( ' ', $this->excludePatterns );
$conf = strtr( file_get_contents( $this->template ),
$excludePatterns = implode( ' ', $this->excludePatterns );
$conf = strtr( file_get_contents( $this->template ),
- array(
+ [
'{{OUTPUT_DIRECTORY}}' => $this->output,
'{{STRIP_FROM_PATH}}' => $IP,
'{{CURRENT_VERSION}}' => $this->mwVersion,
'{{OUTPUT_DIRECTORY}}' => $this->output,
'{{STRIP_FROM_PATH}}' => $IP,
'{{CURRENT_VERSION}}' => $this->mwVersion,
@@
-127,7
+133,7
@@
class MWDocGen extends Maintenance {
'{{HAVE_DOT}}' => $this->doDot ? 'YES' : 'NO',
'{{GENERATE_MAN}}' => $this->doMan ? 'YES' : 'NO',
'{{INPUT_FILTER}}' => $this->inputFilter,
'{{HAVE_DOT}}' => $this->doDot ? 'YES' : 'NO',
'{{GENERATE_MAN}}' => $this->doMan ? 'YES' : 'NO',
'{{INPUT_FILTER}}' => $this->inputFilter,
- )
+ ]
);
$tmpFile = tempnam( wfTempDir(), 'MWDocGen-' );
);
$tmpFile = tempnam( wfTempDir(), 'MWDocGen-' );