From c2a6d81662045023bdf1617b6b49f71c274d55ca Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 1 Feb 2010 16:10:25 +0100 Subject: plugin related autoloading This patch moved the place where DOKU_PLUGIN is defined. It no longer can be set from a normal config (only via preload) --- lib/plugins/plugin/classes/ap_download.class.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'lib/plugins/plugin/classes') diff --git a/lib/plugins/plugin/classes/ap_download.class.php b/lib/plugins/plugin/classes/ap_download.class.php index 90e5de53b..6ad048d72 100644 --- a/lib/plugins/plugin/classes/ap_download.class.php +++ b/lib/plugins/plugin/classes/ap_download.class.php @@ -197,8 +197,6 @@ class ap_download extends ap_manage { $ext = $this->guess_archive($file); if (in_array($ext, array('tar','bz','gz'))) { - require_once(DOKU_INC."inc/TarLib.class.php"); - switch($ext){ case 'bz': $compress_type = COMPRESS_BZIP; @@ -227,7 +225,6 @@ class ap_download extends ap_manage { } return true; } else if ($ext == 'zip') { - require_once(DOKU_INC."inc/ZipLib.class.php"); $zip = new ZipLib(); $ok = $zip->Extract($file, $target); -- cgit v1.2.3 From e0415e22d2d7d48385734c5c4a8e1770c36426c9 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Tue, 16 Mar 2010 11:20:53 +0000 Subject: Make constants in TarLib.class.php class constants The constants are required by the class constructor, which effectively means before the autoloader is triggered. This change fixes that issue. --- lib/plugins/plugin/classes/ap_download.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/plugins/plugin/classes') diff --git a/lib/plugins/plugin/classes/ap_download.class.php b/lib/plugins/plugin/classes/ap_download.class.php index 6ad048d72..beba0ab07 100644 --- a/lib/plugins/plugin/classes/ap_download.class.php +++ b/lib/plugins/plugin/classes/ap_download.class.php @@ -199,13 +199,13 @@ class ap_download extends ap_manage { if (in_array($ext, array('tar','bz','gz'))) { switch($ext){ case 'bz': - $compress_type = COMPRESS_BZIP; + $compress_type = TarLib::COMPRESS_BZIP; break; case 'gz': - $compress_type = COMPRESS_GZIP; + $compress_type = TarLib::COMPRESS_GZIP; break; default: - $compress_type = COMPRESS_NONE; + $compress_type = TarLib::COMPRESS_NONE; } $tar = new TarLib($file, $compress_type); @@ -215,7 +215,7 @@ class ap_download extends ap_manage { } return false; } - $ok = $tar->Extract(FULL_ARCHIVE, $target, '', 0777); + $ok = $tar->Extract(TarLib::FULL_ARCHIVE, $target, '', 0777); if($ok<1){ if($conf['allowdebug']){ -- cgit v1.2.3 From b625808123f9b91b9803f98f818d5745bd7692cc Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 13 Jun 2010 11:40:31 +0200 Subject: msgs are saved in send_redirect now, less code duplication needed --- lib/plugins/plugin/classes/ap_manage.class.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'lib/plugins/plugin/classes') diff --git a/lib/plugins/plugin/classes/ap_manage.class.php b/lib/plugins/plugin/classes/ap_manage.class.php index 297764ebb..eb5348672 100644 --- a/lib/plugins/plugin/classes/ap_manage.class.php +++ b/lib/plugins/plugin/classes/ap_manage.class.php @@ -113,23 +113,14 @@ class ap_manage { * Refresh plugin list */ function refresh() { - global $MSG,$config_cascade; - - //are there any undisplayed messages? keep them in session for display - if (isset($MSG) && count($MSG)){ - //reopen session, store data and close session again - @session_start(); - $_SESSION[DOKU_COOKIE]['msg'] = $MSG; - session_write_close(); - } + global $config_cascade; // expire dokuwiki caches // touching local.php expires wiki page, JS and CSS caches @touch(reset($config_cascade['main']['local'])); // update latest plugin date - FIXME - header('Location: '.wl($ID).'?do=admin&page=plugin'); - exit(); + send_redirect(wl($ID,array('do'=>'admin','page'=>'plugin'),true)); } /** -- cgit v1.2.3 From db6f7eaea3a9b1b536f2b65e54c911f2a4d49bd8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 29 Aug 2010 12:27:41 +0200 Subject: don't load disabled plugins FS#1990 --- lib/plugins/plugin/classes/ap_info.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins/plugin/classes') diff --git a/lib/plugins/plugin/classes/ap_info.class.php b/lib/plugins/plugin/classes/ap_info.class.php index fcadb4599..cebbf090a 100644 --- a/lib/plugins/plugin/classes/ap_info.class.php +++ b/lib/plugins/plugin/classes/ap_info.class.php @@ -15,7 +15,7 @@ class ap_info extends ap_manage { foreach ($component_list as $component) { - if ($obj = & plugin_load($component['type'],$component['name']) === NULL) continue; + if ($obj = & plugin_load($component['type'],$component['name'],false,true) === NULL) continue; $compname = explode('_',$component['name']); if($compname[1]){ -- cgit v1.2.3