本文整理匯總了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) {