aboutsummaryrefslogtreecommitdiff
path: root/engine/handlers/page_handler.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-24 23:32:51 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-24 23:32:51 +0000
commit5a16071104623a6c9f6bc1821e1915b24b2aae96 (patch)
treef67ec9df08c5c1119942ea58f2b02b0e9032bd41 /engine/handlers/page_handler.php
parent49ac619538095e0386cdcb6931d995f8bcf98c1f (diff)
downloadelgg-5a16071104623a6c9f6bc1821e1915b24b2aae96.tar.gz
elgg-5a16071104623a6c9f6bc1821e1915b24b2aae96.tar.bz2
Fixes #2667: pagehandler.php => page_handler.php. You'll need to update .htaccess to keep developing
git-svn-id: http://code.elgg.org/elgg/trunk@7440 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/handlers/page_handler.php')
-rw-r--r--engine/handlers/page_handler.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/engine/handlers/page_handler.php b/engine/handlers/page_handler.php
new file mode 100644
index 000000000..7d293c3e4
--- /dev/null
+++ b/engine/handlers/page_handler.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Pages handler.
+ *
+ * This file dispatches pages. It is called via a URL rewrite in .htaccess
+ * from http://site/pg/handler/page1/page2. The first element after 'pg/' is
+ * the page handler name as registered by {@link register_page_handler()}.
+ * The rest of the string is sent to {@link page_handler()}.
+ *
+ * {@link page_handler()} explodes the pages string by / and sends it to
+ * the page handler function as registered by {@link register_page_handler()}.
+ * If a valid page handler isn't found, plugins have a chance to provide a 404.
+ *
+ * @package Elgg.Core
+ * @subpackage PageHandler
+ * @link http://docs.elgg.org/Tutorials/PageHandlers
+ */
+
+require_once(dirname(dirname(__FILE__)) . "/start.php");
+
+$handler = get_input('handler');
+$page = get_input('page');
+
+if (!page_handler($handler, $page)) {
+ forward('', '404');
+} \ No newline at end of file