diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2003-02-12 21:37:56 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2003-02-12 21:37:56 +0000 |
commit | 32989e14dba16192c69cafa6f69138e597311b27 (patch) | |
tree | ef73375fa6643b2322a4b3aa933c6f5fe026b899 | |
parent | ebd95351401cfc23633671210bf89a6b4b3a7c0b (diff) | |
download | brdo-32989e14dba16192c69cafa6f69138e597311b27.tar.gz brdo-32989e14dba16192c69cafa6f69138e597311b27.tar.bz2 |
- Fixed blog.module to accept blog/name URLs as well as blog/id
- Changed the RewriteRule in .htaccess.
- Fixed form_select() matching incorrectly.
- Added missing $Id$ to menu.inc
-rw-r--r-- | includes/common.inc | 2 | ||||
-rw-r--r-- | includes/menu.inc | 3 | ||||
-rw-r--r-- | modules/blog.module | 2 | ||||
-rw-r--r-- | modules/blog/blog.module | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/includes/common.inc b/includes/common.inc index 8a9b30994..1ab18b8df 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -742,7 +742,7 @@ function form_textarea($title, $name, $value, $cols, $rows, $description = 0) { function form_select($title, $name, $value, $options, $description = 0, $extra = 0, $multiple = 0) { if (count($options) > 0) { foreach ($options as $key=>$choice) { - $select .= "<option value=\"$key\"". (is_array($value) ? (in_array($key, $value) ? " selected=\"selected\"" : "") : ($key == $value ? " selected=\"selected\"" : "")) .">". check_form($choice) ."</option>"; + $select .= "<option value=\"$key\"". (is_array($value) ? (in_array($key, $value) ? " selected=\"selected\"" : "") : ($value == $key ? " selected=\"selected\"" : "")) .">". check_form($choice) ."</option>"; } return form_item($title, "<select name=\"edit[$name]". ($multiple ? "[]" : "") ."\"". ($multiple ? " multiple " : "") . ($extra ? " $extra" : "") .">$select</select>", $description); } diff --git a/includes/menu.inc b/includes/menu.inc index d970a1179..780d6582e 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -1,4 +1,5 @@ <?php +// $Id$ function menu_trail() { @@ -156,4 +157,4 @@ function menu_add($name, $link, $title = NULL, $help = NULL, $parent = NULL, $we } } -?> +?>
\ No newline at end of file diff --git a/modules/blog.module b/modules/blog.module index f5c2c4112..2c54e3f09 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -149,7 +149,7 @@ function blog_page_user($uid = 0) { global $user, $theme; if ($uid) { - $account = user_load(array("uid" => $uid, "status" => 1)); + $account = user_load(array((is_numeric($uid) ? "uid" : "name") => $uid, "status" => 1)); } else { $account = $user; diff --git a/modules/blog/blog.module b/modules/blog/blog.module index f5c2c4112..2c54e3f09 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -149,7 +149,7 @@ function blog_page_user($uid = 0) { global $user, $theme; if ($uid) { - $account = user_load(array("uid" => $uid, "status" => 1)); + $account = user_load(array((is_numeric($uid) ? "uid" : "name") => $uid, "status" => 1)); } else { $account = $user; |