summaryrefslogtreecommitdiff
path: root/modules/path/path.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/path/path.module')
-rw-r--r--modules/path/path.module14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/path/path.module b/modules/path/path.module
index c27716186..031526564 100644
--- a/modules/path/path.module
+++ b/modules/path/path.module
@@ -100,7 +100,7 @@ function path_form_alter(&$form, $form_state, $form_id) {
$path = array();
if (!empty($form['#node']->nid)) {
$conditions = array('source' => 'node/' . $form['#node']->nid);
- if (!empty($form['#node']->language)) {
+ if ($form['#node']->language != LANGUAGE_NONE) {
$conditions['language'] = $form['#node']->language;
}
$path = path_load($conditions);
@@ -112,7 +112,7 @@ function path_form_alter(&$form, $form_state, $form_id) {
'pid' => NULL,
'source' => isset($form['#node']->nid) ? 'node/' . $form['#node']->nid : NULL,
'alias' => '',
- 'language' => isset($form['#node']->language) ? $form['#node']->language : '',
+ 'language' => isset($form['#node']->language) ? $form['#node']->language : LANGUAGE_NONE,
);
$form['path'] = array(
@@ -190,7 +190,7 @@ function path_node_insert($node) {
if (!empty($path['alias'])) {
// Ensure fields for programmatic executions.
$path['source'] = 'node/' . $node->nid;
- $path['language'] = isset($node->language) ? $node->language : '';
+ $path['language'] = isset($node->language) ? $node->language : LANGUAGE_NONE;
path_save($path);
}
}
@@ -211,7 +211,7 @@ function path_node_update($node) {
if (!empty($path['alias'])) {
// Ensure fields for programmatic executions.
$path['source'] = 'node/' . $node->nid;
- $path['language'] = isset($node->language) ? $node->language : '';
+ $path['language'] = isset($node->language) ? $node->language : LANGUAGE_NONE;
path_save($path);
}
}
@@ -239,7 +239,7 @@ function path_form_taxonomy_form_term_alter(&$form, $form_state) {
'pid' => NULL,
'source' => isset($form['#term']['tid']) ? 'taxonomy/term/' . $form['#term']['tid'] : NULL,
'alias' => '',
- 'language' => '',
+ 'language' => LANGUAGE_NONE,
);
$form['identification']['path'] = array(
'#access' => user_access('create url aliases') || user_access('administer url aliases'),
@@ -271,7 +271,7 @@ function path_taxonomy_term_insert($term) {
if (!empty($path['alias'])) {
// Ensure fields for programmatic executions.
$path['source'] = 'taxonomy/term/' . $term->tid;
- $path['language'] = '';
+ $path['language'] = LANGUAGE_NONE;
path_save($path);
}
}
@@ -292,7 +292,7 @@ function path_taxonomy_term_update($term) {
if (!empty($path['alias'])) {
// Ensure fields for programmatic executions.
$path['source'] = 'taxonomy/term/' . $term->tid;
- $path['language'] = '';
+ $path['language'] = LANGUAGE_NONE;
path_save($path);
}
}