X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FcategoryChangesAsRdf.php;h=95a59d23c192df4ff459e3edd403e64c24d7393c;hb=c555d77d07b7fa50c80dbbdb36c446c7cd9cb276;hp=f794abb0b0c68a75d3db26e8a9fdac1fadf8fe3d;hpb=4cc031607c9b8e17265e51372b94399399254966;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/categoryChangesAsRdf.php b/maintenance/categoryChangesAsRdf.php index f794abb0b0..95a59d23c1 100644 --- a/maintenance/categoryChangesAsRdf.php +++ b/maintenance/categoryChangesAsRdf.php @@ -115,19 +115,18 @@ SPARQLDI; } public function execute() { - global $wgRCMaxAge; - $this->initialize(); $startTS = new MWTimestamp( $this->getOption( "start" ) ); $endTS = new MWTimestamp( $this->getOption( "end" ) ); $now = new MWTimestamp(); + $rcMaxAge = $this->getConfig()->get( 'RCMaxAge' ); - if ( $now->getTimestamp() - $startTS->getTimestamp() > $wgRCMaxAge ) { - $this->error( "Start timestamp too old, maximum RC age is $wgRCMaxAge!" ); + if ( $now->getTimestamp() - $startTS->getTimestamp() > $rcMaxAge ) { + $this->error( "Start timestamp too old, maximum RC age is $rcMaxAge!" ); } - if ( $now->getTimestamp() - $endTS->getTimestamp() > $wgRCMaxAge ) { - $this->error( "End timestamp too old, maximum RC age is $wgRCMaxAge!" ); + if ( $now->getTimestamp() - $endTS->getTimestamp() > $rcMaxAge ) { + $this->error( "End timestamp too old, maximum RC age is $rcMaxAge!" ); } $this->startTS = $startTS->getTimestamp();