return $bits;
}
+/**
+ * @see $wgDataCenterRoles
+ * @return string The current cluster ID
+ * @since 1.27
+ */
+function wfDataCenter() {
+ global $wgDataCenterId;
+
+ return $wgDataCenterId;
+}
+
+/**
+ * @see $wgDataCenterRoles
+ * @return string The current cluster role; one of (master/slave)
+ * @since 1.27
+ */
+function wfDataCenterRole() {
+ global $wgDataCenterId, $wgDataCenterRoles;
+
+ return $wgDataCenterRoles[$wgDataCenterId];
+}
+
/**
* Get a Database object.
*