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
fec2accc
Commit
fec2accc
authored
12 years ago
by
Klap-in
Browse files
Options
Downloads
Patches
Plain Diff
Added loadHelper() to DokuWiki_Syntax_Plugin.
parent
fdf855d9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/plugins/syntax.php
+20
-0
20 additions, 0 deletions
lib/plugins/syntax.php
with
20 additions
and
0 deletions
lib/plugins/syntax.php
+
20
−
0
View file @
fec2accc
...
...
@@ -277,6 +277,26 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
return
$conf
;
}
/**
* Loads a given helper plugin (if enabled)
*
* @author Esther Brunner <wikidesign@gmail.com>
*
* @param string $name name of plugin to load
* @param bool $msg if a message should be displayed in case the plugin is not available
*
* @return object helper plugin object
*/
function
loadHelper
(
$name
,
$msg
){
if
(
!
plugin_isdisabled
(
$name
)){
$obj
=
plugin_load
(
'helper'
,
$name
);
}
else
{
$obj
=
null
;
}
if
(
is_null
(
$obj
)
&&
$msg
)
msg
(
"Helper plugin
$name
is not available or invalid."
,
-
1
);
return
$obj
;
}
/**
* Allow the plugin to prevent DokuWiki from reusing an instance
*
...
...
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