forked from CmsMadeSimpleTierModules/EasyList
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.admin_upgrademodule.php
43 lines (35 loc) · 1.49 KB
/
action.admin_upgrademodule.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
<?php
#-------------------------------------------------------------------------
#
# Author: Ben Malen, <[email protected]>
# Co-Maintainer: Simon Radford, <[email protected]>
# Web: www.conceptfactory.com.au
#
#-------------------------------------------------------------------------
#
# Maintainer since 2011: Jonathan Schmid, <[email protected]>
# Web: www.jonathanschmid.de
#
#-------------------------------------------------------------------------
# ListIt2 become EasyList due to the departure of the wackos in summer 2014.
#
# Jean-Christophe ghio <[email protected]>
#
#-------------------------------------------------------------------------
# EasyList is a CMS Made Simple module that enables the web developer to create
# multiple lists throughout a site. It can be duplicated and given friendly
# names for easier client maintenance.
#
#-------------------------------------------------------------------------
if (!is_object(cmsms())) exit;
if (!$this->CheckPermission($this->_GetModuleAlias() . '_modify_option')) return;
if (!isset($params['module_id']))
throw new EasyListException('Missing parameter, this should not happen!');
$GLOBALS['CMS_FORCE_MODULE_LOAD'] = 1;
$modops = cmsms()->GetModuleOperations();
$modules = $this->ListModules();
$modname = $modules[$params['module_id']]->module_name;
$modops->UpgradeModule($modname);
// all done
$this->Redirect($id, 'defaultadmin', $returnid, array('active_tab' => 'instancestab', 'message' => 'instance_moduleupgraded'));
?>