dened job
This commit is contained in:
@@ -1806,11 +1806,6 @@ long WrenchSendJobsOfferPublic(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "Price = %lu Balance = %lu", y["price"].Long(), z["amount"].Long());
|
||||
|
||||
try {
|
||||
// if ( load_db_record( out, "SELECT count(id) AS duplicate_name FROM members_jobs_offer WHERE LOWER(group_name)=LOWER('%s') AND member_id =%lu AND status = 1",in["group_name"].c_str(), in["member_id"].Long() ))
|
||||
// {
|
||||
// if ( out["duplicate_name"].Long() > 0 ) { return PHP_API_BAD_PARAM; } // return no duplicate on any active name
|
||||
// } // this action blocks out duplicate
|
||||
|
||||
x["member_id"] = in["member_id"];
|
||||
x["member_id"].set_valid(true);
|
||||
x["job_id"] = in["job_id"];
|
||||
@@ -1827,6 +1822,22 @@ long WrenchSendJobsOfferPublic(CVars in, CVars &out) {
|
||||
x["depend_uid"] = in["depend_uid"];
|
||||
x["depend_uid"].set_valid(true);
|
||||
|
||||
if ( x["depend_uid"] != ""){
|
||||
logfmt(logINFO, "****** Let us confirm this job is in the market === > %s", x["depend_uid"].c_str());
|
||||
|
||||
const PGresult *resF = pgsql_query(" SELECT c.public_view,c.expire,c.job_id "
|
||||
" FROM members_jobs_offer c "
|
||||
" LEFT JOIN members_jobs j ON j.id = c.job_id "
|
||||
" WHERE c.public_view = 1 and c.expire> now() AND j.uid::text ='%s' ", x["depend_uid"].c_str());
|
||||
if (resF != NULL && pgsql_num_rows(resF) > 0) {
|
||||
logfmt(logINFO, "ALL Good ****** Let us confirm this job is in the market === > %s", x["depend_uid"].c_str());
|
||||
}
|
||||
else{
|
||||
out["status"] = "Depended task must be active in the market";
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const char * loc = getenv("REMOTE_ADDR");
|
||||
x["loc"] = loc;
|
||||
|
||||
Reference in New Issue
Block a user