*/
$wgUDPProfilerFormatString = "%s - %d %f %f %f %f %s\n";
-/**
- * Detects non-matching wfProfileIn/wfProfileOut calls
- */
-$wgDebugProfiling = false;
-
/**
* Output debug message on every wfProfileIn/wfProfileOut
*/
* the socket once it's done.
*/
protected function triggerJobs() {
- global $wgJobRunRate, $wgServer, $wgScriptPath, $wgScriptExtension;
+ global $wgJobRunRate, $wgServer, $wgScriptPath, $wgScriptExtension, $wgEnableAPI;
if ( $wgJobRunRate <= 0 || wfReadOnly() ) {
return;
'tasks' => 'jobs', 'maxjobs' => $n, 'sigexpiry' => time() + 5 );
$query['signature'] = ApiRunJobs::getQuerySignature( $query );
+ // Slow job running method in case of API or socket functions being disabled
+ $fallback = function() use ( $query ) {
+ $api = new ApiMain( new FauxRequest( $query, true ) );
+ $api->execute();
+ };
+
+ if ( !$wgEnableAPI ) {
+ $fallback();
+ return;
+ }
+
$errno = $errstr = null;
$info = wfParseUrl( $wgServer );
+ wfSuppressWarnings();
$sock = fsockopen(
$info['host'],
isset( $info['port'] ) ? $info['port'] : 80,
$errno,
$errstr
);
+ wfRestoreWarnings();
if ( !$sock ) {
wfDebugLog( 'runJobs', "Failed to start cron API (socket error $errno): $errstr\n" );
+ $fallback();
return;
}
wfDebugLog( 'runJobs', "Running $n job(s) via '$url'\n" );
// Send a cron API request to be performed in the background.
- // Give up if this takes to long to send (which should be rare).
+ // Give up if this takes too long to send (which should be rare).
stream_set_timeout( $sock, 1 );
$bytes = fwrite( $sock, $req );
if ( $bytes !== strlen( $req ) ) {
$this->mOptions = self::forceToStringRecursive( $this->mParams['options'] );
} elseif ( array_key_exists( 'options-message', $this->mParams ) ) {
/** @todo This is copied from Xml::listDropDown(), deprecate/avoid duplication? */
- $message = $this->msg( $this->mParams['options-message'] )->plain();
+ $message = $this->msg( $this->mParams['options-message'] )->inContentLanguage()->plain();
$optgroup = false;
$this->mOptions = array();
apiPromise = this.get( {
action: 'tokens',
type: type
- }, {
- // Due to the API assuming we're logged out if we pass the callback-parameter,
- // we have to disable jQuery's callback system, and instead parse JSON string,
- // by setting 'jsonp' to false.
- // TODO: This concern seems genuine but no other module has it. Is it still
- // needed and/or should we pass this by default?
} )
.done( function ( data ) {
// If token type is not available for this user,
--- /dev/null
+.animation (...) {
+ -webkit-animation: @arguments;
+ -moz-animation: @arguments;
+ -o-animation: @arguments;
+ animation: @arguments;
+}
+
+.transform-rotate (@deg) {
+ -webkit-transform: rotate(@deg);
+ -moz-transform: rotate(@deg);
+ transform: rotate(@deg);
+}
\ No newline at end of file
// This is a separate file because importing the mixin causes
// the keyframes blocks to be included in the output, regardless
// of whether .rotation is used.
-@-webkit-keyframes rotate {
+@import "mediawiki.mixins.animation";
+
+.rotate-frames () {
from {
- -webkit-transform:rotate(0deg);
+ .transform-rotate(0deg);
}
to {
- -webkit-transform:rotate(360deg);
+ .transform-rotate(360deg);
}
}
+@-webkit-keyframes rotate {
+ .rotate-frames;
+}
+
+@-moz-keyframes rotate {
+ .rotate-frames;
+}
+
+@-o-keyframes rotate {
+ .rotate-frames;
+}
+
@keyframes rotate {
- from {
- transform: rotate(0deg);
- }
- to {
- transform: rotate(360deg);
- }
+ .rotate-frames;
}
-.rotation(@time) {
- -webkit-animation-name: rotate;
- -webkit-animation-duration: @time;
- -webkit-animation-iteration-count: infinite;
- -webkit-animation-timing-function: linear;
- animation-name: rotate;
- animation-duration: @time;
- animation-iteration-count: infinite;
- animation-timing-function: linear;
+.rotation( @time ) {
+ .animation(rotate, @time, infinite, linear);
}