You are here

function node_convert_load_template in Node Convert 6

Same name and namespace in other branches
  1. 7 node_convert.module \node_convert_load_template()

Loads a conversion template array using template_id.

Parameters

$template_id: The template id to use

Return value

An array containing the template information or FALSE if there is no such template

4 calls to node_convert_load_template()
node_convert_check_template_permission_user in ./node_convert.module
Checks if the logged in user has access to use the conversion template.
node_convert_convert_action in ./node_convert.module
node_convert_convert_nodes_using_template in ./node_convert.module
Converts a list of nodes using a given template
node_convert_template_info in ./node_convert.module

File

./node_convert.module, line 996
The node_convert module converts nodes from one type to another.

Code

function node_convert_load_template($template_id) {
  $template = db_fetch_array(db_query("SELECT * FROM {node_convert_templates} WHERE nctid = %d", $template_id));
  if (is_array($template)) {
    $template['data'] = unserialize($template['data']);
  }
  return $template;
}