Most of our games don't share a ooouser database anyway and this flag is not longer specific to yohoho, so let's not be jerks about which sites can set the subscription status.

This commit is contained in:
Matt Jensen
2013-02-19 14:58:55 -08:00
parent 37b5df9dc7
commit ee6cbc2337
+5 -19
View File
@@ -439,21 +439,10 @@ public class OOOUser extends User
*/ */
public boolean setBillingStatus (int site, byte status) public boolean setBillingStatus (int site, byte status)
{ {
switch (site) { if (yohoho != status) {
case METASOY_SITE_ID: yohoho = status;
// we maintain a separate OOOUSER installation for msoy and thus rather than adding setModified("yohoho");
// another column to maintain our subscriber status for msoy, we just reuse yohoho's return true;
case PUZZLEPIRATES_SITE_ID:
case YPPFAMILY_SITE_ID:
if (yohoho != status) {
yohoho = status;
setModified("yohoho");
return true;
}
break;
default:
throw new IllegalArgumentException(
"Tried to set billing status for unknown site [site=" + site + "].");
} }
return false; return false;
} }
@@ -464,13 +453,10 @@ public class OOOUser extends User
public byte getBillingStatus (int site) public byte getBillingStatus (int site)
{ {
switch (site) { switch (site) {
case METASOY_SITE_ID: // see setBillingStatus
case PUZZLEPIRATES_SITE_ID:
return yohoho;
case YPPFAMILY_SITE_ID: case YPPFAMILY_SITE_ID:
return isFamilySubscriber() ? SUBSCRIBER_STATE : yohoho; return isFamilySubscriber() ? SUBSCRIBER_STATE : yohoho;
default: default:
return TRIAL_STATE; return yohoho;
} }
} }