Assembla home | Assembla project page
 

Changeset 249

Show
Ignore:
Timestamp:
04/27/08 02:09:25 (5 months ago)
Author:
Slynderdale
Message:

Various fixes

Files:

Legend:

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

    r245 r249  
    507507        $class = $this->getName(); 
    508508        // Check to see if the current class has any admin or ops settings specified 
    509         if (!isset($this->adminList[$class]) || !isset($this->opList[$class])) { 
    510             // Handle the op settings 
    511             $ini = $this->getPluginIni('ops'); 
    512             if ($ini === null) { 
    513                 $ini = $this->getIni('admincommand.ops'); 
    514             } 
    515             $this->opList[$class] = ((strtolower($ini) === 'true' || $ini === '1')); 
    516  
    517             // Handle the admin settings 
    518             $ini = trim($this->getPluginIni('admins') . ' ' . $this->getIni('admincommand.admins')); 
    519             $this->adminList[$class] = (!empty($ini) ? $this->hostmasksToRegex($ini) : null); 
    520             unset($ini); 
    521         } 
     509        $ini = $this->getPluginIni('ops'); 
     510        if (is_null($ini)) { 
     511            $ini = $this->getIni('admincommand.ops'); 
     512        } 
     513        $this->opList[$class] = ((strtolower($ini) === 'true' || $ini === '1')); 
     514 
     515        // Handle the admin settings 
     516        $ini = trim($this->getPluginIni('admins') . ' ' . $this->getIni('admincommand.admins')); 
     517        $this->adminList[$class] = (!empty($ini) ? $this->hostmasksToRegex($ini) : null); 
     518        unset($ini); 
    522519 
    523520        // Try to match mask against admin masks 
  • trunk/Phergie/Plugin/Drink.php

    r248 r249  
    278278    private function getSearchRecord($table, $search) 
    279279    { 
    280         $search = sqlite_escape_string(str_replace(array('\\', '%'), array('\\\\', '\\%'), $search)); 
     280        $search = str_replace(array('\\', '%'), array('\\\\', '\\%'), $search); 
    281281        return $this->db->query('SELECT name FROM ' . $table . ' WHERE name LIKE \'%' . $search . '%\' ESCAPE "\\" ORDER BY RANDOM() LIMIT 1')->fetchColumn(); 
    282282    }