本文整理汇总了PHP中TemplateManager::existsByFolderNameAndVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP TemplateManager::existsByFolderNameAndVersion方法的具体用法?PHP TemplateManager::existsByFolderNameAndVersion怎么用?PHP TemplateManager::existsByFolderNameAndVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TemplateManager
的用法示例。
在下文中一共展示了TemplateManager::existsByFolderNameAndVersion方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Template
if (!isset($_GET['folder'])) {
$errors[] = "No script directory was given.";
} else {
if (empty($_GET['folder'])) {
$errors[] = "The script directory is empty.";
}
}
if (!isset($_GET['vers'])) {
$errors[] = "No script directory was given.";
} else {
if (empty($_GET['vers'])) {
$errors[] = "The script directory is empty.";
}
}
if (count($errors) == 0) {
if (TemplateManager::existsByFolderNameAndVersion($_GET['folder'], $_GET['vers'])) {
$errors[] = "The script is already installed in this version.";
}
}
if (count($errors) == 0) {
Core::addTask(TASK_TEMPLATES_INSTALL_FROM_REMOTE, $_GET['folder']);
$page->assign("t_Report", Reporting::success("The Script will be installed in a few moments..."));
} else {
$page->assign("t_Report", Reporting::error(Utils::buildErrorString($errors)));
}
} else {
if ("RemoveScript" == $do) {
if (!empty($_GET['id'])) {
if (TemplateManager::existsById($_GET['id'])) {
$t = new Template($_GET['id']);
if ($t->isInstalledOnAnyServer() != 0) {