diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-06 19:36:28 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-06 19:36:28 +0000 |
commit | cfaa89dd2d32bc3c17d55def95a1fd49187e1667 (patch) | |
tree | a33e02e9c3bbd4223849769d806d82873d5f5f34 | |
parent | f06582a79a42988934efb810ea26faee5b4c47f4 (diff) | |
download | elgg-cfaa89dd2d32bc3c17d55def95a1fd49187e1667.tar.gz elgg-cfaa89dd2d32bc3c17d55def95a1fd49187e1667.tar.bz2 |
Fixes #2854 removing my bad idea of auto-appending action in elgg_view_form()
git-svn-id: http://code.elgg.org/elgg/trunk@8046 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/views.php | 7 | ||||
-rw-r--r-- | mod/file/edit.php | 2 | ||||
-rw-r--r-- | mod/messages/read.php | 2 |
3 files changed, 4 insertions, 7 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php index 0010b8808..72cfeb2b6 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -1166,7 +1166,8 @@ function elgg_view_river_item($item) { * <input type="password" name="password" /> * </form> * - * @param string $action The name of the action (without the leading "action/") -- e.g. "login" + * @param string $action The name of the action. An action name does not include + * the leading "action/". For example, "login" is an action name. * @param array $form_vars $vars environment passed to the "input/form" view * @param array $body_vars $vars environment passed to the "forms/$action" view * @@ -1175,10 +1176,6 @@ function elgg_view_river_item($item) { function elgg_view_form($action, $form_vars = array(), $body_vars = array()) { global $CONFIG; - if (isset($form_vars['action'])) { - $form_vars['action'] = "action/{$form_vars['action']}"; - } - $defaults = array( 'action' => $CONFIG->wwwroot . "action/$action", 'body' => elgg_view("forms/$action", $body_vars), diff --git a/mod/file/edit.php b/mod/file/edit.php index aa4b60a83..12e910a26 100644 --- a/mod/file/edit.php +++ b/mod/file/edit.php @@ -28,7 +28,7 @@ elgg_set_page_owner_guid($file->getContainerGUID()); $form_vars = array('enctype' => 'multipart/form-data'); $body_vars = file_prepare_form_vars($file); -var_dump($body_vars); + $content = elgg_view_form('file/upload', $form_vars, $body_vars); $body = elgg_view_layout('content', array( diff --git a/mod/messages/read.php b/mod/messages/read.php index 5a735f18e..84ec7e124 100644 --- a/mod/messages/read.php +++ b/mod/messages/read.php @@ -32,7 +32,7 @@ if ($inbox) { $form_params = array( 'internalid' => 'messages-reply-form', 'class' => 'hidden', - 'action' => 'messages/send', + 'action' => 'action/messages/send', ); $body_params = array('message' => $message); $content .= elgg_view_form('messages/reply', $form_params, $body_params); |