Browse files

Merge branch 'master' of github.com:cherokee/webserver

  • Loading branch information...
2 parents 1a0e4ba + a02ced1 commit 67367f2c05e78d3167ac7b32b92df4481888fa6e @skinkie skinkie committed Aug 9, 2013
Showing with 25 additions and 33 deletions.
  1. +1 −26 admin/PageSource.py
  2. +11 −6 admin/wizards/hotlinking.py
  3. +1 −0 admin/wizards/php.py
  4. +10 −0 contrib/cherokee.pre
  5. +2 −1 developers.py
View
27 admin/PageSource.py
@@ -26,9 +26,7 @@
import re
import CTK
import Page
-import Cherokee
import SelectionPanel
-import validations
import Rule
from util import *
@@ -63,14 +61,6 @@
NOTE_ADD_VALUE = N_('Value of the environment variable')
NOTE_CLONE_DIALOG = N_('The selected Information Source is about to be cloned.')
-VALIDATIONS = [
- ('source!.+?!timeout', validations.is_positive_int),
- ('tmp!new_host', validations.is_safe_information_source_host),
- ('tmp!new_nick', validations.is_safe_information_source_nick),
- ("source_clone_trg", validations.is_safe_id),
- ("source!.+?!interpreter", validations.is_not_empty),
-]
-
HELPS = [('config_info_sources', N_("Information Sources"))]
@@ -126,21 +116,6 @@ def commit():
CTK.cfg['%s!%s'%(source_pre,new_variable)] = new_value
return CTK.cfg_reply_ajax_ok()
- # Modification
- errors = {}
- for key in CTK.post.keys():
- try:
- value = CTK.post.get_val (key)
- if key.endswith('!nick'):
- validations.is_safe_information_source_nick (value, key)
- elif key.endswith('!host'):
- validations.is_safe_information_source_host (value, key)
- except ValueError, e:
- errors[key] = str(e)
-
- if errors:
- return { "ret": "error", "errors": errors }
-
return CTK.cfg_apply_post()
@@ -506,4 +481,4 @@ def __call__ (self):
CTK.publish ('^%s/content/[\d]+$'%(URL_BASE), Render_Source)
CTK.publish ('^%s/content/empty$'%(URL_BASE), Render_Source)
CTK.publish ('^%s/content/[\d]+/clone$'%(URL_BASE), commit_clone)
-CTK.publish ('^%s' %(URL_APPLY), commit, validation=VALIDATIONS, method="POST")
+CTK.publish ('^%s' %(URL_APPLY), commit, method="POST")
View
17 admin/wizards/hotlinking.py
@@ -156,6 +156,9 @@ def __init__ (self):
self += submit
def __call__ (self):
+ cont = CTK.Container()
+ cont += CTK.RawHTML ('<h2>%s</h2>' %(_(NOTE_RULE_H1)))
+
vsrv_num = CTK.cfg.get_val("%s!vsrv_num"%(PREFIX))
nick = CTK.cfg.get_val("vserver!%s!nick"%(vsrv_num))
if not '.' in nick:
@@ -171,15 +174,17 @@ def __call__ (self):
table.Add (_('Domain Name'), CTK.TextCfg ('%s!domain'%(PREFIX), False, {'value': nick}), _(NOTE_DOMAIN))
table.Add (_('Reply type'), combo_widget, _(NOTE_TYPE))
- submit = CTK.Submitter (URL_APPLY)
- submit += CTK.Hidden('final', '1')
+ submit = CTK.Submitter (URL_APPLY_REFRESH)
submit += table
+ submit += refresh
+ cont += submit
- cont = CTK.Container()
- cont += CTK.RawHTML ('<h2>%s</h2>' %(_(NOTE_RULE_H1)))
+ # Global Submit
+ submit = CTK.Submitter (URL_APPLY)
+ submit += CTK.Hidden('final', '1')
cont += submit
- cont += refresh
- cont += CTK.DruidButtonsPanel_PrevCreate_Auto()
+
+ cont += CTK.DruidButtonsPanel_PrevCreate_Auto()
return cont.Render().toStr()
View
1 admin/wizards/php.py
@@ -29,6 +29,7 @@
import Wizard
import validations
import popen
+import SystemInfo
from util import *
View
10 contrib/cherokee.pre
@@ -6,6 +6,16 @@
# http://www.cherokee-project.com/
#
+### BEGIN INIT INFO
+# Provides: cherokee
+# Required-Start: $all
+# Required-Stop: $all
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start Cherokee.
+# Description: Start the Cherokee Web Server as a daemon.
+### END INIT INFO
+
NAME=cherokee
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/lib/cherokee
DAEMON=%sbindir%/cherokee
View
3 developers.py
@@ -13,5 +13,6 @@
'sberlotto' : "Sérgio H. Berlotto Jr <sergio.berlotto@gmail.com>",
'pigmej' : "Jędrzej Nowak <me@pigmej.eu>",
'rodrigo' : "Rodrigo Fernandez-Vizarra <rfvizarra@gmail.com>",
- 'pubcrawler' : "Paul Batis <pubcrawler.com@gmail.com>"
+ 'pubcrawler' : "Paul Batis <pubcrawler.com@gmail.com>",
+ 'borkason' : "Daniel Niccoli <daniel.niccoli@gmail.com>"
}

0 comments on commit 67367f2

Please sign in to comment.