Merge 3.6 fixes

This commit is contained in:
Romain Neutron
2012-03-30 14:52:43 +02:00
3 changed files with 636 additions and 637 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -262,7 +262,7 @@ $this->log(sprintf("task %d <- %s", $this->get_task_id(), $status));
return $this->completed_percentage; return $this->completed_percentage;
} }
protected $period = 60; protected $period = 10;
protected $taskid = NULL; protected $taskid = NULL;
protected $system = ''; // "DARWIN", "WINDOWS" , "LINUX"... protected $system = ''; // "DARWIN", "WINDOWS" , "LINUX"...
protected $argt = array( protected $argt = array(
@@ -611,19 +611,10 @@ $this->log(sprintf("task %d <- %s", $this->get_task_id(), $status));
protected function load_settings(SimpleXMLElement $sx_task_settings) protected function load_settings(SimpleXMLElement $sx_task_settings)
{ {
$this->period = (int) $sx_task_settings->period; $this->period = max(10, min(3600, (int) $sx_task_settings->period));
if($this->period <= 0 || $this->period >= 60 * 60) $this->maxrecs = max(10, min(1000, (int) $sx_task_settings->maxrecs));
$this->period = 60; $this->maxmegs = max(16, min(512, (int) $sx_task_settings->maxmegs));
$this->record_buffer_size = max(1, min(100, (int) $sx_task_settings->flush));
$this->maxrecs = (int) $sx_task_settings->maxrecs;
if($sx_task_settings->maxrecs < 10 || $sx_task_settings->maxrecs > 1000)
$this->maxrecs = 100;
$this->maxmegs = (int) $sx_task_settings->maxmegs;
if($sx_task_settings->maxmegs < 16 || $sx_task_settings->maxmegs > 512)
$this->maxmegs = 24;
$this->record_buffer_size = (int) $sx_task_settings->flush;
if($sx_task_settings->flush < 1 || $sx_task_settings->flush > 100)
$this->record_buffer_size = 10;
return $this; return $this;
} }

View File

@@ -86,9 +86,11 @@
<div id="find-user"> <div id="find-user">
<input class="search" name="users-search" placeholder="{% trans 'Users' %}" type="text" style="width:210px;"/> <input class="search" name="users-search" placeholder="{% trans 'Users' %}" type="text" style="width:210px;"/>
<br/> <br/>
{% trans 'Select a user in the list'%}, <br/> {% trans 'Select a user in the list'%} <br/>
{% trans 'or' %} {% if user.ACL().has_right('manageusers') %}
<a href="/prod/push/add-user/" class="user_adder link">{% trans 'Add user' %}</a> {% trans 'or' %}
<a href="/prod/push/add-user/" class="user_adder link">{% trans 'Add user' %}</a>
{% endif %}
</div> </div>
<p id="recommanded-users"> <p id="recommanded-users">