Ignore:
Timestamp:
Nov 9, 2013, 12:33:50 AM (10 years ago)
Author:
mistic100
Message:

apply new design pattern for maintain.inc.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/skeleton/trunk/main.inc.php

    r24182 r25407  
    2323// | Define plugin constants                                               |
    2424// +-----------------------------------------------------------------------+
    25 defined('SKELETON_ID') or define('SKELETON_ID', basename(dirname(__FILE__)));
     25define('SKELETON_ID',      basename(dirname(__FILE__)));
    2626define('SKELETON_PATH' ,   PHPWG_PLUGINS_PATH . SKELETON_ID . '/');
    2727define('SKELETON_TABLE',   $prefixeTable . 'skeleton');
     
    106106
    107107
    108 
    109108/**
    110109 * plugin initialization
     
    115114function skeleton_init()
    116115{
    117   global $conf, $pwg_loaded_plugins;
     116  global $conf;
    118117 
    119118  // apply upgrade if needed
    120   include_once(SKELETON_PATH . 'include/install.inc.php');
    121   request_plugin_update(SKELETON_ID, SKELETON_VERSION, 'skeleton_install');
     119  include_once(SKELETON_PATH . 'maintain.inc.php');
     120  $maintain = new skeleton_maintain(SKELETON_ID);
     121  $maintain->autoUpdate(SKELETON_VERSION, 'install');
    122122 
    123123  // load plugin language file
Note: See TracChangeset for help on using the changeset viewer.