aboutsummaryrefslogtreecommitdiff
path: root/engine/handlers/action_handler.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/handlers/action_handler.php')
-rw-r--r--engine/handlers/action_handler.php41
1 files changed, 20 insertions, 21 deletions
diff --git a/engine/handlers/action_handler.php b/engine/handlers/action_handler.php
index 9dc9a4408..bcad110b2 100644
--- a/engine/handlers/action_handler.php
+++ b/engine/handlers/action_handler.php
@@ -1,21 +1,20 @@
-<?php
-
- /**
- * Elgg action handler
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- */
- /**
- * Load Elgg framework
- */
- define('externalpage',true);
- require_once("../start.php");
- $action = get_input("action");
- action($action);
-
-?>
+<?php
+/**
+ * Action handler.
+ *
+ * This file dispatches actions. It is called via a URL rewrite in .htaccess
+ * from http://site/action/. Anything after 'action/' is considered the action
+ * and will be passed to {@link action()}.
+ *
+ * @warning This sets the input named 'action' to the current action. When calling
+ * an action, get_input('action') will always return the action name.
+ *
+ * @package Elgg.Core
+ * @subpackage Actions
+ * @link http://docs.elgg.org/Tutorials/Actions
+ */
+
+require_once(dirname(dirname(__FILE__)) . "/start.php");
+
+$action = get_input("action");
+action($action);