Commit dd95cd1ba9088a1a540a3db0e999897a94dc4533
1 parent
611c25c6
plugin-resources.php allows registered resources for plugins to be
accessible via the web server. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3564 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
20 additions
and
0 deletions
plugin-resources.php
0 → 100644
| 1 | +<?php | |
| 2 | + | |
| 3 | +require_once('config/dmsDefaults.php'); | |
| 4 | +require_once(KT_LIB_DIR . '/plugins/pluginutil.inc.php'); | |
| 5 | + | |
| 6 | +$sPath = KTUtil::arrayGet($_SERVER, 'PATH_INFO'); | |
| 7 | +if (empty($sPath)) { | |
| 8 | + print "Nothing there..."; | |
| 9 | + exit(1); | |
| 10 | +} | |
| 11 | + | |
| 12 | +if (!KTPluginUtil::resourceIsRegistered($sPath)) { | |
| 13 | + print "Accessing unregistered resource"; | |
| 14 | + exit(1); | |
| 15 | +} | |
| 16 | + | |
| 17 | +KTPluginUtil::readResource($sPath); | |
| 18 | +exit(0); | |
| 19 | + | |
| 20 | +?> | ... | ... |