Assembla home | Assembla project page
 

Changeset 222

Show
Ignore:
Timestamp:
04/08/08 18:45:49 (8 months ago)
Author:
Slynderdale
Message:

Minor tweak to Set.php to return whether a setting was inserted or updated

Files:

Legend:

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

    r220 r222  
    3535                $contents = preg_replace('#^' . str_replace('.', '\\.', $var) . '\s*=.*$#im', $var . ' = ' . str_replace('$', '\\$', $this->makeIniValue($value, $m[2], $append)), $contents); 
    3636                $this->setIni($var, $this->parseIniValue($this->makeIniValue($value, $m[2], $append))); 
     37                $this->doNotice($user, 'Updated Setting: ' . $var . ' = ' . $this->getIni($var)); 
    3738            // Insert it if not set 
    3839            } else { 
    3940                $contents .= PHP_EOL . $var . ' = ' . $this->makeIniValue($value); 
    4041                $this->setIni($var, $this->parseIniValue($value)); 
     42                $this->doNotice($user, 'Inserted Setting: ' . $var . ' = ' . $this->getIni($var)); 
    4143            } 
    42             $this->doNotice($user, 'Updated Setting: ' . $var . ' = ' . $this->getIni($var)); 
    4344            // Save ini file 
    4445            file_put_contents(PHERGIE_INI_PATH, $contents);