User login

cmt_term_*_set and also cmt_term_*_update functions?

// call me crazy, but the way I constructed cmt_term_description_set makes a cmt_term_description_update (which would need a select statement to get the content_id unnecessary)... no, for endorse functions the content_id would be passed with the form and save the SQL.
// however, cmt_term_*_update functions are still unnecessary because it's easier to call cmt_vote($content_type, $content_id) from the submit function for the endorse form.
// so this is deprecated
function cmt_term_description_update($tid, $description, $uid = NULL, $value = 1) {
  $result = db_query("SELECT content_id FROM {cmt_term_description} WHERE tid = %d AND description = '%s'", $tid, $description);
}

Call me crazy, all right, I'm talking to myself in my own module comments...

// call me crazy, but the way I constructed cmt_term_description_set makes a cmt_term_description_update (which would need a select statement to get the content_id unnecessary)... no, for endorse functions the content_id would be passed with the form and save the SQL.
// however, cmt_term_*_update functions are still unnecessary because it's easier to call cmt_vote($content_type, $content_id) from the submit function for the endorse form.
// so this is deprecated
function cmt_term_description_update($tid, $description, $uid = NULL, $value = 1) {
  $result = db_query("SELECT content_id FROM {cmt_term_description} WHERE tid = %d AND description = '%s'", $tid, $description);
}

Call me crazy, all right, I'm talking to myself in my own module comments...

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.