diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-01-31 15:49:26 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-01-31 15:49:26 +0000 |
commit | 05a708fb06137758cf7a15a623b4813af2fc005f (patch) | |
tree | 6ae6f50edbcb601329805cbbd7c22d11340327e3 /modules/path/path.module | |
parent | 4c9fc80fc48608982a731b03655b02e5ccdb6b17 (diff) | |
download | brdo-05a708fb06137758cf7a15a623b4813af2fc005f.tar.gz brdo-05a708fb06137758cf7a15a623b4813af2fc005f.tar.bz2 |
- Patch #112715 by chx, webchick, asimmonds, et al: fixing E_ALL notices. Thanks.
Diffstat (limited to 'modules/path/path.module')
-rw-r--r-- | modules/path/path.module | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/path/path.module b/modules/path/path.module index b52f47254..7c6b5480b 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -244,7 +244,7 @@ function path_nodeapi(&$node, $op, $arg) { break; case 'update': - path_set_alias("node/$node->nid", $node->path, $node->pid); + path_set_alias("node/$node->nid", isset($node->path) ? $node->path : NULL, isset($node->pid) ? $node->pid : NULL); break; case 'delete': @@ -262,7 +262,7 @@ function path_nodeapi(&$node, $op, $arg) { */ function path_form_alter($form_id, &$form) { if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { - $path = $form['#node']->path; + $path = isset($form['#node']->path) ? $form['#node']->path : NULL; $form['path'] = array( '#type' => 'fieldset', '#title' => t('URL path settings'), @@ -309,12 +309,13 @@ function path_overview() { $sql .= tablesort_sql($header); $result = pager_query($sql, 50); + $rows = array(); $destination = drupal_get_destination(); while ($data = db_fetch_object($result)) { $rows[] = array(check_plain($data->dst), check_plain($data->src), l(t('edit'), "admin/build/path/edit/$data->pid", array(), $destination), l(t('delete'), "admin/build/path/delete/$data->pid", array(), $destination)); } - if (!$rows) { + if (empty($rows)) { $rows[] = array(array('data' => t('No URL aliases available.'), 'colspan' => '4')); } |