Assembla home | Assembla project page
 
Show
Ignore:
Timestamp:
08/01/08 21:18:09 (4 months ago)
Author:
Seldaek
Message:

* Fixed a bug in staticPluginLoaded() and updated all calls to it

Files:

Legend:

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

    r251 r278  
    162162     * @return bool TRUE if dependencies are met, FALSE otherwise 
    163163     */ 
    164     public static function checkDependencies(Phergie_Driver_Abstract $client, array$plugins) 
    165     { 
    166         if (self::staticPluginLoaded('ServerInfo', $client, $plugins)) { 
    167             return false; 
    168         } 
    169  
    170         if (!extension_loaded('PDO') || !extension_loaded('pdo_sqlite')) { 
    171             return false; 
    172         } 
    173  
    174         return true; 
     164    public static function checkDependencies(Phergie_Driver_Abstract $client, array $plugins) 
     165    { 
     166        $errors = array(); 
     167 
     168        if (!self::staticPluginLoaded('ServerInfo', $client, $plugins)) { 
     169            $errors[] = 'ServerInfo plugin must be enabled'; 
     170        } 
     171        if (!extension_loaded('PDO')) { 
     172            $errors[] = 'PDO php extension is required'; 
     173        } 
     174        if (!extension_loaded('pdo_sqlite')) { 
     175            $errors[] = 'pdo_sqlite php extension is required'; 
     176        } 
     177 
     178        return empty($errors) ? true : $errors; 
    175179    } 
    176180