Commit b8c05ef2f25bf8c90d1e0e207c2b1ef3d6d372cb

Authored by Neil Blakey-Milner
1 parent 1aec755e

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 +?>
... ...