本文整理汇总了PHP中ArrayUtil::appendSuffix方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayUtil::appendSuffix方法的具体用法?PHP ArrayUtil::appendSuffix怎么用?PHP ArrayUtil::appendSuffix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArrayUtil
的用法示例。
在下文中一共展示了ArrayUtil::appendSuffix方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initTPL
/**
* @see WCF::initTPL()
*/
protected function initTPL()
{
// init style to get template pack id
$this->initStyle();
global $packageDirs;
require_once WCF_DIR . 'lib/system/template/StructuredTemplate.class.php';
self::$tplObj = new StructuredTemplate(self::getStyle()->templatePackID, self::getLanguage()->getLanguageID(), ArrayUtil::appendSuffix($packageDirs, 'templates/'));
$this->assignDefaultTemplateVariables();
// init cronjobs
$this->initCronjobs();
// check offline mode
if (OFFLINE && !self::getUser()->getPermission('user.board.canViewBoardOffline')) {
$showOfflineError = true;
foreach (self::$availablePagesDuringOfflineMode as $type => $names) {
if (isset($_REQUEST[$type])) {
foreach ($names as $name) {
if ($_REQUEST[$type] == $name) {
$showOfflineError = false;
break 2;
}
}
break;
}
}
if ($showOfflineError) {
self::getTPL()->display('offline');
exit;
}
}
// user ban
if (self::getUser()->banned && (!isset($_REQUEST['page']) || $_REQUEST['page'] != 'LegalNotice')) {
throw new NamedUserException(WCF::getLanguage()->getDynamicVariable('wcf.user.banned'));
}
}
示例2: initTPL
/**
* @see WCF::initTPL()
*/
protected function initTPL()
{
// init style to get template pack id
$this->initStyle();
// little dirty fix for XSLT mode
if (XSLT) {
ob_start(array('CMSCore', 'editSourceOutput'));
}
global $packageDirs;
require_once WCF_DIR . 'lib/system/template/StructuredTemplate.class.php';
self::$tplObj = new StructuredTemplate(self::getStyle()->templatePackID, self::getLanguage()->getLanguageID(), ArrayUtil::appendSuffix($packageDirs, 'templates/'));
$this->assignDefaultTemplateVariables();
// init cronjobs
$this->initCronjobs();
// check offline mode
if (OFFLINE && !self::getUser()->getPermission('user.cms.canViewCMSOffline')) {
$showOfflineError = true;
foreach (self::$availablePagesDuringOfflineMode as $type => $names) {
if (isset($_REQUEST[$type])) {
foreach ($names as $name) {
if ($_REQUEST[$type] == $name) {
$showOfflineError = false;
break 2;
}
}
}
break;
}
if ($showOfflineError) {
self::getTPL()->display('offline');
exit;
}
}
// user ban
if (self::getUser()->banned && (!isset($_REQUEST['page']) || $_REQUEST['page'] != 'LegalNotice')) {
require_once WCF_DIR . 'lib/system/exception/PermissionDeniedException.class.php';
throw new PermissionDeniedException();
}
}
示例3: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['htUsername'])) {
$this->htUsername = $_REQUEST['htUsername'];
}
if (isset($_REQUEST['htPassword'])) {
$this->htPassword = $_REQUEST['htPassword'];
}
if (isset($_REQUEST['saveAuthData'])) {
$this->saveAuthData = intval($_REQUEST['saveAuthData']);
}
if (isset($_REQUEST['packageUpdateServerID'])) {
$this->packageUpdateServerID = intval($_REQUEST['packageUpdateServerID']);
}
if (!empty($_REQUEST['requestedPage']) || !empty($_REQUEST['requestedForm']) || !empty($_REQUEST['requestedAction'])) {
// get update server
require_once WCF_DIR . 'lib/acp/package/update/UpdateServerEditor.class.php';
$updateServer = new UpdateServerEditor($this->packageUpdateServerID);
if (!$updateServer->packageUpdateServerID) {
throw new IllegalLinkException();
}
// update update server
if ($this->saveAuthData) {
$updateServer->update($updateServer->server, $this->htUsername, $this->htPassword);
}
// save auth data in session
$authData = array('authType' => 'Basic', 'htUsername' => $this->htUsername, 'htPassword' => $this->htPassword);
// 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
global $packageDirs;
RequestHandler::handle(ArrayUtil::appendSuffix(!empty($packageDirs) ? $packageDirs : array(WCF_DIR), 'lib/acp/'));
exit;
}
}
示例4: initTPL
/**
* Initialises the template engine.
*/
protected function initTPL()
{
global $packageDirs;
self::$tplObj = new ACPTemplate(self::getLanguage()->getLanguageID(), ArrayUtil::appendSuffix($packageDirs, 'acp/templates/'));
$this->assignDefaultTemplateVariables();
}
示例5:
<?php
require_once './global.php';
RequestHandler::handle(ArrayUtil::appendSuffix($packageDirs, 'lib/'));