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

View File

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