Ejemplo n.º 1
0
 public static function init_dependencies(XenForo_Dependencies_Abstract $dependencies, array $data)
 {
     bdTagMe_Helper_Template::helperSnippetSetup();
     bdTagMe_ShippableHelper_Updater::onInitDependencies($dependencies, bdTagMe_Option::UPDATER_URL);
 }
Ejemplo n.º 2
0
 /**
  * Bootstraps the Updater.
  * This routine cannot be executed at `init_dependencies` due to version resolving,
  * it will run at `front_controller_pre_route` instead. This method should only be called once
  * for each <code>$config.apiUrl</code.
  *
  * @param array $config
  *
  * @internal
  */
 public static function bootstrap(array $config)
 {
     if (isset($GLOBALS[self::KEY]['setupMethod'][$config['apiUrl']])) {
         if (XenForo_Application::debugMode()) {
             die(sprintf('Updater for %s has been setup by %s already!', $config['apiUrl'], $GLOBALS[self::KEY]['setupMethod'][$config['apiUrl']]));
         }
         return;
     }
     $GLOBALS[self::KEY]['setupMethod'][$config['apiUrl']] = __METHOD__;
     if (self::$_config !== null) {
         if (XenForo_Application::debugMode()) {
             die(sprintf('%s has been setup to run with %s already!', __METHOD__, self::$_config['apiUrl']));
         }
         return;
     }
     self::$_config = $config;
     // from this point, we no longer need to care about other implementations of Updater
     // all checks have been passed and indicated that the current one is the latest version
     XenForo_CodeEvent::addListener('front_controller_pre_view', array(__CLASS__, 'front_controller_pre_view'));
 }
Ejemplo n.º 3
0
 private static function uninstallCustomized()
 {
     bdTagMe_ShippableHelper_Updater::onUninstall(bdTagMe_Option::UPDATER_URL);
 }