Commit 64d73e9b9d4a5c2e0936bc092d9b6afde2bba6bd

Authored by nbm
1 parent c04e1ea9

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();
... ...