</acpmenuitem>
<acpmenuitem name="wcf.acp.menu.link.package.list">
- <link>index.php/PackageList</link>
+ <link>index.php/PackageList/</link>
<parent>wcf.acp.menu.link.package.management</parent>
<permissions>admin.system.package.canUpdatePackage,admin.system.package.canUninstallPackage</permissions>
<showorder>1</showorder>
<div class="contentFooter">
{@$pagesLinks}
</div>
-{/if}
+{/hascontent}
{include file='footer'}
public function readParameters() {
parent::readParameters();
- if (isset($_REQUEST['cronjobID'])) $this->cronjobID = intval($_REQUEST['cronjobID']);
+ if (isset($_REQUEST['id'])) $this->cronjobID = intval($_REQUEST['id']);
$this->cronjob = new Cronjob($this->cronjobID);
if (!$this->cronjob->cronjobID) {
throw new IllegalLinkException();
public function readParameters() {
parent::readParameters();
- if (isset($_REQUEST['categoryID'])) $this->categoryID = intval($_REQUEST['categoryID']);
+ if (isset($_REQUEST['id'])) $this->categoryID = intval($_REQUEST['id']);
$this->category = new OptionCategory($this->categoryID);
if (!isset($this->category->categoryID)) {
throw new IllegalLinkException();
public function readParameters() {
parent::readParameters();
- if (isset($_REQUEST['packageUpdateServerID'])) $this->packageUpdateServerID = intval($_REQUEST['packageUpdateServerID']);
+ if (isset($_REQUEST['id'])) $this->packageUpdateServerID = intval($_REQUEST['id']);
$this->updateServer = new PackageUpdateServer($this->packageUpdateServerID);
if (!$this->updateServer->packageUpdateServerID) {
throw new IllegalLinkException();
public function readParameters() {
parent::readParameters();
- if (isset($_REQUEST['userID'])) {
- $this->userID = intval($_REQUEST['userID']);
- $user = new User($this->userID);
- if (!$user->userID) {
- throw new IllegalLinkException();
- }
-
- $this->user = new UserEditor($user);
- if (!UserGroup::isAccessibleGroup($this->user->getGroupIDs())) {
- throw new PermissionDeniedException();
- }
+ if (isset($_REQUEST['id'])) $this->userID = intval($_REQUEST['id']);
+
+ $user = new User($this->userID);
+ if (!$user->userID) {
+ throw new IllegalLinkException();
+ }
+
+ $this->user = new UserEditor($user);
+ if (!UserGroup::isAccessibleGroup($this->user->getGroupIDs())) {
+ throw new PermissionDeniedException();
}
}
parent::readParameters();
// get group
- if (isset($_REQUEST['groupID'])) $this->groupID = intval($_REQUEST['groupID']);
+ if (isset($_REQUEST['id'])) $this->groupID = intval($_REQUEST['id']);
$group = new UserGroup($this->groupID);
if (!$group->groupID) {
throw new IllegalLinkException();
$this->saved();
// forward to result page
- HeaderUtil::redirect('index.php/UserList/?searchID='.$this->searchID.'&sortField='.rawurlencode($this->sortField).'&sortOrder='.rawurlencode($this->sortOrder).''.SID_ARG_2ND_NOT_ENCODED);
+ HeaderUtil::redirect('index.php/UserList/'.$this->searchID.'/?sortField='.rawurlencode($this->sortField).'&sortOrder='.rawurlencode($this->sortOrder).''.SID_ARG_2ND_NOT_ENCODED);
exit;
}
parent::readParameters();
// get session log
- if (isset($_REQUEST['sessionLogID'])) $this->sessionLogID = intval($_REQUEST['sessionLogID']);
+ if (isset($_REQUEST['id'])) $this->sessionLogID = intval($_REQUEST['id']);
$this->sessionLog = new ACPSessionLog($this->sessionLogID);
if (!$this->sessionLog->sessionLogID) {
throw new IllegalLinkException();
use wcf\system\menu\acp\ACPMenu;
use wcf\system\WCF;
+/**
+ * Shows a list of installed packages and plugins.
+ *
+ * @author Alexander Ebert
+ * @copyright 2001-2009 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage acp.page
+ * @category Community Framework
+ */
class PackageListPage extends AbstractPage {
/**
* list of applications
$this->conditions = new PreparedStatementConditionBuilder();
- if (!empty($_REQUEST['searchID'])) {
- $this->searchID = intval($_REQUEST['searchID']);
+ if (!empty($_REQUEST['id'])) {
+ $this->searchID = intval($_REQUEST['id']);
if ($this->searchID) $this->readSearchResult();
if (!count($this->userIDs)) {
throw new IllegalLinkException();
<?php
namespace wcf\system\option;
use wcf\data\option\Option;
+use wcf\system\exception\UserInputException;
use wcf\system\language\I18nHandler;
use wcf\system\WCF;
<?php
namespace wcf\system\option;
use wcf\data\option\Option;
+use wcf\system\exception\UserInputException;
use wcf\system\language\I18nHandler;
use wcf\system\WCF;
$this->package = null;
if ($package->standalone) {
+ $domainPath = '';
+ if (isset($_SERVER['PHP_SELF'])) {
+ $domainPath = $_SERVER['PHP_SELF'];
+ if (strpos($domainPath, '.php') !== false) {
+ $domainPath = preg_replace('~index\.php$~', '', $domainPath);
+ }
+ }
+
// insert as application
ApplicationEditor::create(array(
- 'domainName' => '',
+ 'domainName' => (isset($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : '',
+ 'domainPath' => $domainPath,
'packageID' => $package->packageID
));
}
* @param boolean $sendStatusCode
*/
public static function redirect($location, $prependDir = true, $sendStatusCode = false) {
- if ($prependDir) $location = FileUtil::addTrailingSlash(FileUtil::unifyDirSeperator(dirname(WCF::getSession()->requestURI))) . $location;
+ if ($prependDir) {
+ // remove path info from request URI
+ $requestURI = WCF::getSession()->requestURI;
+ if (($pos = strpos($requestURI, '.php')) !== false) {
+ $requestURI = substr($requestURI, 0, ($pos + 4));
+ }
+
+ $location = FileUtil::addTrailingSlash(FileUtil::unifyDirSeperator(dirname($requestURI))) . $location;
+ }
+
//if ($sendStatusCode) @header('HTTP/1.0 301 Moved Permanently');
if ($sendStatusCode) @header('HTTP/1.1 307 Temporary Redirect');
header('Location: '.$location);