Skip to content

Commit

Permalink
close #619
Browse files Browse the repository at this point in the history
  • Loading branch information
jbleyel committed Jun 26, 2017
1 parent c53ca9e commit f25dd64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/controllers/ipkg.py
Expand Up @@ -18,6 +18,7 @@
import cStringIO

from base import BaseController
from Components.config import config

class IpkgController(BaseController):

Expand Down Expand Up @@ -234,8 +235,7 @@ def render_POST(self, request):
request.setHeader('charset', 'UTF-8')
content = request.args['rfile'][0]
filename = self.mbasename(request.args['filename'][0])

if not content:
if not content or not config.OpenWebif.allow_upload_ipk.value:
result = [False,_('Error upload File')]
else:
if not filename.endswith(".ipk"):
Expand Down
2 changes: 2 additions & 0 deletions plugin/plugin.py
Expand Up @@ -63,6 +63,7 @@
config.OpenWebif.no_root_access = ConfigYesNo(default=False)
config.OpenWebif.local_access_only = ConfigSelection(default=' ', choices=[' '])
config.OpenWebif.vpn_access = ConfigYesNo(default=False)
config.OpenWebif.allow_upload_ipk = ConfigYesNo(default=False)
# encoding of EPG data
config.OpenWebif.epg_encoding = ConfigSelection(default = 'utf-8', choices = [ 'utf-8',
'iso-8859-15',
Expand Down Expand Up @@ -138,6 +139,7 @@ def runSetup(self):
self.list.append(getConfigListEntry(_("Add service name to stream information"), config.OpenWebif.service_name_for_stream))
if imagedistro in ("VTi-Team Image"):
self.list.append(getConfigListEntry(_("Character encoding for EPG data"), config.OpenWebif.epg_encoding))
self.list.append(getConfigListEntry(_("Allow IPK Upload"), config.OpenWebif.allow_upload_ipk))
#FIXME Submenu
#self.list.append(getConfigListEntry(_("Webinterface jQuery UI Theme"), config.OpenWebif.webcache.theme))
#self.list.append(getConfigListEntry(_("Movie List Sort"), config.OpenWebif.webcache.moviesort))
Expand Down

0 comments on commit f25dd64

Please sign in to comment.