本文整理汇总了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');");
}
}