|
|
|
@ -265,13 +265,12 @@ class plugins_api: |
|
|
|
|
valid_list_hook = ['menu'] |
|
|
|
|
if 'hook' in info: |
|
|
|
|
hooks = info['hook'] |
|
|
|
|
hooks_type = type(hooks) |
|
|
|
|
if hooks_type == list: |
|
|
|
|
for h in hooks: |
|
|
|
|
hooks_type = type(h) |
|
|
|
|
if hooks_type == dict: |
|
|
|
|
tag = h['tag'] |
|
|
|
|
if tag in valid_list_hook: |
|
|
|
|
self.hookInstallFile(tag, h[tag]) |
|
|
|
|
|
|
|
|
|
elif hooks_type == str: |
|
|
|
|
for x in hooks: |
|
|
|
|
if x in valid_hook: |
|
|
|
@ -284,9 +283,9 @@ class plugins_api: |
|
|
|
|
valid_list_hook = ['menu'] |
|
|
|
|
if 'hook' in info: |
|
|
|
|
hooks = info['hook'] |
|
|
|
|
hooks_type = type(hooks) |
|
|
|
|
if hooks_type == list: |
|
|
|
|
for h in hooks: |
|
|
|
|
hooks_type = type(h) |
|
|
|
|
if hooks_type == dict: |
|
|
|
|
tag = h['tag'] |
|
|
|
|
if tag in valid_list_hook: |
|
|
|
|
self.hookUninstallFile(tag, h[tag]) |
|
|
|
|