Merge pull request #1184 from nlegoff/fix-last-bugs

[3.8] Fix some bugs
This commit is contained in:
Nicolas Le Goff
2014-11-13 21:35:08 +01:00
9 changed files with 20 additions and 21 deletions

View File

@@ -92,6 +92,8 @@ class DoDownload implements ControllerProviderInterface
*/
public function prepareDownload(Application $app, Request $request, $token)
{
$datas = $app['tokens']->helloToken($token);
if (false === $list = @unserialize((string) $datas['datas'])) {
@@ -207,12 +209,12 @@ class DoDownload implements ControllerProviderInterface
$app['session']->save();
ignore_user_abort(true);
\set_export::build_zip(
$app,
$token,
$list,
sprintf($app['root.path'] . '/tmp/download/%s.zip', $datas['value']) // Dest file
);
if ($list['count'] > 1) {
\set_export::build_zip($app, $token, $list, sprintf($app['root.path'] . '/tmp/download/%s.zip', $datas['value']));
} else {
$list['complete'] = true;
$app['tokens']->updateToken($token, serialize($list));
}
return $app->json(array(
'success' => true,

View File

@@ -345,7 +345,7 @@ class Activity implements ControllerProviderInterface
'ddate' => array(_('report:: jour'), 0, 0, 0, 0),
'total' => array(_('report:: total des telechargements'), 0, 0, 0, 0),
'preview' => array(_('report:: preview'), 0, 0, 0, 0),
'document' => array(_('report:: document original'), 0, 0, 0, 0)
'document' => array(_('report:: document'), 0, 0, 0, 0)
);
$activity = new \module_report_activity(

View File

@@ -145,7 +145,7 @@ class Account implements ControllerProviderInterface
}
$date = new \DateTime('1 day');
$token = $app['tokens']->getUrlToken(\random::TYPE_EMAIL, $app['authentication']->getUser()->get_id(), $date, $app['authentication']->getUser()->get_email());
$token = $app['tokens']->getUrlToken(\random::TYPE_EMAIL, $app['authentication']->getUser()->get_id(), $date, $email);
$url = $app->url('account_reset_email', array('token' => $token));
try {

View File

@@ -67,12 +67,9 @@
<td class="colValue" >{{ data['applications'][5] }}</td>
</tr>
<tr>
{# module witj id 7 has been removed keep it for bc #}
<td class="colTitle" >{{ 'admin::monitor: module comparateur' | trans }}</td>
<td class="colValue" >{{ data['applications'][6] }}</td>
</tr>
<tr>
<td class="colTitle" >{{ 'admin::monitor: module validation' | trans }}</td>
<td class="colValue" >{{ data['applications'][7] }}</td>
<td class="colValue" >{{ data['applications'][6] + data['applications'][7] }}</td>
</tr>
{% if data['applications'][0] != 0 %}
<tr>

View File

@@ -334,9 +334,9 @@
<span>{% trans 'Trier par ' %}</span>
<select name="sort" class="input-small">
<option value="" {% if app['phraseanet.SE'].getDefaultSort() is empty %}selected="selected default-selection"{% endif %}>{{ "No sort"|trans }}</option>
<option value="" {% if app['phraseanet.SE'].getDefaultSort() is empty %}selected="selected" class="default-selection"{% endif %}>{{ "No sort"|trans }}</option>
{% for sort in search_datas['sort'] %}
<option value="{{ sort.fieldname }}" {% if sort.fieldname == app['phraseanet.SE'].getDefaultSort() %}selected="selected default-selection"{% endif %}>{{ sort.fieldname }}</option>
<option value="{{ sort.fieldname }}" {% if sort.fieldname == app['phraseanet.SE'].getDefaultSort() %}selected="selected" class="default-selection"{% endif %}>{{ sort.fieldname }}</option>
{% endfor %}
</select>
<select name="ord" class="input-medium">

View File

@@ -1308,7 +1308,7 @@ abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract
$tochange = array();
foreach ($status_bits as $n => $datas) {
$tochange[$n] = substr($record_status, ($n - 1), 1) == '0' ? '1' : '0';
$tochange[$n] = substr($record_status, ($n), 1) == '0' ? '1' : '0';
}
$this->evaluateMethodNotAllowedRoute($route, array('GET', 'PUT', 'DELETE'));
@@ -2709,7 +2709,7 @@ abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract
$this->assertTrue(is_int($status['bit']));
$this->assertTrue(is_bool($status['state']));
$retrieved = !!substr($r_status, ($status['bit'] - 1), 1);
$retrieved = !!substr($r_status, ($status['bit']), 1);
$this->assertEquals($retrieved, $status['state']);
}

View File

@@ -76,7 +76,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
public function testGet_version()
{
$this->assertEquals('1.3', $this->object->get_version());
$this->assertEquals('1.4.1', $this->object->get_version());
}
public function testGet_databoxes()

View File

@@ -823,7 +823,7 @@ body .ui-tooltip {
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
border: 1px solid #202020;
background: #313131 url(images/ui-bg_flat_75_313131_40x100.png) 50% 50% repeat-x;
background: #313131 url(images/ui-bg_flat_75_d2d1cf_40x100.png) 50% 50% repeat-x;
font-weight: bold;
color: #ffffff;
}
@@ -855,7 +855,7 @@ body .ui-tooltip {
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {
border: 1px solid #202020;
background: #555555 url(images/ui-bg_flat_65_555555_40x100.png) 50% 50% repeat-x;
background: #555555 url(images/ui-bg_flat_75_d2d1cf_40x100.png) 50% 50% repeat-x;
font-weight: bold;
color: #ff9000;
}

View File

@@ -1638,7 +1638,7 @@ function GUI(varname, idbody, skin) {
node.style.left = "50px";
node.style.zIndex = 99;
node.style.visibility = "hidden";
node.src = "cursors/nodrop01.gif";
node.src = "/skins/icons/nodrop01.gif";
dragObj.objCursor = desk.appendChild(node);
desk.onmousemove = function (e) {