Changeset 1372

Show
Ignore:
Timestamp:
2009년 01월 09일 21시 19분 18초 (20 months ago)
Author:
ditto
Message:

#186: installed_version 필드 추가 전에 플러그인 업데이트 실행하지 않도록 함

Location:
trunk/metabbs
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/metabbs/app/models/plugin.php

    r1371 r1372  
    77        var $description = ''; 
    88        var $plugin_name; 
    9         var $installed_version = 0; 
     9        //var $installed_version = 0; 
    1010        var $version = 0; 
    1111 
     
    4646        function on_uninstall() { } 
    4747        function on_update() { 
    48                 // 업데이트 성공하면 true, 실패하면 false 
    49                 return true; 
     48                $this->update_to($this->version); 
    5049        } 
    5150} 
  • trunk/metabbs/core/plugin.php

    r1371 r1372  
    1414        if ($plugin->enabled) { 
    1515                $plugin->on_init(); 
    16                 if ($plugin->version > $plugin->installed_version) 
     16                if (isset($plugin->installed_version) && 
     17                                $plugin->version > $plugin->installed_version) 
    1718                        $plugin->on_update(); 
    1819        }