|
|
|
@ -25,7 +25,7 @@ class Campaign extends CPHPDatabaseRecordClass
|
|
|
|
|
'UrlName' => "UrlName"
|
|
|
|
|
),
|
|
|
|
|
'numeric' => array(
|
|
|
|
|
'OwnerId' => "UserId",
|
|
|
|
|
'OwnerId' => "OwnerId",
|
|
|
|
|
'DonationRate' => "DonationRate",
|
|
|
|
|
'SubscriberCount' => "SubscriberCount",
|
|
|
|
|
'MonthlyTotal' => "TotalMonthlyDonations",
|
|
|
|
@ -39,7 +39,7 @@ class Campaign extends CPHPDatabaseRecordClass
|
|
|
|
|
'LastStatisticsUpdate' => "LastStatisticsUpdate"
|
|
|
|
|
),
|
|
|
|
|
'user' => array(
|
|
|
|
|
'Owner' => "Owner"
|
|
|
|
|
'Owner' => "OwnerId"
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
@ -61,6 +61,11 @@ class Campaign extends CPHPDatabaseRecordClass
|
|
|
|
|
return self::CreateFromQuery("SELECT * FROM campaigns WHERE `UrlName` = :UrlName", array(':UrlName' => $urlname), 0, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function VerifyAdministratorAccess($userid)
|
|
|
|
|
{
|
|
|
|
|
return ($this->sOwnerId == $userid);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function UpdateStatistics()
|
|
|
|
|
{
|
|
|
|
|
global $database;
|
|
|
|
|