-
Notifications
You must be signed in to change notification settings - Fork 0
/
upd.legacy.php
executable file
·110 lines (89 loc) · 2.25 KB
/
upd.legacy.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* ExpressionEngine - by EllisLab
*
* @package ExpressionEngine
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2003 - 2011, EllisLab, Inc.
* @license http://expressionengine.com/user_guide/license.html
* @link http://expressionengine.com
* @since Version 2.0
* @filesource
*/
// ------------------------------------------------------------------------
/**
* Legacy Module Install/Update File
*
* @package ExpressionEngine
* @subpackage Addons
* @category Module
* @author Ryan Barrington Cox
* @link
*/
class Legacy_upd {
public $version = '1.0';
private $EE;
/**
* Constructor
*/
public function __construct()
{
$this->EE =& get_instance();
}
// ----------------------------------------------------------------
/**
* Installation Method
*
* @return boolean TRUE
*/
public function install()
{
$mod_data = array(
'module_name' => 'Legacy',
'module_version' => $this->version,
'has_cp_backend' => "y",
'has_publish_fields' => 'n'
);
$this->EE->db->insert('modules', $mod_data);
// $this->EE->load->dbforge();
/**
* In order to setup your custom tables, uncomment the line above, and
* start adding them below!
*/
return TRUE;
}
// ----------------------------------------------------------------
/**
* Uninstall
*
* @return boolean TRUE
*/
public function uninstall()
{
$mod_id = $this->EE->db->select('module_id')
->get_where('modules', array(
'module_name' => 'Legacy'
))->row('module_id');
$this->EE->db->where('module_id', $mod_id)
->delete('module_member_groups');
$this->EE->db->where('module_name', 'Legacy')
->delete('modules');
// $this->EE->load->dbforge();
// Delete your custom tables & any ACT rows
// you have in the actions table
return TRUE;
}
// ----------------------------------------------------------------
/**
* Module Updater
*
* @return boolean TRUE
*/
public function update($current = '')
{
// If you have updates, drop 'em in here.
return TRUE;
}
}
/* End of file upd.legacy.php */
/* Location: /system/expressionengine/third_party/legacy/upd.legacy.php */