Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
db6f7eae
Commit
db6f7eae
authored
14 years ago
by
Andreas Gohr
Browse files
Options
Downloads
Patches
Plain Diff
don't load disabled plugins FS#1990
parent
d0eb2708
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
inc/plugincontroller.class.php
+12
-5
12 additions, 5 deletions
inc/plugincontroller.class.php
inc/pluginutils.php
+2
-2
2 additions, 2 deletions
inc/pluginutils.php
lib/plugins/plugin/classes/ap_info.class.php
+1
-1
1 addition, 1 deletion
lib/plugins/plugin/classes/ap_info.class.php
with
15 additions
and
8 deletions
inc/plugincontroller.class.php
+
12
−
5
View file @
db6f7eae
...
...
@@ -55,15 +55,23 @@ class Doku_Plugin_Controller {
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param $type string type of plugin to load
* @param $name string name of the plugin to load
* @param $new bool true to return a new instance of the plugin, false to use an already loaded instance
* @param $type string type of plugin to load
* @param $name string name of the plugin to load
* @param $new bool true to return a new instance of the plugin, false to use an already loaded instance
* @param $disabled bool true to load even disabled plugins
* @return objectreference the plugin object or null on failure
*/
function
&
load
(
$type
,
$name
,
$new
=
false
){
function
&
load
(
$type
,
$name
,
$new
=
false
,
$disabled
=
false
){
//we keep all loaded plugins available in global scope for reuse
global
$DOKU_PLUGINS
;
list
(
$plugin
,
$component
)
=
$this
->
_splitName
(
$name
);
// check if disabled
if
(
!
$disabled
&&
$this
->
isdisabled
(
$plugin
)){
return
null
;
}
//plugin already loaded?
if
(
!
empty
(
$DOKU_PLUGINS
[
$type
][
$name
])){
if
(
$new
||
!
$DOKU_PLUGINS
[
$type
][
$name
]
->
isSingleton
())
{
...
...
@@ -75,7 +83,6 @@ class Doku_Plugin_Controller {
}
//try to load the wanted plugin file
list
(
$plugin
,
$component
)
=
$this
->
_splitName
(
$name
);
$dir
=
$this
->
get_directory
(
$plugin
);
$file
=
$component
?
"
$type
/
$component
.php"
:
"
$type
.php"
;
...
...
This diff is collapsed.
Click to expand it.
inc/pluginutils.php
+
2
−
2
View file @
db6f7eae
...
...
@@ -16,9 +16,9 @@ function plugin_list($type='',$all=false) {
global
$plugin_controller
;
return
$plugin_controller
->
getList
(
$type
,
$all
);
}
function
&
plugin_load
(
$type
,
$name
,
$new
=
false
)
{
function
&
plugin_load
(
$type
,
$name
,
$new
=
false
,
$disabled
=
false
)
{
global
$plugin_controller
;
return
$plugin_controller
->
load
(
$type
,
$name
,
$new
);
return
$plugin_controller
->
load
(
$type
,
$name
,
$new
,
$disabled
);
}
function
plugin_isdisabled
(
$plugin
)
{
global
$plugin_controller
;
...
...
This diff is collapsed.
Click to expand it.
lib/plugins/plugin/classes/ap_info.class.php
+
1
−
1
View file @
db6f7eae
...
...
@@ -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
]){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment