Assembla home | Assembla project page
 

Changeset 128

Show
Ignore:
Timestamp:
03/05/08 20:42:40 (9 months ago)
Author:
Seldaek
Message:

* Set: fixed append that broke in some cases

Files:

Legend:

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

    r118 r128  
    3030        // Replace var/value 
    3131        if (preg_match('#^\s*('.str_replace('.', '\\.', $var).'\s*=\s*)(.*)$#im', $contents, $m)) { 
    32                 $contents = str_replace($m[2], $this->makeIniValue($value, $m[2], $append), $contents); 
     32                $contents = preg_replace('#^\s*'.str_replace('.', '\\.', $var).'\s*=.*$#im', $var.' = '.$this->makeIniValue($value, $m[2], $append), $contents); 
    3333                $this->setIni($var, $this->parseIniValue($this->makeIniValue($value, $m[2], $append))); 
    3434                // Insert it if not set