本文整理匯總了PHP中Sites::filterPName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Sites::filterPName方法的具體用法?PHP Sites::filterPName怎麽用?PHP Sites::filterPName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Sites
的用法示例。
在下文中一共展示了Sites::filterPName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: explode
if ($template != 'template') {
$templatePreview = '';
$templateInfo = $templateMgr->getTemplate($template);
$templateInfo['PREVIEWPATH'] = $templateMgr->getPreviewPath($template);
if ($templateInfo['FILE'] > 0) {
$templatePreview = $templateInfo['PREVIEWPATH'];
}
$koala->callJSFunction('Koala.windows[\'wid_' . $parentwindow . '\'].refreshSiteTemplate', $templateInfo['NAME'], $templateInfo['FILENAME'], $template, $templatePreview);
}
break;
case 'saveSiteInfo':
$wid = $this->params['wid'];
$objectID = $this->params['objectID'];
$name = $this->params['site_name'];
$pname = $this->params['site_pname'];
$pname = $siteMgr->filterPName($pname);
$favicon = $this->params['site_favicon'];
$defaulttemplate = $this->params['site_defaulttemplate'];
$templateroot = $this->params['site_templateroot'];
// Check if PNAME is already used or in blacklist
$siteList = $siteMgr->getList();
$siteBlackList = explode(',', (string) sConfig()->getVar("CONFIG/RESERVED_SITENAMES"));
$isError = false;
$errorType = null;
foreach ($siteList as $siteListItem) {
if ($pname != '' && $siteListItem['PNAME'] == $pname && $objectID != $siteListItem['ID']) {
$isError = true;
$errorType = 1;
$koala->queueScript("if (\$('" . $wid . "_site_pname')) \$('" . $wid . "_site_pname').addClassName('error');");
}
}