arnoldle / phplist-plugin-submitByMailPlugin

Elements of a plugin to submit messages to Phplist by mail. In development. Planning for June release.
3 stars 6 forks source link

Dependency checking #6

Closed bramley closed 8 months ago

bramley commented 8 years ago

I saw a few commit messages about checking various dependencies, such as IMAP. There is now a specific plugin method for this so that a plugin can be enabled only when all dependencies have been met. See admin/defaultplugin.php

  /* dependency check
   * 
   * provides tests to determine whether this plugin can be used
   * example:
   *    array(
   *        'description of dependency' => condition for plugin to be enabled
   *    )
   */
  function dependencyCheck()
  {
      return array(
        'phpList version' => version_compare(VERSION, '3.0.12') >= 0
      );
  }
arnoldle commented 8 years ago

Thanks for the tip, Duncan.

Arnold

On Oct 30, 2015, at 1:44 AM, Duncan Cameron notifications@github.com wrote:

I saw a few commit messages about checking various dependencies, such as IMAP. There is now a specific plugin method for this so that a plugin can be enabled only when all dependencies have been met. See admin/defaultplugin.php

/* dependency check

  • provides tests to determine whether this plugin can be used
  • example:
  • array(
  • 'description of dependency' => condition for plugin to be enabled
  • ) */ function dependencyCheck() { return array( 'phpList version' => version_compare(VERSION, '3.0.12') >= 0 ); } — Reply to this email directly or view it on GitHub https://github.com/arnoldle/phplist-plugin-submitByMailPlugin/issues/6.