本文整理汇总了PHP中wcf\util\ArrayUtil::appendSuffix方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayUtil::appendSuffix方法的具体用法?PHP ArrayUtil::appendSuffix怎么用?PHP ArrayUtil::appendSuffix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wcf\util\ArrayUtil
的用法示例。
在下文中一共展示了ArrayUtil::appendSuffix方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: readParameters
/**
* @todo This whole page is carzy, it's manipulating the requested page, but RequestHandler does not work this way
* @see wcf\page\IPage::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['loginUsername'])) {
$this->loginUsername = $_REQUEST['loginUsername'];
}
if (isset($_REQUEST['loginPassword'])) {
$this->loginPassword = $_REQUEST['loginPassword'];
}
if (isset($_REQUEST['saveAuthData'])) {
$this->saveAuthData = intval($_REQUEST['saveAuthData']);
}
if ($this->packageUpdateServerID == 0 && isset($_REQUEST['packageUpdateServerID'])) {
$this->packageUpdateServerID = intval($_REQUEST['packageUpdateServerID']);
}
if (!empty($_REQUEST['requestedPage']) || !empty($_REQUEST['requestedForm']) || !empty($_REQUEST['requestedAction'])) {
// get update server
$updateServer = new PackageUpdateServer($this->packageUpdateServerID);
if (!$updateServer->packageUpdateServerID) {
throw new IllegalLinkException();
}
// update update server
if ($this->saveAuthData) {
$updateServerEditor = new PackageUpdateServerEditor($updateServer);
$updateServerEditor->update(array('loginUsername' => $this->loginUsername, 'loginPassword' => $this->loginPassword));
}
// save auth data in session
$authData = array('authType' => 'Basic', 'loginUsername' => $this->loginUsername, 'loginPassword' => $this->loginPassword);
// session data
$packageUpdateAuthData = WCF::getSession()->getVar('packageUpdateAuthData');
if ($packageUpdateAuthData === null) {
$packageUpdateAuthData = array();
}
$packageUpdateAuthData[$this->packageUpdateServerID] = $authData;
WCF::getSession()->register('packageUpdateAuthData', $packageUpdateAuthData);
// remove form=PackageUpdateAuth
unset($_REQUEST['form'], $_GET['form'], $_POST['form']);
// set page/form/action
if (!empty($_REQUEST['requestedPage'])) {
$_POST['page'] = $_REQUEST['requestedPage'];
} else {
if (!empty($_REQUEST['requestedForm'])) {
$_POST['form'] = $_REQUEST['requestedForm'];
} else {
$_POST['action'] = $_REQUEST['requestedAction'];
}
}
// remove requestedPage...
unset($_REQUEST['requestedPage'], $_REQUEST['requestedForm'], $_REQUEST['requestedAction']);
// start request handler
/**
* TODO: This is not working anymore, find a solution!
*/
global $packageDirs;
RequestHandler::handle(ArrayUtil::appendSuffix(!empty($packageDirs) ? $packageDirs : array(WCF_DIR), 'lib/acp/'));
exit;
}
}