Commit 04bb7685bfb3464a7f13ff5a5d5764a34b1a655e
1 parent
4a24fdab
plugin.php gives plugins a place to put pages that aren't actions or
admin pages (for example, a page for a user to manage their subscriptions) git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4139 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
21 additions
and
0 deletions
plugin.php
0 → 100644
| 1 | +<?php | |
| 2 | + | |
| 3 | +require_once('config/dmsDefaults.php'); | |
| 4 | +require_once(KT_LIB_DIR . '/plugins/pageregistry.inc.php'); | |
| 5 | + | |
| 6 | +$oRegistry =& KTPageRegistry::getSingleton(); | |
| 7 | + | |
| 8 | +$sPath = KTUtil::arrayGet($_SERVER, 'PATH_INFO'); | |
| 9 | +if (empty($sPath)) { | |
| 10 | + print "Nothing there..."; | |
| 11 | + exit(1); | |
| 12 | +} | |
| 13 | + | |
| 14 | +$sPath = trim($sPath, '/ '); | |
| 15 | +$oPage = $oRegistry->getPage($sPath); | |
| 16 | +if (empty($oPage)) { | |
| 17 | + print "Accessing unregistered resource"; | |
| 18 | + exit(1); | |
| 19 | +} | |
| 20 | + | |
| 21 | +$oPage->dispatch(); | ... | ... |