Uses the same logic, but without the dependency on MediaWiki.
Planning to use this in the het-deploy code.
Change-Id: I5d6baf6fe63d135c679e4795287daa0a8722dde6
$this->close();
}
}
+
+ /**
+ * Are we running on Windows?
+ */
+ protected function isWindows() {
+ return substr( php_uname(), 0, 7 ) == 'Windows';
+ }
}
/**
if ( isset( $this->handle ) ) {
dba_close( $this->handle );
}
- if ( wfIsWindows() ) {
+ if ( $this->isWindows() ) {
unlink( $this->realFileName );
}
if ( !rename( $this->tmpFileName, $this->realFileName ) ) {
if ( isset( $this->handle ) ) {
fclose( $this->handle );
}
- if ( wfIsWindows() && file_exists( $this->realFileName ) ) {
+ if ( $this->isWindows() && file_exists( $this->realFileName ) ) {
unlink( $this->realFileName );
}
if ( !rename( $this->tmpFileName, $this->realFileName ) ) {