summaryrefslogtreecommitdiff
path: root/lib/plugins
diff options
context:
space:
mode:
authorchris <chris@jalakai.co.uk>2006-04-10 01:38:41 +0200
committerchris <chris@jalakai.co.uk>2006-04-10 01:38:41 +0200
commite04f1f162ee7d5abb22d29834ecf410602759b95 (patch)
tree113aa47e9a7b53b3aac6a5095b387bf9e3f002b9 /lib/plugins
parent8fda456959075c35de4fd883709873b131da2aa2 (diff)
downloadrpg-e04f1f162ee7d5abb22d29834ecf410602759b95.tar.gz
rpg-e04f1f162ee7d5abb22d29834ecf410602759b95.tar.bz2
Bug#680
Update default plugins to ensure they exit immediately if not called from within Dokuwiki darcs-hash:20060409233841-9b6ab-555e4fced756849a5d7b9de6e4aaaea24c6da3ae.gz
Diffstat (limited to 'lib/plugins')
-rw-r--r--lib/plugins/acl/admin.php4
-rw-r--r--lib/plugins/admin.php4
-rw-r--r--lib/plugins/config/admin.php3
-rw-r--r--lib/plugins/info/syntax.php4
-rw-r--r--lib/plugins/plugin/admin.php3
-rw-r--r--lib/plugins/syntax.php3
-rw-r--r--lib/plugins/usermanager/admin.php4
7 files changed, 17 insertions, 8 deletions
diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php
index 4299ab220..172c13af3 100644
--- a/lib/plugins/acl/admin.php
+++ b/lib/plugins/acl/admin.php
@@ -5,7 +5,9 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Frank Schubert <frank@schokilade.de>
*/
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
+
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
require_once(DOKU_PLUGIN.'admin.php');
diff --git a/lib/plugins/admin.php b/lib/plugins/admin.php
index 480fc07dd..7245a73eb 100644
--- a/lib/plugins/admin.php
+++ b/lib/plugins/admin.php
@@ -5,7 +5,9 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Christopher Smith <chris@jalakai.co.uk>
*/
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
+
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
/**
diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php
index d98ae3ffd..8031b6f27 100644
--- a/lib/plugins/config/admin.php
+++ b/lib/plugins/config/admin.php
@@ -5,8 +5,9 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Christopher Smith <chris@jalakai.co.uk>
*/
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
require_once(DOKU_PLUGIN.'admin.php');
diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php
index d5209397f..b93ef4887 100644
--- a/lib/plugins/info/syntax.php
+++ b/lib/plugins/info/syntax.php
@@ -5,9 +5,9 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Andreas Gohr <andi@splitbrain.org>
*/
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
-
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
require_once(DOKU_PLUGIN.'syntax.php');
diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php
index 26f796162..2ea63f45b 100644
--- a/lib/plugins/plugin/admin.php
+++ b/lib/plugins/plugin/admin.php
@@ -5,13 +5,14 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Christopher Smith <chris@jalakai.co.uk>
*/
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
// todo
// - maintain a history of file modified
// - allow a plugin to contain extras to be copied to the current template (extra/tpl/)
// - to images (lib/images/) [ not needed, should go in lib/plugin/images/ ]
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
require_once(DOKU_PLUGIN.'admin.php');
diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php
index 9918e552a..e5e6204c4 100644
--- a/lib/plugins/syntax.php
+++ b/lib/plugins/syntax.php
@@ -5,8 +5,9 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Andreas Gohr <andi@splitbrain.org>
*/
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/');
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
require_once(DOKU_INC.'inc/parser/parser.php');
diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php
index 1c3443af1..07be2a905 100644
--- a/lib/plugins/usermanager/admin.php
+++ b/lib/plugins/usermanager/admin.php
@@ -10,7 +10,9 @@
* @author neolao <neolao@neolao.com>
* @author Chris Smith <chris@jalakai.co.uk>
*/
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../../').'/');
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
+
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
if(!defined('DOKU_PLUGIN_IMAGES')) define('DOKU_PLUGIN_IMAGES',DOKU_BASE.'lib/plugins/usermanager/images/');
require_once(DOKU_PLUGIN.'admin.php');