: INSERT INTO : vote : SET : vote_type = '${ declared cgi.param.vote_pro ? '+' : '-'}', : vote_details = ${mysql::cgi.param.vote_details}, : patch_id = $p.pid, user_id = $userid ); var vdetails = cgi.param.vote_details; if (vdetails =~ /\S/) vdetails="($vdetails)"; var vtype = "cleared vote"; if (declared cgi.param.vote_pro) vtype = "voted pro"; if (declared cgi.param.vote_contra) vtype = "voted contra"; mail(patch: patch_uid, "@@@ $vtype $vdetails"); case action ~== "msg": sql(db, <:SQL> : INSERT INTO : msg : SET : msg_title = ${mysql::cgi.param.msg_title}, : msg_text = ${mysql::cgi.param.msg_text}, : user_id = $userid ); sql(db, <:SQL> : INSERT INTO : msg_patch : SET : msg_id = last_insert_id(), : patch_id = $p.pid ); mail(patch: patch_uid, "new msg by @@@: $cgi.param.msg_title\n$cgi.param.msg_text"); case action ~== "queue": if (not (isadmin or p.userid == userid)) panic "Security ERROR!"; if (cgi.param.queue ~!= "") { if (not defined sql_value(db, "SELECT 1 FROM queue WHERE queue_id = ${mysql::cgi.param.queue} AND queue_discarded = 0")) panic "Security ERROR!"; sql(db, "UPDATE patch SET queue_id = ${mysql::cgi.param.queue} WHERE patch_id = $p.pid"); mail(patch: patch_uid, "queued to '${sql_value(db, "SELECT queue_title FROM queue WHERE queue_id = ${mysql::cgi.param.queue}")}' by @@@"); } else { sql(db, "UPDATE patch SET queue_id = NULL WHERE patch_id = $p.pid"); mail(patch: patch_uid, "unqueued by @@@"); } case action ~== "status": if (not (isadmin or (p.status ~== 'O' and p.userid == userid))) panic "Security ERROR!"; var newstatus = '*'; if (declared cgi.param.status_d) newstatus = 'D'; if (isadmin) { if (declared cgi.param.status_o) newstatus = 'O'; if (declared cgi.param.status_a) newstatus = 'A'; if (declared cgi.param.status_r) newstatus = 'R'; } sql(db, <:SQL> : UPDATE : patch : SET : patch_status = ${mysql::newstatus} : WHERE : patch_id = $p.pid ); mail(patch: patch_uid, "${patch_status_map[newstatus]} by @@@"); } } var p = sql_tuple(db, <:SQL> : SELECT : patch.patch_id AS id, : patch.patch_uid AS uid, : patch.patch_status AS status, : patch.patch_teaser AS teaser, : patch.patch_text AS text, : patch.queue_id AS queueid, : user.user_name AS username, : user.user_id AS userid : FROM : patch LEFT JOIN user ON patch.user_id_owner = user.user_id : WHERE : patch.patch_uid = ${mysql::patch_uid} ); var patch_status = patch_status_map[p.status]; ?>
: :
?mode=patch&uid=$p.uid
$patch_status Patch: $p.uid (by $p.username)
: SELECT : vote.vote_type AS type, : user.user_id AS userid, : user.user_name AS username, : vote.vote_details AS details : FROM : vote, user : WHERE : vote.user_id = user.user_id : AND : vote.patch_id = $p.id : ORDER BY : vote.vote_type DESC, user.user_name ); var my_vote_details; ?> :
: $v.type : $v.username : $v.details :
: : ${votepattern_check(p.id, rawpatchtext)}
${xml::p.teaser}
: SELECT : msg.msg_title AS title, : msg.msg_text AS text, : user.user_name AS username : FROM : msg, msg_patch, user : WHERE : msg_patch.patch_id = $p.id : AND : msg_patch.msg_id = msg.msg_id : AND : msg.user_id = user.user_id : ORDER BY : msg.msg_id ); ?> :

:

:
by ${xml::m.username}
:
${smtext::m.title}
:
${smtext::m.text}
:
:
:
: : : : : Vote Details: :
: : : :
:
:
:
: : : : : Title: :
:
: :
:
:
:
: : : : : Queue:   : :
:
:
:
: : : : : : : : :
:
:
${xml::p.text}
	: [Download this patch]