$id = $profile->insert();
if (!$id) {
- throw new ServerException(_m("Couldn't create anonymous user session"));
+ throw new ServerException(_m("Couldn't create anonymous user session."));
}
// Stick the Profile ID into the nickname
$result = $profile->update($orig);
if (!$result) {
- throw new ServerException(_m("Couldn't create anonymous user session"));
+ throw new ServerException(_m("Couldn't create anonymous user session."));
}
common_log(
static function increment($noticeID)
{
- common_debug("XXXXXXXXX Fave_tally::increment()");
$tally = Fave_tally::ensureTally($noticeID);
$orig = clone($tally);
static function decrement($noticeID)
{
- common_debug("XXXXXXXXX Fave_tally::decrement()");
-
$tally = Fave_tally::ensureTally($noticeID);
if ($tally->count > 0) {
$tally = Fave_tally::staticGet('notice_id', $noticeID);
if (!$tally) {
- common_debug("Fave_tally::ensureTally - creating tally for notice " . $noticeID);
$tally = new Fave_tally();
$tally->notice_id = $noticeID;
$tally->count = Fave_tally::countExistingFaves($noticeID);
$fave = new Fave();
$fave->notice_id = $noticeID;
$total = $fave->count();
-
- common_debug("ZZZZZZZ notice " . $noticeID . ' has ' . $total . " faves");
-
return $total;
}
}