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
73411587
Commit
73411587
authored
10 years ago
by
Gerrit Uitslag
Browse files
Options
Downloads
Patches
Plain Diff
visibility plugin methods
parent
dd7a6159
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
inc/plugin.php
+15
-15
15 additions, 15 deletions
inc/plugin.php
with
15 additions
and
15 deletions
inc/plugin.php
+
15
−
15
View file @
73411587
...
...
@@ -30,7 +30,7 @@ class DokuWiki_Plugin {
* desc - Short description of the plugin (Text only)
* url - Website with more information on the plugin (eg. syntax description)
*/
function
getInfo
(){
public
function
getInfo
(){
$parts
=
explode
(
'_'
,
get_class
(
$this
));
$info
=
DOKU_PLUGIN
.
'/'
.
$parts
[
2
]
.
'/plugin.info.txt'
;
if
(
@
file_exists
(
$info
))
return
confToHash
(
$info
);
...
...
@@ -47,15 +47,15 @@ class DokuWiki_Plugin {
// plugin introspection methods
// extract from class name, format = <plugin type>_plugin_<name>[_<component name>]
function
getPluginType
()
{
public
function
getPluginType
()
{
list
(
$t
)
=
explode
(
'_'
,
get_class
(
$this
),
2
);
return
$t
;
}
function
getPluginName
()
{
public
function
getPluginName
()
{
list
(
$t
,
$p
,
$n
)
=
explode
(
'_'
,
get_class
(
$this
),
4
);
return
$n
;
}
function
getPluginComponent
()
{
public
function
getPluginComponent
()
{
list
(
$t
,
$p
,
$n
,
$c
)
=
explode
(
'_'
,
get_class
(
$this
),
4
);
return
(
isset
(
$c
)
?
$c
:
''
);
}
...
...
@@ -70,7 +70,7 @@ class DokuWiki_Plugin {
* @param string $id id of the string to be retrieved
* @return string string in appropriate language or english if not available
*/
function
getLang
(
$id
)
{
public
function
getLang
(
$id
)
{
if
(
!
$this
->
localised
)
$this
->
setupLocale
();
return
(
isset
(
$this
->
lang
[
$id
])
?
$this
->
lang
[
$id
]
:
''
);
...
...
@@ -85,7 +85,7 @@ class DokuWiki_Plugin {
* @param string $id id of language dependent wiki page
* @return string parsed contents of the wiki page in xhtml format
*/
function
locale_xhtml
(
$id
)
{
public
function
locale_xhtml
(
$id
)
{
return
p_cached_output
(
$this
->
localFN
(
$id
));
}
...
...
@@ -94,7 +94,7 @@ class DokuWiki_Plugin {
* prepends appropriate path for a language dependent filename
* plugin equivalent of localFN()
*/
function
localFN
(
$id
)
{
public
function
localFN
(
$id
)
{
global
$conf
;
$plugin
=
$this
->
getPluginName
();
$file
=
DOKU_CONF
.
'plugin_lang/'
.
$plugin
.
'/'
.
$conf
[
'lang'
]
.
'/'
.
$id
.
'.txt'
;
...
...
@@ -152,7 +152,7 @@ class DokuWiki_Plugin {
* @param mixed $notset what to return if the setting is not available
* @return mixed
*/
function
getConf
(
$setting
,
$notset
=
false
){
public
function
getConf
(
$setting
,
$notset
=
false
){
if
(
!
$this
->
configloaded
){
$this
->
loadConfig
();
}
...
...
@@ -189,7 +189,7 @@ class DokuWiki_Plugin {
*
* @return array setting => value
*/
function
readDefaultSettings
()
{
protected
function
readDefaultSettings
()
{
$path
=
DOKU_PLUGIN
.
$this
->
getPluginName
()
.
'/conf/'
;
$conf
=
array
();
...
...
@@ -211,7 +211,7 @@ class DokuWiki_Plugin {
*
* @return object helper plugin object
*/
function
loadHelper
(
$name
,
$msg
=
true
){
public
function
loadHelper
(
$name
,
$msg
=
true
){
$obj
=
plugin_load
(
'helper'
,
$name
);
if
(
is_null
(
$obj
)
&&
$msg
)
msg
(
"Helper plugin
$name
is not available or invalid."
,
-
1
);
return
$obj
;
...
...
@@ -224,7 +224,7 @@ class DokuWiki_Plugin {
* email
* standardised function to generate an email link according to obfuscation settings
*/
function
email
(
$email
,
$name
=
''
,
$class
=
''
,
$more
=
''
)
{
public
function
email
(
$email
,
$name
=
''
,
$class
=
''
,
$more
=
''
)
{
if
(
!
$email
)
return
$name
;
$email
=
obfuscate
(
$email
);
if
(
!
$name
)
$name
=
$email
;
...
...
@@ -236,7 +236,7 @@ class DokuWiki_Plugin {
* external_link
* standardised function to generate an external link according to conf settings
*/
function
external_link
(
$link
,
$title
=
''
,
$class
=
''
,
$target
=
''
,
$more
=
''
)
{
public
function
external_link
(
$link
,
$title
=
''
,
$class
=
''
,
$target
=
''
,
$more
=
''
)
{
global
$conf
;
$link
=
htmlentities
(
$link
);
...
...
@@ -263,7 +263,7 @@ class DokuWiki_Plugin {
* @param $arguments
* @return null|string
*/
function
__call
(
$name
,
$arguments
)
{
public
function
__call
(
$name
,
$arguments
)
{
if
(
$name
==
'render'
){
if
(
!
isset
(
$arguments
[
1
]))
$arguments
[
1
]
=
'xhtml'
;
return
$this
->
render_text
(
$arguments
[
0
],
$arguments
[
1
]);
...
...
@@ -280,7 +280,7 @@ class DokuWiki_Plugin {
* @param string $format output format
* @return null|string
*/
function
render_text
(
$text
,
$format
=
'xhtml'
)
{
public
function
render_text
(
$text
,
$format
=
'xhtml'
)
{
return
p_render
(
$format
,
p_get_instructions
(
$text
),
$info
);
}
...
...
@@ -289,7 +289,7 @@ class DokuWiki_Plugin {
*
* @return bool false if the plugin has to be instantiated
*/
function
isSingleton
()
{
public
function
isSingleton
()
{
return
true
;
}
}
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