new WCF.Effect.SmoothScroll();
new WCF.Effect.BalloonTooltip();
new WCF.Sitemap();
- new WCF.Style.Chooser();
+ {if $__wcf->getStyleHandler()->countStyles() > 1}new WCF.Style.Chooser();{/if}
WCF.Dropdown.init();
WCF.System.PageNavigation.init('.pageNavigation');
WCF.Date.Picker.init();
}
}
+ /**
+ * Returns true, if package identified by $package is already installed.
+ *
+ * @param string $package
+ * @return boolean
+ */
+ public static function isAlreadyInstalled($package) {
+ $sql = "SELECT COUNT(*) AS count
+ FROM wcf".WCF_N."_package
+ WHERE package = ?";
+ $statement = WCF::getDB()->prepareStatement($sql);
+ $statement->execute(array($package));
+ $row = $statement->fetchArray();
+
+ return ($row['count'] ? true : false);
+ }
+
/**
* Checks if a package name is valid.
*