Use the dbname to detect whether the page is local or not

$isLocal was removed in Ic194f19c047bc920bf9186b6902c42451838b43b

Change-Id: I83c112b30a1ad1f6392abebe60143e02ad57aa88