@@ 79-91 (lines=13) @@ | ||
76 | public function execute() { |
|
77 | global $wgHTCPRouting; |
|
78 | ||
79 | if ( $this->hasOption( 'htcp-dest' ) ) { |
|
80 | $parts = explode( ':', $this->getOption( 'htcp-dest' ) ); |
|
81 | if ( count( $parts ) < 2 ) { |
|
82 | // Add default htcp port |
|
83 | $parts[] = '4827'; |
|
84 | } |
|
85 | ||
86 | // Route all HTCP messages to provided host:port |
|
87 | $wgHTCPRouting = [ |
|
88 | '' => [ 'host' => $parts[0], 'port' => $parts[1] ], |
|
89 | ]; |
|
90 | $this->verbose( "HTCP broadcasts to {$parts[0]}:{$parts[1]}\n" ); |
|
91 | } |
|
92 | ||
93 | // Find out which actions we should be concerned with |
|
94 | $typeOpt = $this->getOption( 'type', 'all' ); |
@@ 52-66 (lines=15) @@ | ||
49 | public function execute() { |
|
50 | global $wgHTCPRouting; |
|
51 | ||
52 | if ( $this->hasOption( 'htcp-dest' ) ) { |
|
53 | $parts = explode( ':', $this->getOption( 'htcp-dest' ) ); |
|
54 | if ( count( $parts ) < 2 ) { |
|
55 | // Add default htcp port |
|
56 | $parts[] = '4827'; |
|
57 | } |
|
58 | ||
59 | // Route all HTCP messages to provided host:port |
|
60 | $wgHTCPRouting = [ |
|
61 | '' => [ 'host' => $parts[0], 'port' => $parts[1] ], |
|
62 | ]; |
|
63 | if ( $this->hasOption( 'verbose' ) ) { |
|
64 | $this->output( "HTCP broadcasts to {$parts[0]}:{$parts[1]}\n" ); |
|
65 | } |
|
66 | } |
|
67 | ||
68 | $dbr = $this->getDB( DB_REPLICA ); |
|
69 | $minTime = $dbr->timestamp( $this->getOption( 'starttime' ) ); |