Fix tests

This commit is contained in:
Romain Neutron
2012-11-12 19:29:48 +01:00
parent 403a5e0cac
commit c4936399c6
3 changed files with 10 additions and 6 deletions

View File

@@ -98,7 +98,7 @@ class Users implements ControllerProviderInterface
$rights = new UserHelper\Edit($app, $app['request']);
$rights->apply_quotas();
return;
return $app->json(array('message' => '', 'error' => false));
});
$controllers->post('/rights/time/', function(Application $app) {
@@ -111,7 +111,7 @@ class Users implements ControllerProviderInterface
$rights = new UserHelper\Edit($app, $app['request']);
$rights->apply_time();
return;
return $app->json(array('message' => '', 'error' => false));
});
$controllers->post('/rights/masks/', function(Application $app) {
@@ -124,7 +124,7 @@ class Users implements ControllerProviderInterface
$rights = new UserHelper\Edit($app, $app['request']);
$rights->apply_masks();
return;
return $app->json(array('message' => '', 'error' => false));
});
$controllers->match('/search/', function(Application $app) {

View File

@@ -302,7 +302,7 @@ class Edit implements ControllerProviderInterface
}
if (!is_array($request->request->get('mds'))) {
return;
return $app->json(array('message' => '', 'error' => false));
}
$databoxes = $records->databoxes();

View File

@@ -965,10 +965,14 @@ class databox extends base
$thesaurus = $this->get_thesaurus();
if ($thesaurus && ($tmp = DomDocument::loadXML($thesaurus)) !== false)
$dom = new DOMDocument();
if ($thesaurus && false !== $tmp = $dom->loadXML($thesaurus)) {
self::$_dom_thesaurus[$sbas_id] = $tmp;
else
} else {
self::$_dom_thesaurus[$sbas_id] = false;
unset($dom);
}
return self::$_dom_thesaurus[$sbas_id];
}