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
222572bf
Commit
222572bf
authored
17 years ago
by
Michael Klier
Browse files
Options
Downloads
Patches
Plain Diff
XMLRC: refactored putPage()
darcs-hash:20080125171834-23886-090763a4733f72b62c539a3ae2ff4835bd10a040.gz
parent
f29f451a
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/exe/xmlrpc.php
+23
-10
23 additions, 10 deletions
lib/exe/xmlrpc.php
with
23 additions
and
10 deletions
lib/exe/xmlrpc.php
+
23
−
10
View file @
222572bf
...
...
@@ -94,7 +94,7 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
$this
->
addCallback
(
'wiki.putPage'
,
'this:putPage'
,
array
(
'int'
,
'string'
,
'string'
),
array
(
'int'
,
'string'
,
'string'
,
'struct'
),
'Saves a wiki page'
);
$this
->
addCallback
(
...
...
@@ -176,26 +176,39 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
/**
* Save a wiki page
* FIXME check ACL !!!
*
* @author Michael Klier <chi@chimeric.de>
*/
function
putPage
(
$
put_
id
,
$
put_
text
,
$p
ut_summary
=
''
,
$put_minor
=
0
,
$put_rev
=
''
,
$put_pre
=
''
,
$put_suf
=
''
)
{
function
putPage
(
$id
,
$text
,
$p
arams
)
{
global
$TEXT
;
$TEXT
=
$put_text
;
$id
=
cleanID
(
$id
);
$TEXT
=
trim
(
$text
);
$sum
=
$params
[
'sum'
];
$minor
=
$params
[
'minor'
];
if
(
empty
(
$id
))
return
new
IXR_Error
(
1
,
'Empty Page ID'
);
if
(
auth_quickaclcheck
(
$id
)
<
AUTH_WRITE
)
return
new
IXR_Error
(
1
,
'You are not allowed to edit this page'
);
// Check, if page is locked
if
(
checklock
(
$put_id
)
!==
false
)
return
1
;
if
(
checklock
(
$id
))
return
new
IXR_Error
(
1
,
'The page is currently locked'
);
if
(
empty
(
$TEXT
))
return
new
IXR_Error
(
1
,
'No Text supplied'
);
//spam check
if
(
checkwordblock
())
return
2
;
return
new
IXR_Error
(
1
,
'Positive wordblock check'
)
;
lock
(
$
put_
id
);
lock
(
$id
);
saveWikiText
(
$
put_id
,
con
(
$put_pre
,
$put_text
,
$put_suf
,
1
),
$put_summary
,
$put_
minor
);
saveWikiText
(
$
id
,
$TEXT
,
$sum
,
$
minor
);
unlock
(
$
put_
id
);
unlock
(
$id
);
return
0
;
}
...
...
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