diff --git a/wrenchboard/src/shared_tool/site_crons.cc b/wrenchboard/src/shared_tool/site_crons.cc index 5b63f50e..0db79a2f 100644 --- a/wrenchboard/src/shared_tool/site_crons.cc +++ b/wrenchboard/src/shared_tool/site_crons.cc @@ -37,6 +37,9 @@ long ProcessExpiredOffers(CVars in, CVars &out); long ScheduleHolidayJobs(CVars in, CVars &out); long RefreshBlogs(CVars in, CVars &out); long RefreshPromoActivities(CVars in, CVars &out); +long RegisterPromoPoint(CVars in); +long RegisterPromoAction(CVars in); + /* CREATE TABLE cron_jobs ( id SERIAL, @@ -215,6 +218,7 @@ long RefreshPromoActivities(CVars in, CVars &out){ resF = pgsql_query("SELECT status FROM members_pending where LOWER(username)= LOWER('%s')", rec["email"].c_str()); if (resF != NULL && pgsql_num_rows(resF) > 0) { pgsql_query("UPDATE promo_member SET updated = now(), status=2 WHERE id = %lu ", rec["id"].Long()); // mo + RegisterPromoAction(rec); } } } @@ -234,6 +238,12 @@ long RefreshPromoActivities(CVars in, CVars &out){ resF = pgsql_query("SELECT status FROM members where LOWER(username)= LOWER('%s')", rec["email"].c_str()); if (resF != NULL && pgsql_num_rows(resF) > 0) { pgsql_query("UPDATE promo_member SET updated = now(), status=3 WHERE id = %lu ", rec["id"].Long()); // mo + // now let us register the points + CVars xp; + xp["category"] ="SIGNUP"; + xp["member_uid"] = rec["uid"]; + xp["points"] = "100"; + RegisterPromoPoint(xp); } } } @@ -264,6 +274,22 @@ long RefreshPromoActivities(CVars in, CVars &out){ return ret; } +long RegisterPromoPoint(CVars in){ + + + + RegisterPromoAction(in); + return 0; +} + +long RegisterPromoAction(CVars in){ + + + + + return 0; +} + long RefreshBlogs(CVars in, CVars &out){ long ret = PHP_API_BAD_PARAM; CVars xx;