Changeset 1486

Show
Ignore:
Timestamp:
06/07/06 06:40:57 (2 years ago)
Author:
sdcosta
Message:

Fixed a problem with arrays of escaped strings not going in / coming out
correctly in the plugins config section.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/plugins.php

    r1309 r1486  
    103103/** 
    104104 * Wrapper functions for plugins 
     105 * 
     106 * Notes: Make sure that $value and $default are not escaped strings/arrays of strings,  
     107 *        otherwise they will not come out of the database correctly because of rss_real_escape_string 
    105108 */ 
    106109function rss_plugins_add_option($key, $value, $type = "string", $default = "", $desc= "", $export = NULL) { 
     
    111114 
    112115    if (is_array($value) || $type == 'array') { 
    113         $value = str_replace("'","\'",serialize($value)); 
     116        $value = serialize($value); 
    114117    } 
    115118    $value = rss_real_escape_string($value);