Skip to content

Commit

Permalink
Clean up router delegation
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Jun 27, 2024
1 parent 43b3ad0 commit 1fae660
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 41 deletions.
5 changes: 0 additions & 5 deletions classes/core/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*
* @class Application
*
* @ingroup core
*
* @see PKPApplication
*
* @brief Class describing this application.
Expand All @@ -37,8 +35,6 @@ class Application extends PKPApplication
public const ASSOC_TYPE_ISSUE = 0x0000103;
public const ASSOC_TYPE_ISSUE_GALLEY = 0x0000105;

public const CONTEXT_JOURNAL = 1; // not used?
public const REQUIRES_XSL = false;

/**
Expand All @@ -55,7 +51,6 @@ public function __construct()
'ASSOC_TYPE_JOURNAL',
'ASSOC_TYPE_ISSUE',
'ASSOC_TYPE_ISSUE_GALLEY',
'CONTEXT_JOURNAL',
] as $constantName) {
if (!defined($constantName)) {
define($constantName, constant('self::' . $constantName));
Expand Down
35 changes: 0 additions & 35 deletions classes/core/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*
* @class Request
*
* @ingroup core
*
* @brief @verbatim Class providing operations associated with HTTP requests.
* Requests are assumed to be in the format http://host.tld/index.php/<journal_id>/<page_name>/<operation_name>/<arguments...>
* <journal_id> is assumed to be "index" for top-level site requests. @endverbatim
Expand Down Expand Up @@ -40,37 +38,4 @@ public function getContext(): ?Journal
{
return parent::getContext();
}

/**
* Deprecated
*
* @see PKPPageRouter::url()
*
* @param null|mixed $journalPath
* @param null|mixed $page
* @param null|mixed $op
* @param null|mixed $path
* @param null|mixed $params
* @param null|mixed $anchor
*/
public function url(
$journalPath = null,
$page = null,
$op = null,
$path = null,
$params = null,
$anchor = null,
$escape = false
) {
return $this->_delegateToRouter(
'url',
$journalPath,
$page,
$op,
$path,
$params,
$anchor,
$escape
);
}
}
2 changes: 1 addition & 1 deletion pages/issue/IssueHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function current($args, $request)
$issue = Repo::issue()->getCurrent($journal->getId(), true);

if ($issue != null) {
$request->redirect(null, 'issue', 'view', $issue->getBestIssueId());
$request->redirect(null, 'issue', 'view', [$issue->getBestIssueId()]);
}

$this->setupTemplate($request);
Expand Down

0 comments on commit 1fae660

Please sign in to comment.