diff --git a/lib/classes/task/period/cindexer.php b/lib/classes/task/period/cindexer.php index 90dd790688..a0650153dd 100644 --- a/lib/classes/task/period/cindexer.php +++ b/lib/classes/task/period/cindexer.php @@ -63,12 +63,6 @@ class task_period_cindexer extends task_abstract */ protected $socket; - /** - * - * @var string - */ - protected $use_sbas; - /** * * @var string @@ -111,7 +105,7 @@ class task_period_cindexer extends task_abstract */ public function getName() { - return(_("task::cindexer:Indexation")); + return(_("Indexation task")); } /** @@ -120,7 +114,7 @@ class task_period_cindexer extends task_abstract */ public function help() { - return(_("task::cindexer:indexing records")); + return(_("This task is used to index records for Phrasea engine.")); } /** @@ -133,13 +127,13 @@ class task_period_cindexer extends task_abstract $request = http_request::getInstance(); $parm2 = $request->get_parms( - 'host', 'port', 'base', 'user', 'password', 'socket', 'use_sbas', 'nolog', 'clng', 'winsvc_run', 'charset', 'debugmask', 'stem', 'sortempty' + 'host', 'port', 'base', 'user', 'password', 'socket', 'nolog', 'clng', 'winsvc_run', 'charset', 'debugmask', 'stem', 'sortempty' ); $dom = new DOMDocument(); $dom->formatOutput = true; if ($dom->loadXML($oldxml)) { $xmlchanged = false; - foreach (array("str:host", "str:port", "str:base", "str:user", "str:password", "str:socket", "boo:use_sbas", "boo:nolog", "str:clng", "boo:winsvc_run", "str:charset", 'str:debugmask', 'str:stem', 'str:sortempty') as $pname) { + foreach (array("str:host", "str:port", "str:base", "str:user", "str:password", "str:socket", "boo:nolog", "str:clng", "boo:winsvc_run", "str:charset", 'str:debugmask', 'str:stem', 'str:sortempty') as $pname) { $ptype = substr($pname, 0, 3); $pname = substr($pname, 4); $pvalue = $parm2[$pname]; @@ -199,7 +193,6 @@ class task_period_cindexer extends task_abstract socket.value = xml.find("socket").text(); password.value = xml.find("password").text(); clng.value = xml.find("clng").text(); - use_sbas.checked = true | isyes(xml.find("use_sbas").text()); nolog.checked = isyes(xml.find("nolog").text()); winsvc_run.checked = isyes(xml.find("winsvc_run").text()); charset.value = xml.find("charset").text(); @@ -212,8 +205,6 @@ class task_period_cindexer extends task_abstract var cmd = ''; with(document.forms['graphicForm']) { - use_sbas.checked = true; - cmd += "getIndexer() ?>"; if(host.value) cmd += " -h=" + host.value; @@ -270,95 +261,81 @@ class task_period_cindexer extends task_abstract ?>
- +
- +
- +
- +
- +
- +
- +
- +
-
- -
-
-
- +
- +
- +
- +
- -
@@ -366,9 +343,9 @@ class task_period_cindexer extends task_abstract
- +
@@ -394,7 +371,6 @@ class task_period_cindexer extends task_abstract $this->user = trim($sx_task_settings->user); $this->password = trim($sx_task_settings->password); $this->socket = trim($sx_task_settings->socket); - $this->use_sbas = p4field::isyes(trim($sx_task_settings->use_sbas)); $this->charset = trim($sx_task_settings->charset); $this->stem = trim($sx_task_settings->stem); $this->sortempty = trim($sx_task_settings->sortempty); @@ -436,7 +412,7 @@ class task_period_cindexer extends task_abstract if ( ! file_exists($cmd) || ! is_executable($cmd)) { $this->setState(self::STATE_STOPPED); - $this->log(sprintf(_('task::cindexer:file \'%s\' does not exists'), $cmd)); + $this->log(sprintf('File \'%s\' does not exists', $cmd)); throw new Exception('cindexer executable not found', self::ERR_EXECUTABLE_NOT_FOUND); return; @@ -577,13 +553,13 @@ class task_period_cindexer extends task_abstract if (! $proc_status['running']) { // the cindexer died if ($qsent == 'Q') { - $this->log(_('task::cindexer:the cindexer clean-quit')); + $this->log('Phrasea indexer stopped'); $this->new_status = self::STATE_STOPPED; } elseif ($qsent == 'K') { - $this->log(_('task::cindexer:the cindexer has been killed')); + $this->log('Phrasea indexer has been killed'); $this->new_status = self::STATE_STOPPED; } else { - $this->log(_('task::cindexer:the cindexer crashed')); + $this->log('Phrasea indexer crashed'); $this->exception = new Exception('cindexer crashed', self::ERR_CRASHED); // do not change the status so scheduler may restart it } @@ -593,7 +569,7 @@ class task_period_cindexer extends task_abstract if ($qsent == 'Q') { if (time() > $timetokill) { // must kill cindexer - $this->log(_('task::cindexer:killing the cindexer')); + $this->log('Sending kill signal to Phrasea indexer'); $qsent = 'K'; proc_terminate($process); // sigint } @@ -645,7 +621,7 @@ class task_period_cindexer extends task_abstract // dead... if ($sigsent === NULL) { // but it's not my fault - $this->log(_('task::cindexer:the cindexer crashed')); + $this->log('Phrasea indexer crashed'); $this->exception = new Exception('cindexer crashed', self::ERR_CRASHED); // do not change the status so scheduler may restart it break; @@ -662,13 +638,13 @@ class task_period_cindexer extends task_abstract if (pcntl_wait($status, WNOHANG) == $pid) { // child (indexer) has exited if ($sigsent == SIGINT) { - $this->log(_('task::cindexer:the cindexer clean-quit')); + $this->log('Phrasea indexer stopped'); $this->new_status = self::STATE_STOPPED; } elseif ($sigsent == SIGKILL) { - $this->log(_('task::cindexer:the cindexer has been killed')); + $this->log('Phrasea indexer has been killed'); $this->new_status = self::STATE_STOPPED; } else { - $this->log(_('task::cindexer:the cindexer crashed')); + $this->log('Phrasea indexer crashed'); $this->exception = new Exception('cindexer crashed', self::ERR_CRASHED); // do not change the status so scheduler may restart it } @@ -676,7 +652,7 @@ class task_period_cindexer extends task_abstract } else { if ($sigsent == SIGINT && time() > $timetokill) { // must kill cindexer - $this->log(_('task::cindexer:killing the cindexer')); + $this->log('Kill signal sent to Phrasea indexer'); posix_kill($pid, ($sigsent = SIGKILL)); } sleep(2);