|
|
@@ -3,6 +3,7 @@ namespace OCA\Memento\Controller; |
|
|
|
|
|
|
|
require_once __DIR__ . '/findMementos.php'; |
|
|
|
require_once __DIR__ . '/datetimeConversion.php'; |
|
|
|
require_once __DIR__ . '/getUrlParameter.php'; |
|
|
|
|
|
|
|
use OCP\IRequest; |
|
|
|
use OCP\IServerContainer; |
|
|
@@ -10,7 +11,6 @@ use OCP\IURLGenerator; |
|
|
|
use OCP\AppFramework\Controller; |
|
|
|
use OCP\AppFramework\Http\DataDisplayResponse; |
|
|
|
|
|
|
|
|
|
|
|
class TimeMapController extends Controller { |
|
|
|
private $userFolder; |
|
|
|
private $URLGenerator; |
|
|
@@ -32,6 +32,8 @@ class TimeMapController extends Controller { |
|
|
|
* @NoCSRFRequired |
|
|
|
*/ |
|
|
|
public function timeMap($url) { |
|
|
|
$url = getUrlParameter('timemap'); // XXX workaround, as nextcloud corrupts the $url parameter. |
|
|
|
|
|
|
|
$matchingMementos = findMementos($this->userFolder, $url); |
|
|
|
|
|
|
|
// Build the list of links. |
|
|
@@ -46,7 +48,6 @@ class TimeMapController extends Controller { |
|
|
|
$lastDatetime = datetimeTimestampToString($lastMemento['datetime']); |
|
|
|
} |
|
|
|
$links = [ |
|
|
|
// FIXME Our $url param has its duplicate slashes removed, so it looks like 'http:/abc'. |
|
|
|
"<$url>;rel=\"original\"", |
|
|
|
"<$timeGateUrl>;rel=\"timegate\"", |
|
|
|
"<$timeMapUrl>;rel=\"self\";type=\"application/link-format\"" . |
|
|
|