From 3e0e6b2cf87e5140b8ed99d4b01aed582d2e730b Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 12 Oct 2011 18:40:28 +0200 Subject: [PATCH] Usage of LinkHandler including routing Search & Replace with RegEx FTW! --- .../files/acp/templates/acpSessionLog.tpl | 2 +- .../files/acp/templates/acpSessionLogList.tpl | 6 +++--- .../install/files/acp/templates/cacheList.tpl | 4 ++-- .../install/files/acp/templates/cronjobAdd.tpl | 6 +++--- .../install/files/acp/templates/cronjobList.tpl | 8 ++++---- .../files/acp/templates/cronjobLogList.tpl | 2 +- wcfsetup/install/files/acp/templates/header.tpl | 2 +- wcfsetup/install/files/acp/templates/login.tpl | 2 +- .../files/acp/templates/masterPassword.tpl | 2 +- .../files/acp/templates/masterPasswordInit.tpl | 2 +- wcfsetup/install/files/acp/templates/option.tpl | 2 +- .../install/files/acp/templates/optionImport.tpl | 4 ++-- .../acp/templates/packageAutoUpdateList.tpl | 2 +- .../install/files/acp/templates/packageList.tpl | 4 ++-- .../files/acp/templates/packageStartInstall.tpl | 4 ++-- .../packageUninstallationDependencies.tpl | 10 +++++----- .../files/acp/templates/packageUpdate.tpl | 2 +- .../files/acp/templates/packageUpdateSearch.tpl | 2 +- .../acp/templates/packageUpdateSearchResult.tpl | 4 ++-- .../install/files/acp/templates/packageView.tpl | 12 ++++++------ .../files/acp/templates/updateServerAdd.tpl | 5 +++-- .../files/acp/templates/updateServerList.tpl | 8 ++++---- wcfsetup/install/files/acp/templates/userAdd.tpl | 6 +++--- .../files/acp/templates/userAssignToGroup.tpl | 4 ++-- .../acp/templates/userEmailAddressExport.tpl | 4 ++-- .../install/files/acp/templates/userGroupAdd.tpl | 4 ++-- .../files/acp/templates/userGroupList.tpl | 8 ++++---- .../install/files/acp/templates/userList.tpl | 16 ++++++++-------- .../install/files/acp/templates/userMail.tpl | 8 ++++---- .../install/files/acp/templates/userSearch.tpl | 6 +++--- .../files/acp/templates/usersMassProcessing.tpl | 2 +- .../lib/acp/form/MasterPasswordForm.class.php | 3 ++- .../acp/form/PackageStartInstallForm.class.php | 4 +++- .../lib/acp/form/PackageUpdateForm.class.php | 4 +++- .../acp/form/PackageUpdateSearchForm.class.php | 7 ++++++- .../files/lib/acp/form/UserSearchForm.class.php | 7 ++++++- .../acp/form/UsersMassProcessingForm.class.php | 8 +++++++- .../files/lib/acp/page/UserListPage.class.php | 3 ++- .../PackageInstallationDispatcher.class.php | 7 +++++-- .../PackageUninstallationDispatcher.class.php | 4 +++- 40 files changed, 114 insertions(+), 86 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/acpSessionLog.tpl b/wcfsetup/install/files/acp/templates/acpSessionLog.tpl index 7c920d1b20..13cf6f6367 100644 --- a/wcfsetup/install/files/acp/templates/acpSessionLog.tpl +++ b/wcfsetup/install/files/acp/templates/acpSessionLog.tpl @@ -8,7 +8,7 @@
- {pages print=true assign=pagesLinks controller='ACPSessionLog' id=$sessionLogID link="?pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"|concat:SID_ARG_2ND_NOT_ENCODED} + {pages print=true assign=pagesLinks controller='ACPSessionLog' id=$sessionLogID link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"}
{hascontent} diff --git a/wcfsetup/install/files/acp/templates/acpSessionLogList.tpl b/wcfsetup/install/files/acp/templates/acpSessionLogList.tpl index dbf278e4eb..f007cb9a63 100644 --- a/wcfsetup/install/files/acp/templates/acpSessionLogList.tpl +++ b/wcfsetup/install/files/acp/templates/acpSessionLogList.tpl @@ -37,9 +37,9 @@ {foreach from=$objects item=sessionLog}

{@$sessionLog->sessionLogID}

-

{if $__wcf->user->userID == $sessionLog->userID}{/if} {$sessionLog->username}

-

{$sessionLog->ipAddress}{if $sessionLog->hostname != $sessionLog->ipAddress}
{$sessionLog->hostname}{/if}

-

{$sessionLog->userAgent}

+

{if $__wcf->user->userID == $sessionLog->userID}{/if} {$sessionLog->username}

+

{$sessionLog->ipAddress}{if $sessionLog->hostname != $sessionLog->ipAddress}
{$sessionLog->hostname}{/if}

+

{$sessionLog->userAgent}

{@$sessionLog->time|time}

{@$sessionLog->lastActivityTime|time}

{#$sessionLog->accesses}

diff --git a/wcfsetup/install/files/acp/templates/cacheList.tpl b/wcfsetup/install/files/acp/templates/cacheList.tpl index e602e9821a..46f6373d22 100644 --- a/wcfsetup/install/files/acp/templates/cacheList.tpl +++ b/wcfsetup/install/files/acp/templates/cacheList.tpl @@ -51,7 +51,7 @@
@@ -99,7 +99,7 @@ diff --git a/wcfsetup/install/files/acp/templates/cronjobLogList.tpl b/wcfsetup/install/files/acp/templates/cronjobLogList.tpl index 35ff7dbfad..811abd9ba5 100644 --- a/wcfsetup/install/files/acp/templates/cronjobLogList.tpl +++ b/wcfsetup/install/files/acp/templates/cronjobLogList.tpl @@ -13,7 +13,7 @@
{hascontent} - +

{lang}wcf.acp.cronjob.log{/lang} {#$items}

diff --git a/wcfsetup/install/files/acp/templates/header.tpl b/wcfsetup/install/files/acp/templates/header.tpl index 828f2e9ffe..f062abc097 100644 --- a/wcfsetup/install/files/acp/templates/header.tpl +++ b/wcfsetup/install/files/acp/templates/header.tpl @@ -87,7 +87,7 @@
  • {lang}wcf.acp.user.userNote{/lang}
  • diff --git a/wcfsetup/install/files/acp/templates/login.tpl b/wcfsetup/install/files/acp/templates/login.tpl index ec39993a27..812873ed11 100644 --- a/wcfsetup/install/files/acp/templates/login.tpl +++ b/wcfsetup/install/files/acp/templates/login.tpl @@ -25,7 +25,7 @@

    {lang}wcf.global.form.error{/lang}

    {/if} - +
    {lang}wcf.user.login.data{/lang} diff --git a/wcfsetup/install/files/acp/templates/masterPassword.tpl b/wcfsetup/install/files/acp/templates/masterPassword.tpl index d3cea377fb..2a4c6c1846 100644 --- a/wcfsetup/install/files/acp/templates/masterPassword.tpl +++ b/wcfsetup/install/files/acp/templates/masterPassword.tpl @@ -19,7 +19,7 @@

    {lang}wcf.global.form.error{/lang}

    {/if} - +
    diff --git a/wcfsetup/install/files/acp/templates/masterPasswordInit.tpl b/wcfsetup/install/files/acp/templates/masterPasswordInit.tpl index 56b64e4314..7f4d07029e 100644 --- a/wcfsetup/install/files/acp/templates/masterPasswordInit.tpl +++ b/wcfsetup/install/files/acp/templates/masterPasswordInit.tpl @@ -23,7 +23,7 @@

    {lang}wcf.global.form.error{/lang}

    {/if} - +
    diff --git a/wcfsetup/install/files/acp/templates/option.tpl b/wcfsetup/install/files/acp/templates/option.tpl index 7836af9466..48cfe4f184 100644 --- a/wcfsetup/install/files/acp/templates/option.tpl +++ b/wcfsetup/install/files/acp/templates/option.tpl @@ -25,7 +25,7 @@

    {lang}wcf.global.form.error{/lang}

    {/if} - +
    diff --git a/wcfsetup/install/files/acp/templates/updateServerAdd.tpl b/wcfsetup/install/files/acp/templates/updateServerAdd.tpl index 6d08e0e8f4..14cc152a4a 100644 --- a/wcfsetup/install/files/acp/templates/updateServerAdd.tpl +++ b/wcfsetup/install/files/acp/templates/updateServerAdd.tpl @@ -21,11 +21,11 @@ - +
    @@ -71,6 +71,7 @@
    + {if $packageUpdateServerID|isset}{/if} {@SID_INPUT_TAG}
    diff --git a/wcfsetup/install/files/acp/templates/updateServerList.tpl b/wcfsetup/install/files/acp/templates/updateServerList.tpl index 9fc06894fd..d4fa1c2184 100644 --- a/wcfsetup/install/files/acp/templates/updateServerList.tpl +++ b/wcfsetup/install/files/acp/templates/updateServerList.tpl @@ -24,7 +24,7 @@ {pages print=true assign=pagesLinks controller="UpdateServerList" link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"}
    @@ -54,13 +54,13 @@ - + {if $additionalButtons[$updateServer->packageUpdateServerID]|isset}{@$additionalButtons[$updateServer->packageUpdateServerID]}{/if}

    {@$updateServer->packageUpdateServerID}

    -

    {$updateServer->serverURL}

    +

    {$updateServer->serverURL}

    {#$updateServer->packages}

    {@$updateServer->status}

    {@$updateServer->errorMessage|truncate:"30"}

    @@ -79,7 +79,7 @@ {@$pagesLinks}
    {hascontentelse} diff --git a/wcfsetup/install/files/acp/templates/userAdd.tpl b/wcfsetup/install/files/acp/templates/userAdd.tpl index f79d2d9f4b..0b80f93a34 100644 --- a/wcfsetup/install/files/acp/templates/userAdd.tpl +++ b/wcfsetup/install/files/acp/templates/userAdd.tpl @@ -72,14 +72,14 @@ -
    +
    diff --git a/wcfsetup/install/files/acp/templates/userAssignToGroup.tpl b/wcfsetup/install/files/acp/templates/userAssignToGroup.tpl index fa928474f5..5497b40d07 100644 --- a/wcfsetup/install/files/acp/templates/userAssignToGroup.tpl +++ b/wcfsetup/install/files/acp/templates/userAssignToGroup.tpl @@ -11,7 +11,7 @@

    {lang}wcf.global.form.error{/lang}

    {/if} - +
    @@ -19,7 +19,7 @@ {lang}wcf.acp.user.assignToGroup.markedUsers{/lang}
      - {implode from=$users item=$user}
    • {$user}
    • {/implode} + {implode from=$users item=$user}
    • {$user}
    • {/implode}
    diff --git a/wcfsetup/install/files/acp/templates/userEmailAddressExport.tpl b/wcfsetup/install/files/acp/templates/userEmailAddressExport.tpl index fa6183d309..7fdb1c61ec 100644 --- a/wcfsetup/install/files/acp/templates/userEmailAddressExport.tpl +++ b/wcfsetup/install/files/acp/templates/userEmailAddressExport.tpl @@ -15,13 +15,13 @@
    - +
    {lang}wcf.acp.user.exportEmailAddress.markedUsers{/lang}
      - {implode from=$users item=$user}
    • {$user}
    • {/implode} + {implode from=$users item=$user}
    • {$user}
    • {/implode}
    diff --git a/wcfsetup/install/files/acp/templates/userGroupAdd.tpl b/wcfsetup/install/files/acp/templates/userGroupAdd.tpl index 65ef550458..38d083fa96 100644 --- a/wcfsetup/install/files/acp/templates/userGroupAdd.tpl +++ b/wcfsetup/install/files/acp/templates/userGroupAdd.tpl @@ -34,13 +34,13 @@
    - +
    diff --git a/wcfsetup/install/files/acp/templates/userGroupList.tpl b/wcfsetup/install/files/acp/templates/userGroupList.tpl index 9d9e06bd0d..a27a1e6402 100644 --- a/wcfsetup/install/files/acp/templates/userGroupList.tpl +++ b/wcfsetup/install/files/acp/templates/userGroupList.tpl @@ -11,7 +11,7 @@ {pages print=true assign=pagesLinks controller="UserGroupList" link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"} @@ -40,7 +40,7 @@ {if $group->isEditable()} - + {else} {/if} @@ -53,7 +53,7 @@ {if $additionalButtons[$group->groupID]|isset}{@$additionalButtons[$group->groupID]}{/if}

    {@$group->groupID}

    - {if $group->isEditable()}

    {lang}{$group->groupName}{/lang}{else}{lang}{$group->groupName}{/lang}

    {/if} + {if $group->isEditable()}

    {lang}{$group->groupName}{/lang}{else}{lang}{$group->groupName}{/lang}

    {/if}

    {#$group->members}

    {if $additionalColumns[$group->groupID]|isset}{@$additionalColumns[$group->groupID]}{/if} @@ -69,7 +69,7 @@ {@$pagesLinks} diff --git a/wcfsetup/install/files/acp/templates/userList.tpl b/wcfsetup/install/files/acp/templates/userList.tpl index c95b51e342..e22950923d 100644 --- a/wcfsetup/install/files/acp/templates/userList.tpl +++ b/wcfsetup/install/files/acp/templates/userList.tpl @@ -25,9 +25,9 @@ @@ -36,7 +36,7 @@
    @@ -64,12 +64,12 @@ {if $user->editable} - + {else} {/if} {if $user->deletable} - + {else} {/if} @@ -77,7 +77,7 @@ {if $additionalButtons[$user->userID]|isset}{@$additionalButtons[$user->userID]}{/if}

    {@$user->userID}

    -

    {if $user->editable}{$user->username}{else}{$user->username}{/if}

    +

    {if $user->editable}{$user->username}{else}{$user->username}{/if}

    {foreach from=$columnHeads key=column item=columnLanguageVariable}

    {if $columnValues[$user->userID][$column]|isset}{@$columnValues[$user->userID][$column]}{/if}

    @@ -100,9 +100,9 @@ diff --git a/wcfsetup/install/files/acp/templates/userMail.tpl b/wcfsetup/install/files/acp/templates/userMail.tpl index fc30edf28f..af86ab54b2 100644 --- a/wcfsetup/install/files/acp/templates/userMail.tpl +++ b/wcfsetup/install/files/acp/templates/userMail.tpl @@ -34,14 +34,14 @@ - +
    {if $action == ''} @@ -49,7 +49,7 @@ {lang}wcf.acp.user.sendMail.markedUsers{/lang}
    - {implode from=$users item=$user}{$user}{/implode} + {implode from=$users item=$user}{$user}{/implode}
    {/if} diff --git a/wcfsetup/install/files/acp/templates/userSearch.tpl b/wcfsetup/install/files/acp/templates/userSearch.tpl index a79499d803..33b1608e47 100644 --- a/wcfsetup/install/files/acp/templates/userSearch.tpl +++ b/wcfsetup/install/files/acp/templates/userSearch.tpl @@ -29,14 +29,14 @@
    - +
    diff --git a/wcfsetup/install/files/acp/templates/usersMassProcessing.tpl b/wcfsetup/install/files/acp/templates/usersMassProcessing.tpl index 07a842bdbd..9d68bade3b 100644 --- a/wcfsetup/install/files/acp/templates/usersMassProcessing.tpl +++ b/wcfsetup/install/files/acp/templates/usersMassProcessing.tpl @@ -82,7 +82,7 @@

    {lang}wcf.acp.user.massProcessing.warning{/lang}

    - +
    diff --git a/wcfsetup/install/files/lib/acp/form/MasterPasswordForm.class.php b/wcfsetup/install/files/lib/acp/form/MasterPasswordForm.class.php index d593ce0b18..f5f3c1fad9 100755 --- a/wcfsetup/install/files/lib/acp/form/MasterPasswordForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/MasterPasswordForm.class.php @@ -1,6 +1,7 @@ url)) { - $this->url = 'index.php/Index/'.SID_ARG_1ST; + $this->url = LinkHandler::getInstance()->getLink('', array('controller' => 'Index')); } HeaderUtil::redirect($this->url, false); exit; diff --git a/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php b/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php index 48c3eebe05..bd017f99ae 100755 --- a/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php @@ -10,6 +10,7 @@ use wcf\system\exception\SystemException; use wcf\system\exception\UserInputException; use wcf\system\package\PackageArchive; use wcf\system\package\PackageInstallationDispatcher; +use wcf\system\request\LinkHandler; use wcf\util\FileUtil; use wcf\util\HeaderUtil; use wcf\util\StringUtil; @@ -231,7 +232,8 @@ class PackageStartInstallForm extends ACPForm { $this->saved(); // open queue - HeaderUtil::redirect('index.php/Package/?action=openQueue&processNo='.$processNo.SID_ARG_2ND_NOT_ENCODED); + $url = LinkHandler::getInstance()->getLink('action=openQueue&processNo='.$processNo, array('controller' => 'Package')); + HeaderUtil::redirect($url); exit; } diff --git a/wcfsetup/install/files/lib/acp/form/PackageUpdateForm.class.php b/wcfsetup/install/files/lib/acp/form/PackageUpdateForm.class.php index f311efa233..4a19418555 100755 --- a/wcfsetup/install/files/lib/acp/form/PackageUpdateForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PackageUpdateForm.class.php @@ -3,6 +3,7 @@ namespace wcf\acp\form; use wcf\system\exception\SystemException; use wcf\system\exception\UserInputException; use wcf\system\package\PackageUpdateDispatcher; +use wcf\system\request\LinkHandler; use wcf\system\WCF; use wcf\system\WCFACP; use wcf\util\HeaderUtil; @@ -103,7 +104,8 @@ class PackageUpdateForm extends ACPForm { $this->saved(); // open queue - HeaderUtil::redirect('index.php/Package/?action=openQueue&processNo='.$processNo.''.SID_ARG_2ND_NOT_ENCODED); + $url = LinkHandler::getInstance()->getLink('action=openQueue&processNo='.$processNo, array('controller' => 'Package')); + HeaderUtil::redirect($url); exit; } } diff --git a/wcfsetup/install/files/lib/acp/form/PackageUpdateSearchForm.class.php b/wcfsetup/install/files/lib/acp/form/PackageUpdateSearchForm.class.php index 2191fc4445..6eb1acf763 100644 --- a/wcfsetup/install/files/lib/acp/form/PackageUpdateSearchForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PackageUpdateSearchForm.class.php @@ -5,6 +5,7 @@ use wcf\data\search\SearchEditor; use wcf\system\database\util\PreparedStatementConditionBuilder; use wcf\system\exception\UserInputException; use wcf\system\package\PackageUpdateDispatcher; +use wcf\system\request\LinkHandler; use wcf\system\WCF; use wcf\system\WCFACP; use wcf\util\ArrayUtil; @@ -242,7 +243,11 @@ class PackageUpdateSearchForm extends ACPForm { $this->saved(); // forward - HeaderUtil::redirect('index.php/PackageUpdateSearchResult/'.$search->searchID.'/'.SID_ARG_1ST); + $url = LinkHandler::getInstance()->getLink('', array( + 'controller' => 'PackageUpdateSearchResult', + 'id' => $search->searchID + )); + HeaderUtil::redirect($url); exit; } diff --git a/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php b/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php index efcd45e9d0..2012578b2d 100755 --- a/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php @@ -8,6 +8,7 @@ use wcf\system\database\util\PreparedStatementConditionBuilder; use wcf\system\event\EventHandler; use wcf\system\exception\UserInputException; use wcf\system\language\LanguageFactory; +use wcf\system\request\LinkHandler; use wcf\system\wcf; use wcf\util\ArrayUtil; use wcf\util\HeaderUtil; @@ -214,7 +215,11 @@ class UserSearchForm extends UserOptionListForm { $this->saved(); // forward to result page - HeaderUtil::redirect('index.php/UserList/'.$this->searchID.'/?sortField='.rawurlencode($this->sortField).'&sortOrder='.rawurlencode($this->sortOrder).''.SID_ARG_2ND_NOT_ENCODED); + $url = LinkHandler::getInstance()->getLink('sortField='.rawurlencode($this->sortField).'&sortOrder='.rawurlencode($this->sortOrder), array( + 'controller' => 'UserList', + 'id' => $this->searchID + )); + HeaderUtil::redirect($url); exit; } diff --git a/wcfsetup/install/files/lib/acp/form/UsersMassProcessingForm.class.php b/wcfsetup/install/files/lib/acp/form/UsersMassProcessingForm.class.php index 3a73922928..05c8dba48d 100644 --- a/wcfsetup/install/files/lib/acp/form/UsersMassProcessingForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UsersMassProcessingForm.class.php @@ -12,6 +12,7 @@ use wcf\system\event\EventHandler; use wcf\system\exception\PermissionDeniedException; use wcf\system\exception\UserInputException; use wcf\system\language\LanguageFactory; +use wcf\system\request\LinkHandler; use wcf\util\ArrayUtil; use wcf\util\StringUtil; @@ -194,10 +195,15 @@ class UsersMassProcessingForm extends UserOptionListForm { WCF::getSession()->register('userMailData', $userMailData); $this->saved(); + $url = LinkHandler::getInstance()->getLink('', array( + 'controller' => 'UserMail', + 'id' => $mailID + )); + // show worker template WCF::getTPL()->assign(array( 'pageTitle' => WCF::getLanguage()->get('wcf.acp.user.sendMail'), - 'url' => 'index.php/UserMail/'.$mailID.'/'.SID_ARG_1ST + 'url' => $url )); WCF::getTPL()->display('worker'); exit; diff --git a/wcfsetup/install/files/lib/acp/page/UserListPage.class.php b/wcfsetup/install/files/lib/acp/page/UserListPage.class.php index 5c6a181bd9..fa7fde7974 100755 --- a/wcfsetup/install/files/lib/acp/page/UserListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/UserListPage.class.php @@ -8,6 +8,7 @@ use wcf\system\cache\CacheHandler; use wcf\system\clipboard\ClipboardHandler; use wcf\system\database\util\PreparedStatementConditionBuilder; use wcf\system\event\EventHandler; +use wcf\system\request\LinkHandler; use wcf\system\WCF; use wcf\util\DateUtil; use wcf\util\StringUtil; @@ -114,7 +115,7 @@ class UserListPage extends SortablePage { $this->readUsers(); // build page url - $this->url = 'index.php/UserList/?searchID='.$this->searchID.'&action='.rawurlencode($this->action).'&pageNo='.$this->pageNo.'&sortField='.$this->sortField.'&sortOrder='.$this->sortOrder.''.SID_ARG_2ND_NOT_ENCODED; + $this->url = LinkHandler::getInstance('searchID='.$this->searchID.'&action='.rawurlencode($this->action).'&pageNo='.$this->pageNo.'&sortField='.$this->sortField.'&sortOrder='.$this->sortOrder, array('controller' => 'UserList')); } /** diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index dd681ec471..e1df4166e1 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -14,6 +14,7 @@ use wcf\system\exception\SystemException; use wcf\system\form; use wcf\system\form\container; use wcf\system\form\element; +use wcf\system\request\LinkHandler; use wcf\system\WCF; use wcf\util\FileUtil; use wcf\util\HeaderUtil; @@ -534,11 +535,13 @@ class PackageInstallationDispatcher { $packageInstallation = $statement->fetchArray(); if (!isset($packageInstallation['queueID'])) { - HeaderUtil::redirect('index.php/PackageList/?'.SID_ARG_1ST); + $url = LinkHandler::getInstance()->getLink('', array('controller' => 'PackageList')); + HeaderUtil::redirect($url); exit; } else { - HeaderUtil::redirect('index.php/Package/?action='.$packageInstallation['action'].'&queueID='.$packageInstallation['queueID'].''.SID_ARG_2ND_NOT_ENCODED); + $url = LinkHandler::getInstance()->getLink('action='.$packageInstallation['action'].'&queueID='.$packageInstallation['queueID'], array('controller' => 'Package')); + HeaderUtil::redirect($url); exit; } } diff --git a/wcfsetup/install/files/lib/system/package/PackageUninstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageUninstallationDispatcher.class.php index 7b768f8b1f..8465a50fa3 100644 --- a/wcfsetup/install/files/lib/system/package/PackageUninstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageUninstallationDispatcher.class.php @@ -10,6 +10,7 @@ use wcf\data\package\installation\queue\PackageInstallationQueueEditor; use wcf\system\cache\CacheHandler; use wcf\system\exception\IllegalLinkException; use wcf\system\exception\SystemException; +use wcf\system\request\LinkHandler; use wcf\system\setup\Uninstaller; use wcf\system\WCF; use wcf\util\HeaderUtil; @@ -280,7 +281,8 @@ class PackageUninstallationDispatcher extends PackageInstallationDispatcher { )); } - HeaderUtil::redirect('index.php/Package/?action=openQueue&processNo='.$processNo.''.SID_ARG_2ND_NOT_ENCODED); + $url = LinkHandler::getInstance()->getLink('action=openQueue&processNo='.$processNo, array('controller' => 'Package')); + HeaderUtil::redirect($url); exit; } } -- 2.20.1