Changeset 28842 for extensions/gvideo


Ignore:
Timestamp:
Jun 29, 2014, 4:22:26 PM (10 years ago)
Author:
mistic100
Message:

use new maintain class

Location:
extensions/gvideo
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/gvideo/admin/config.php

    r26470 r28842  
    2727    );
    2828 
    29   conf_update_param('gvideo', serialize($conf['gvideo']));
     29  conf_update_param('gvideo', $conf['gvideo']);
    3030  $page['infos'][] = l10n('Information data registered in database');
    3131}
  • extensions/gvideo/main.inc.php

    r28301 r28842  
    1111defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
    1212
    13 global $prefixeTable;
     13global $prefixeTable, $conf;
    1414
    1515define('GVIDEO_ID',      basename(dirname(__FILE__)));
     
    1717define('GVIDEO_ADMIN',   get_root_url() . 'admin.php?page=plugin-' . GVIDEO_ID);
    1818define('GVIDEO_TABLE',   $prefixeTable.'image_video');
    19 define('GVIDEO_VERSION', 'auto');
     19
     20include_once(GVIDEO_PATH . 'include/events.inc.php');
    2021
    2122
    22 add_event_handler('init', 'gvideo_init');
     23$conf['gvideo'] = safe_unserialize($conf['gvideo']);
     24
     25
    2326add_event_handler('picture_pictures_data', 'gvideo_prepare_picture');
     27
     28add_event_handler('delete_elements', 'gvideo_delete_elements');
    2429
    2530if (defined('IN_ADMIN'))
     
    3237}
    3338
    34 add_event_handler('delete_elements', 'gvideo_delete_elements');
    35 
    36 include_once(GVIDEO_PATH . 'include/events.inc.php');
    37 
    38 
    39 /**
    40  * init
    41  */
    42 function gvideo_init()
    43 {
    44   global $conf;
    45  
    46   include_once(GVIDEO_PATH . 'maintain.inc.php');
    47   $maintain = new gvideo_maintain(GVIDEO_ID);
    48   $maintain->autoUpdate(GVIDEO_VERSION, 'install');
    49  
    50   $conf['gvideo'] = unserialize($conf['gvideo']);
    51 }
    5239
    5340/**
Note: See TracChangeset for help on using the changeset viewer.