]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #2854 removing my bad idea of auto-appending action in elgg_view_form()
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 6 Feb 2011 19:36:28 +0000 (19:36 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 6 Feb 2011 19:36:28 +0000 (19:36 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8046 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/views.php
mod/file/edit.php
mod/messages/read.php

index 0010b8808af2a1e3ba24bf574802b3808710346d..72cfeb2b6640f3c0c8ec0e323e7c0436f217fcb6 100644 (file)
@@ -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),
index aa4b60a83892f5bbd9cfefcb61a95150b3444e93..12e910a2696a9dc9fbec9cc90b59b7bce78dcc63 100644 (file)
@@ -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(
index 5a735f18e2cf05f0d734a3452c1565e8fba1bbbe..84ec7e1248bef086c07b4d426a2864f51b4c5299 100644 (file)
@@ -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);