diff --git a/lib/Alchemy/Phrasea/Helper/User/Edit.php b/lib/Alchemy/Phrasea/Helper/User/Edit.php
index 264949f2ef..f2a7a4301e 100644
--- a/lib/Alchemy/Phrasea/Helper/User/Edit.php
+++ b/lib/Alchemy/Phrasea/Helper/User/Edit.php
@@ -65,6 +65,9 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper
public function delete_users()
{
foreach ($this->users as $usr_id) {
+ if ($this->app['authentication']->getUser()->get_id() === (int) $usr_id) {
+ continue;
+ }
$user = \User_Adapter::getInstance($usr_id, $this->app);
$this->delete_user($user);
}
diff --git a/lib/classes/module/console/checkExtension.php b/lib/classes/module/console/checkExtension.php
index 221fda15af..74ae8bbaf5 100644
--- a/lib/classes/module/console/checkExtension.php
+++ b/lib/classes/module/console/checkExtension.php
@@ -202,6 +202,36 @@ class module_console_checkExtension extends Command
return 1;
}
+
+ // test disconnected mode if available
+ // prepare the test before closing session
+ if(function_exists("phrasea_public_query"))
+ {
+ // fill an array for each sbas to query
+ $tbases = array();
+ foreach ($phSession["bases"] as $phbase) {
+ // fill an array of collections to query for this sbas
+ $tcoll = array();
+ foreach ($phbase["collections"] as $coll) {
+ $tcoll[] = 0 + $coll["base_id"];
+ }
+
+ if (sizeof($tcoll) > 0) {
+ // parse the query for this sbas
+ $qp = new PhraseaEngineQueryParser($this->container);
+ $treeq = $qp->parsequery($input->getOption('query'));
+ $arrayq = $qp->makequery($treeq);
+
+ $tbases["S".$phbase["sbas_id"]] = array( // key does no matter
+ "sbas_id" => $phbase["sbas_id"], // sbas_id
+ "searchcoll" => $tcoll, // colls to query
+ "arrayq" => $arrayq // parsed query
+ );
+ }
+ }
+ }
+
+
$output->writeln("\n-- phrasea_close_session --");
$rs = phrasea_close_session($sessid);
@@ -214,6 +244,70 @@ class module_console_checkExtension extends Command
return 1;
}
+
+
+ // session is closed, test disconnected mode if available
+ if(function_exists("phrasea_public_query"))
+ {
+ $output->writeln("\n-- phrasea_public_query(...0, 5,...) --");
+
+ $ret = phrasea_public_query(
+ $tbases // array of sbas with colls and query
+ , PHRASEA_MULTIDOC_DOCONLY // mode
+ , '' // sortfield
+ , array() // search business fields
+ , '' // lng for stemmed search
+ , 0 // offset for first answer (start=0)
+ , 5 // nbr of answers
+ , true // verbose output (chrono, sql...)
+ );
+
+ if(is_array($ret) && array_key_exists("results", $ret) && is_array($ret["results"])) {
+ $output->writeln( sprintf("