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
e4f7f55e
Commit
e4f7f55e
authored
7 years ago
by
Yurii K
Browse files
Options
Downloads
Patches
Plain Diff
allow tests against ajax requests
parent
7dbafed4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
_test/core/TestRequest.php
+1
-1
1 addition, 1 deletion
_test/core/TestRequest.php
lib/exe/ajax.php
+22
-5
22 additions, 5 deletions
lib/exe/ajax.php
with
23 additions
and
6 deletions
_test/core/TestRequest.php
+
1
−
1
View file @
e4f7f55e
...
...
@@ -18,7 +18,7 @@ function ob_start_callback($buffer) {
*/
class
TestRequest
{
private
$valid_scripts
=
array
(
'/doku.php'
,
'/lib/exe/fetch.php'
,
'/lib/exe/detail.php'
);
private
$valid_scripts
=
array
(
'/doku.php'
,
'/lib/exe/fetch.php'
,
'/lib/exe/detail.php'
,
'/lib/exe/ajax.php'
);
private
$script
;
private
$server
=
array
();
...
...
This diff is collapsed.
Click to expand it.
lib/exe/ajax.php
+
22
−
5
View file @
e4f7f55e
...
...
@@ -33,6 +33,7 @@ if(function_exists($callfn)){
unset
(
$evt
);
}
if
(
!
function_exists
(
'ajax_qsearch'
))
{
/**
* Searches for matching pagenames
*
...
...
@@ -78,7 +79,9 @@ function ajax_qsearch(){
}
print
'</ul>'
;
}
}
if
(
!
function_exists
(
'ajax_suggestions'
))
{
/**
* Support OpenSearch suggestions
*
...
...
@@ -115,7 +118,9 @@ function ajax_suggestions() {
header
(
'Content-Type: application/x-suggestions+json'
);
print
$json
->
encode
(
$suggestions
);
}
}
if
(
!
function_exists
(
'ajax_lock'
))
{
/**
* Refresh a page lock and save draft
*
...
...
@@ -161,7 +166,9 @@ function ajax_lock(){
}
}
}
if
(
!
function_exists
(
'ajax_draftdel'
))
{
/**
* Delete a draft
*
...
...
@@ -178,7 +185,9 @@ function ajax_draftdel(){
$cname
=
getCacheName
(
$client
.
$id
,
'.draft'
);
@
unlink
(
$cname
);
}
}
if
(
!
function_exists
(
'ajax_medians'
))
{
/**
* Return subnamespaces for the Mediamanager
*
...
...
@@ -201,7 +210,8 @@ function ajax_medians(){
}
echo
html_buildlist
(
$data
,
'idx'
,
'media_nstree_item'
,
'media_nstree_li'
);
}
}
if
(
!
function_exists
(
'ajax_medialist'
))
{
/**
* Return list of files for the Mediamanager
*
...
...
@@ -219,7 +229,8 @@ function ajax_medialist(){
tpl_mediaContent
(
true
,
$sort
);
}
}
}
if
(
!
function_exists
(
'ajax_mediadetails'
))
{
/**
* Return the content of the right column
* (image details) for the Mediamanager
...
...
@@ -241,7 +252,9 @@ function ajax_mediadetails(){
html_msgarea
();
tpl_mediaFileDetails
(
$image
,
$rev
);
}
}
if
(
!
function_exists
(
'ajax_mediadiff'
))
{
/**
* Returns image diff representation for mediamanager
* @author Kate Arzamastseva <pshns@ukr.net>
...
...
@@ -256,7 +269,8 @@ function ajax_mediadiff(){
$auth
=
auth_quickaclcheck
(
"
$NS
:*"
);
media_diff
(
$image
,
$NS
,
$auth
,
true
);
}
}
if
(
!
function_exists
(
'ajax_mediaupload'
))
{
function
ajax_mediaupload
(){
global
$NS
,
$MSG
,
$INPUT
;
...
...
@@ -304,7 +318,8 @@ function ajax_mediaupload(){
header
(
'Content-Type: application/json'
);
echo
$json
->
encode
(
$result
);
}
}
if
(
!
function_exists
(
'ajax_index'
))
{
/**
* Return sub index for index view
*
...
...
@@ -327,7 +342,9 @@ function ajax_index(){
}
echo
html_buildlist
(
$data
,
'idx'
,
'html_list_index'
,
'html_li_index'
);
}
}
if
(
!
function_exists
(
'ajax_linkwiz'
))
{
/**
* List matching namespaces and pages for the link wizard
*
...
...
@@ -434,5 +451,5 @@ function ajax_linkwiz(){
}
}
}
//Setup VIM: ex: et ts=2 :
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