Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
b809f93b
Commit
b809f93b
authored
Nov 17, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ensure apidoc works with relative paths
parent
a92a4179
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
ApiController.php
extensions/apidoc/commands/ApiController.php
+5
-5
GuideController.php
extensions/apidoc/commands/GuideController.php
+8
-2
No files found.
extensions/apidoc/commands/ApiController.php
View file @
b809f93b
...
...
@@ -51,11 +51,11 @@ class ApiController extends BaseController
}
else
{
$guideUrl
=
'./'
;
$renderer
->
guideUrl
=
$targetDir
;
}
if
(
file_exists
(
$renderer
->
generateGuideUrl
(
'README.md'
)))
{
$renderer
->
guideUrl
=
$guideUrl
;
}
else
{
$renderer
->
guideUrl
=
null
;
if
(
file_exists
(
$renderer
->
generateGuideUrl
(
'README.md'
)))
{
$renderer
->
guideUrl
=
$guideUrl
;
}
else
{
$renderer
->
guideUrl
=
null
;
}
}
// search for files to process
...
...
extensions/apidoc/commands/GuideController.php
View file @
b809f93b
...
...
@@ -47,8 +47,14 @@ class GuideController extends BaseController
// setup reference to apidoc
if
(
$this
->
apiDocs
!==
null
)
{
$renderer
->
apiUrl
=
$this
->
apiDocs
;
$renderer
->
apiContext
=
$this
->
loadContext
(
$this
->
apiDocs
);
$path
=
$this
->
apiDocs
;
$renderer
->
apiUrl
=
$path
;
// use relative paths relative to targetDir
if
(
strncmp
(
$path
,
'.'
,
1
)
===
0
)
{
$renderer
->
apiContext
=
$this
->
loadContext
(
"
$targetDir
/
$path
"
);
}
else
{
$renderer
->
apiContext
=
$this
->
loadContext
(
$path
);
}
}
elseif
(
file_exists
(
$targetDir
.
'/cache/apidoc.data'
))
{
$renderer
->
apiUrl
=
'./'
;
$renderer
->
apiContext
=
$this
->
loadContext
(
$targetDir
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment