Compare commits
16 Commits
Author | SHA1 | Date |
---|---|---|
Maxime Rainville | 71d7345a3b | |
Guy Sartorelli | 446bb12a88 | |
Guy Marriott | 619d3e9dd7 | |
Guy Marriott | de147fb1a2 | |
Guy Marriott | 5e8b45f200 | |
Mateusz Uzdowski | 8d1523346e | |
Guy Marriott | fc7c658b00 | |
Guy Marriott | a5f7e6f22d | |
Mateusz Uzdowski | f259e97e13 | |
Robbie Averill | eba2d4536c | |
Robbie Averill | 5f7a4f7e23 | |
Robbie Averill | a539c38091 | |
Robbie Averill | 57857836e9 | |
Robbie Averill | 6dd75a2884 | |
Guy Marriott | 171652b338 | |
Robbie Averill | e0c20ddf2b |
24
.travis.yml
24
.travis.yml
|
@ -1,24 +1,26 @@
|
|||
# See https://github.com/silverstripe-labs/silverstripe-travis-support for setup details
|
||||
# See https://github.com/silverstripe/silverstripe-travis-support for setup details
|
||||
|
||||
sudo: false
|
||||
dist: trusty
|
||||
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.1
|
||||
|
||||
env:
|
||||
- DB=MYSQL CORE_RELEASE=3
|
||||
- DB=MYSQL CORE_RELEASE=3.7
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- php: '7.1'
|
||||
env: DB=MYSQL CORE_RELEASE=3.7
|
||||
- php: '7.2'
|
||||
env: DB=MYSQL CORE_RELEASE=3.7
|
||||
- php: '7.3'
|
||||
env: DB=MYSQL CORE_RELEASE=3.7
|
||||
|
||||
before_script:
|
||||
- composer self-update || true
|
||||
- git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
|
||||
- git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support
|
||||
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss
|
||||
- cd ~/builds/ss
|
||||
- composer install
|
||||
|
||||
script:
|
||||
- vendor/bin/phpunit docsviewer/tests
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Documentation Viewer Module
|
||||
|
||||
## ABANDONED
|
||||
|
||||
This package is abandoned. See [silverstripe/doc.silverstripe.org](https://github.com/silverstripe/doc.silverstripe.org) instead.
|
||||
|
||||
[![Build Status](https://secure.travis-ci.org/silverstripe/silverstripe-docsviewer.png?branch=master)](http://travis-ci.org/silverstripe/silverstripe-docsviewer)
|
||||
|
||||
## Maintainer Contact
|
||||
|
|
|
@ -213,7 +213,6 @@ class DocumentationViewer extends Controller implements PermissionProvider
|
|||
ltrim($url, '/'),
|
||||
strlen($base)
|
||||
);
|
||||
} else {
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -276,6 +275,11 @@ class DocumentationViewer extends Controller implements PermissionProvider
|
|||
// return $redirect->redirect($cleaned, 302);
|
||||
// }
|
||||
if ($record = $this->getManifest()->getPage($url)) {
|
||||
// In SS 3 offsetSet() isn't implemented for some reason... this is a workaround
|
||||
$routeParams = $this->request->routeParams();
|
||||
$routeParams['Lang'] = $lang;
|
||||
$this->request->setRouteParams($routeParams);
|
||||
|
||||
$this->record = $record;
|
||||
$this->init();
|
||||
|
||||
|
@ -687,10 +691,13 @@ class DocumentationViewer extends Controller implements PermissionProvider
|
|||
/**
|
||||
* Returns an edit link to the current page (optional).
|
||||
*
|
||||
* @return string
|
||||
* @return string|false
|
||||
*/
|
||||
public function getEditLink()
|
||||
{
|
||||
$editLink = false;
|
||||
$entity = null;
|
||||
|
||||
$page = $this->getPage();
|
||||
|
||||
if ($page) {
|
||||
|
@ -706,13 +713,13 @@ class DocumentationViewer extends Controller implements PermissionProvider
|
|||
}
|
||||
|
||||
|
||||
if ($version == 'trunk' && (isset($url['options']['rewritetrunktomaster']))) {
|
||||
if ($version === 'trunk' && (isset($url['options']['rewritetrunktomaster']))) {
|
||||
if ($url['options']['rewritetrunktomaster']) {
|
||||
$version = "master";
|
||||
}
|
||||
}
|
||||
|
||||
return str_replace(
|
||||
$editLink = str_replace(
|
||||
array('%entity%', '%lang%', '%version%', '%path%'),
|
||||
array(
|
||||
$entity->title,
|
||||
|
@ -725,7 +732,9 @@ class DocumentationViewer extends Controller implements PermissionProvider
|
|||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
$this->extend('updateDocumentationEditLink', $editLink, $entity);
|
||||
|
||||
return $editLink;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.x-dev"
|
||||
"dev-master": "3.x-dev"
|
||||
}
|
||||
}
|
||||
},
|
||||
"abandoned": true
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
$(window).load(updateTables);
|
||||
$(window).on('load', updateTables);
|
||||
$(window).on(
|
||||
"redraw",function() {
|
||||
switched = false;
|
||||
|
|
Loading…
Reference in New Issue