api: Restore fractions for default siprop=dbreplag response
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 17 Mar 2018 02:51:26 +0000 (19:51 -0700)
committerKrinkle <krinklemail@gmail.com>
Sat, 17 Mar 2018 02:56:25 +0000 (02:56 +0000)
Without this fix, the situation is that a query for 'siprop=dbreplag'
shows a db server with lag=0, while the siprop=dbreplag&sishowalldb=1
query shows the same server having non-zero lag. That's confusing.

Regression from r47865 (88f35cdf6e).

Change-Id: Id4854c8453206a6f1f8c369dc89c3a8bd910f83f

includes/api/ApiQuerySiteinfo.php

index f924736..3048273 100644 (file)
@@ -465,7 +465,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                                'host' => $showHostnames
                                                ? $lb->getServerName( $index )
                                                : '',
-                               'lag' => intval( $lag )
+                               'lag' => $lag
                        ];
                }