mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 11:33:17 +00:00
Fix unit tests
This commit is contained in:
@@ -495,7 +495,9 @@ class Collection implements ControllerProviderInterface
|
||||
$collection->empty_collection(500);
|
||||
$msg = _('Collection empty successful');
|
||||
} else {
|
||||
$settings = '<?xml version="1.0" encoding="UTF-8"?><tasksettings><bas_id>' . $collection->get_base_id() . '</bas_id></tasksettings>';
|
||||
$settings = \task_period_emptyColl::getDefaultSettings($app['phraseanet.configuration'], array(
|
||||
'bas_id' => $collection->get_base_id()
|
||||
));
|
||||
\task_period_emptyColl::create($app, $settings);
|
||||
$msg = _('A task has been creted, please run it to complete empty collection');
|
||||
}
|
||||
|
@@ -9,6 +9,8 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Alchemy\Phrasea\Core\Configuration\Configuration;
|
||||
|
||||
class task_period_emptyColl extends task_appboxAbstract
|
||||
{
|
||||
protected $base_id;
|
||||
@@ -30,13 +32,13 @@ class task_period_emptyColl extends task_appboxAbstract
|
||||
return("Vide une collection");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
*
|
||||
* @param array $params
|
||||
*/
|
||||
public static function getDefaultSettings(Configuration $config, array $params = array())
|
||||
{
|
||||
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<tasksettings>\n</tasksettings>";
|
||||
return '<?xml version="1.0" encoding="UTF-8"?><tasksettings><bas_id>' . (isset($params['bas_id']) ? $params['bas_id'] : '' ) . '</bas_id></tasksettings>';
|
||||
}
|
||||
|
||||
protected function loadSettings(SimpleXMLElement $sx_task_settings)
|
||||
|
Reference in New Issue
Block a user