Fix issue with loadPlugins after install
This commit is contained in:
parent
76b361cc4f
commit
b953c50d01
|
|
@ -56,6 +56,10 @@ def setConfig(cfg, orig_cfg):
|
||||||
config = cfg
|
config = cfg
|
||||||
originalCfg = orig_cfg
|
originalCfg = orig_cfg
|
||||||
|
|
||||||
|
def setModules(modulesList):
|
||||||
|
global modules
|
||||||
|
modules = modulesList
|
||||||
|
|
||||||
def getConfig():
|
def getConfig():
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# This file contains the functions regarding the plugin manager.
|
# This file contains the functions regarding the plugin manager.
|
||||||
|
|
||||||
import git, shutil, os, imp
|
import git, shutil, os, imp
|
||||||
import security
|
import security, api
|
||||||
import re
|
import re
|
||||||
|
|
||||||
indexes = {}
|
indexes = {}
|
||||||
|
|
@ -92,7 +92,7 @@ def indexPlugins(params={}):
|
||||||
if _check == 'summary' or _check == 'description':
|
if _check == 'summary' or _check == 'description':
|
||||||
_text = re.sub('\n', '<br>', _text)
|
_text = re.sub('\n', '<br>', _text)
|
||||||
fol[_check] = _text
|
fol[_check] = _text
|
||||||
|
|
||||||
if not i in (f['folder'] for f in indexes.itervalues()):
|
if not i in (f['folder'] for f in indexes.itervalues()):
|
||||||
indexes[len(indexes)] = fol
|
indexes[len(indexes)] = fol
|
||||||
else:
|
else:
|
||||||
|
|
@ -119,6 +119,7 @@ def indexPlugins(params={}):
|
||||||
indexes[int(params['folid'])]['status'] = 'remove'
|
indexes[int(params['folid'])]['status'] = 'remove'
|
||||||
global modules
|
global modules
|
||||||
modules = loadPlugins()
|
modules = loadPlugins()
|
||||||
|
api.setModules(modules)
|
||||||
return indexes[int(params['folid'])]['folder'] + ' installed.'
|
return indexes[int(params['folid'])]['folder'] + ' installed.'
|
||||||
else:
|
else:
|
||||||
return "This plugin is already installed."
|
return "This plugin is already installed."
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue