Assembla home | Assembla project page
 

Changeset 175

Show
Ignore:
Timestamp:
03/17/08 02:36:46 (8 months ago)
Author:
tobias382
Message:

Updated Autojoin::checkDependencies() to prevent it from throwing a fatal error

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Phergie/Plugin/Autojoin.php

    r113 r175  
    1515class Phergie_Plugin_Autojoin extends Phergie_Plugin_Abstract_Base 
    1616{ 
     17    /** 
     18    * Returns whether or not the current environment meets the requirements 
     19    * of the plugin in order for it to be run, including the PHP version, 
     20    * loaded PHP extensions, and other plugins intended to be loaded. 
     21    * Plugins with such requirements should override this method. 
     22    * 
     23    * @param Phergie_Driver_Abstract $client Client instance 
     24    * @param array $plugins List of short names for plugins that the 
     25    *                       bootstrap file intends to instantiate 
     26    * @return bool TRUE if dependencies are met, FALSE otherwise 
     27    */ 
     28    public static function checkDependencies(Phergie_Driver_Abstract $client, array $plugins) 
     29    { 
     30        $channels = $client->getIni('autojoin.channels'); 
     31        if (empty($channels)) { 
     32                        return false; 
     33                } 
     34 
     35                return true; 
     36    } 
     37 
    1738    /** 
    1839    * Intercepts the end of the "message of the day" response and responds by