| 1 |
<?php |
<?php |
| 2 |
/************************************* |
/************************************* |
| 3 |
* Demexp module for a Drupal demexp client |
* Demexp module for a Drupal demexp client |
| 4 |
* $Id: demexp.module,v 1.25 2006/10/13 10:18:03 augustin Exp $ |
* $Id: demexp.module,v 1.26 2006/10/14 09:56:08 augustin Exp $ |
| 5 |
* Copyright Augustin Masquilier, 2006. |
* Copyright Augustin Masquilier, 2006. |
| 6 |
* This module is released under the terms of the GPL. |
* This module is released under the terms of the GPL. |
| 7 |
*************************************/ |
*************************************/ |
| 946 |
drupal_execute('forum_form_forum', $values); |
drupal_execute('forum_form_forum', $values); |
| 947 |
// programmatically submitting forum: there is no equivalent of mysql_insert_id(); |
// programmatically submitting forum: there is no equivalent of mysql_insert_id(); |
| 948 |
// returns 'admin/content/forum' so we must find another way to find the forum. |
// returns 'admin/content/forum' so we must find another way to find the forum. |
| 949 |
|
|
| 950 |
// FIXME: vid is hardcoded in query below, and must remain so as long as the hardcoding of tag vocabulary is hard coded to 2. |
// FIXME: vid is hardcoded in query below, and must remain so as long as the hardcoding of tag vocabulary is hard coded to 2. |
| 951 |
$forum_tid = db_result(db_query('SELECT tid FROM {term_data} WHERE vid = 1 AND name = "%s"', $values['name'])); |
$forum_tid = db_result(db_query('SELECT tid FROM {term_data} WHERE vid = 1 AND name = "%s"', $values['name'])); |
| 952 |
db_query('UPDATE {demexp_questions} SET forum_tid = %d WHERE ds_question_id = %d', $forum_tid, $question['q_id']); |
db_query('UPDATE {demexp_questions} SET forum_tid = %d WHERE ds_question_id = %d', $forum_tid, $question['q_id']); |