From c9a53c46de6ad79de64bd49ca6e4e8296982aa86 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 12 Nov 2011 17:52:19 +0100 Subject: added Mailer class to autoloader --- inc/load.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/load.php') diff --git a/inc/load.php b/inc/load.php index d30397f6e..b5cfd4273 100644 --- a/inc/load.php +++ b/inc/load.php @@ -76,6 +76,7 @@ function load_autoload($name){ 'SafeFN' => DOKU_INC.'inc/SafeFN.class.php', 'Sitemapper' => DOKU_INC.'inc/Sitemapper.php', 'PassHash' => DOKU_INC.'inc/PassHash.class.php', + 'Mailer' => DOKU_INC.'inc/Mailer.class.php', 'DokuWiki_Action_Plugin' => DOKU_PLUGIN.'action.php', 'DokuWiki_Admin_Plugin' => DOKU_PLUGIN.'admin.php', -- cgit v1.2.3 From a1d9de52cdffcc3eec070a7089786a3ed90fdc17 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 26 Apr 2012 08:19:15 +0200 Subject: make HTTPClient loadable via autoloader this fixes the HTTP tests which do test the base class directly instead of the DokuHTTPClient subclass --- inc/load.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/load.php') diff --git a/inc/load.php b/inc/load.php index 0572b5760..9f54034a3 100644 --- a/inc/load.php +++ b/inc/load.php @@ -49,6 +49,7 @@ function load_autoload($name){ static $classes = null; if(is_null($classes)) $classes = array( 'DokuHTTPClient' => DOKU_INC.'inc/HTTPClient.php', + 'HTTPClient' => DOKU_INC.'inc/HTTPClient.php', 'JSON' => DOKU_INC.'inc/JSON.php', 'adLDAP' => DOKU_INC.'inc/adLDAP.php', 'Diff' => DOKU_INC.'inc/DifferenceEngine.php', -- cgit v1.2.3 From 5a9866e97863490816d932e98e8e170e49405d43 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 20 May 2012 09:44:46 +0200 Subject: do not surpress any errors when loading plugin files When a plugin file exists, we can assume it is the correct file and load it without error supression. This makes it much easier to detect and debug problematic plugins. --- inc/load.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'inc/load.php') diff --git a/inc/load.php b/inc/load.php index 9f54034a3..7a410e452 100644 --- a/inc/load.php +++ b/inc/load.php @@ -96,11 +96,12 @@ function load_autoload($name){ // Plugin loading if(preg_match('/^(helper|syntax|action|admin|renderer|remote)_plugin_([^_]+)(?:_([^_]+))?$/', $name, $m)) { - //try to load the wanted plugin file - // include, but be silent. Maybe some other autoloader has an idea - // how to load this class. + // try to load the wanted plugin file $c = ((count($m) === 4) ? "/{$m[3]}" : ''); - @include DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php"; + $plg = DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php"; + if(@file_exists($plg)){ + include DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php"; + } return; } } -- cgit v1.2.3 From 89177306a2278255d6a2203b5fff4a839183d3cd Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Jun 2012 14:00:49 +0200 Subject: Introducing a $_REQUEST/POST/GET wrapper This new wrapper ensures types are correct and accessed parameters are actually set (with custom default fallbacks). The wrapper is available in the global $INPUT variable. It accesses $_REQUEST by default. If POST or GET is required, the post and get members can be used: $INPUT->int('foo',false); // access $_REQUEST['foo'], default false $INPUT->post->int('foo'); // access $_POST['foo'], default 0 $INPUT->get->int('foo'); // access $_GET['foo'], default 0 The codebase still needs to be updated to make use of this. --- inc/load.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/load.php') diff --git a/inc/load.php b/inc/load.php index 7a410e452..b676518e7 100644 --- a/inc/load.php +++ b/inc/load.php @@ -62,6 +62,7 @@ function load_autoload($name){ 'Doku_Event' => DOKU_INC.'inc/events.php', 'Doku_Event_Handler' => DOKU_INC.'inc/events.php', 'EmailAddressValidator' => DOKU_INC.'inc/EmailAddressValidator.php', + 'Input' => DOKU_INC.'inc/Input.class.php', 'JpegMeta' => DOKU_INC.'inc/JpegMeta.php', 'SimplePie' => DOKU_INC.'inc/SimplePie.php', 'FeedParser' => DOKU_INC.'inc/FeedParser.php', -- cgit v1.2.3