| 1 |
<?php |
<?php |
| 2 |
|
|
| 3 |
|
// $Id$ |
| 4 |
|
|
| 5 |
/** |
/** |
| 6 |
* Syncronize form. Contains lists of updated, added, and deleted templates. |
* Syncronize form. Contains lists of updated, added, and deleted templates. |
| 7 |
* |
* |
| 183 |
// Replace custom tokens in the title and body fields. Replace skeleton |
// Replace custom tokens in the title and body fields. Replace skeleton |
| 184 |
// tokens first so they may be used as node tokens such as [title]. |
// tokens first so they may be used as node tokens such as [title]. |
| 185 |
if (!empty($parent_info->tokens)) { |
if (!empty($parent_info->tokens)) { |
| 186 |
$node['values']['title'] = token_replace($node['values']['title'], 'skeleton', $parent_info->tokens); |
$node = _skeleton_token_replace_values($node, 'skeleton', $parent_info->tokens); |
|
$node['values']['body'] = token_replace($node['values']['body'], 'skeleton', $parent_info->tokens); |
|
| 187 |
} |
} |
| 188 |
|
|
| 189 |
$node['values']['title'] = token_replace($node['values']['title'], 'node', (object)$node['values']); |
$node = _skeleton_token_replace_values($node, 'node', $node); |
|
$node['values']['body'] = token_replace($node['values']['body'], 'node', (object)$node['values']); |
|
| 190 |
|
|
| 191 |
$node['values']['uid'] = $parent_node->uid; |
$node['values']['uid'] = $parent_node->uid; |
| 192 |
$node['values']['name'] = $parent_node->name; |
$node['values']['name'] = $parent_node->name; |
| 307 |
$node->$key = $value; |
$node->$key = $value; |
| 308 |
} |
} |
| 309 |
// Replace body and title tokens. |
// Replace body and title tokens. |
| 310 |
$node->title = token_replace($node->title, 'skeleton', $node->skeleton_template->tokens); |
$node = _skeleton_token_replace_values($node, 'skeleton', $node->skeleton_template->tokens); |
| 311 |
$node->body = token_replace($node->body, 'skeleton', $node->skeleton_template->tokens); |
$node = _skeleton_token_replace_values($node, 'node', $node); |
|
$node->title = token_replace($node->title, 'node', $node); |
|
|
$node->body = token_replace($node->body, 'node', $node); |
|
| 312 |
|
|
| 313 |
// Add a flag so that we keep this node as "unmodified". |
// Add a flag so that we keep this node as "unmodified". |
| 314 |
$node->skeleton_template->keep_connected = TRUE; |
$node->skeleton_template->keep_connected = TRUE; |