*/
- var $lng = null;
+ public $lng = null;
protected $unicode;
- function __construct($lng = "???")
+ public function __construct($lng = "???")
{
$this->lng = $lng;
$this->unicode = new unicode();
@@ -97,17 +97,17 @@ class searchEngine_adapter_phrasea_queryParser
return $this;
}
- function mb_trim($s, $encoding)
+ public function mb_trim($s, $encoding)
{
return(trim($s));
}
- function mb_ltrim($s, $encoding)
+ public function mb_ltrim($s, $encoding)
{
return(ltrim($s));
}
- function parsequery($phq)
+ public function parsequery($phq)
{
if ($this->debug) {
for ($i = 0; $i < mb_strlen($phq, 'UTF-8'); $i ++ ) {
@@ -132,7 +132,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function astext($tree)
+ public function astext($tree)
{
switch ($tree["CLASS"]) {
case "SIMPLE":
@@ -171,7 +171,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function astable(&$tree)
+ public function astable(&$tree)
{
$this->calc_complexity($tree);
$txt = "";
@@ -181,7 +181,7 @@ class searchEngine_adapter_phrasea_queryParser
return($txt);
}
- function calc_complexity(&$tree)
+ public function calc_complexity(&$tree)
{
if ($tree) {
if ($tree["CLASS"] == "OPS" || $tree["CLASS"] == "OPK") {
@@ -192,7 +192,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function astable2(&$out, &$tree, $depth = 0)
+ public function astable2(&$out, &$tree, $depth = 0)
{
switch ($tree["CLASS"]) {
case "SIMPLE":
@@ -231,14 +231,14 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function dumpDiv(&$tree)
+ public function dumpDiv(&$tree)
{
print("\n");
$this->dumpDiv2($tree);
print("
\n");
}
- function dumpDiv2(&$tree, $depth = 0)
+ public function dumpDiv2(&$tree, $depth = 0)
{
switch ($tree["CLASS"]) {
case "SIMPLE":
@@ -289,7 +289,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function dump($tree)
+ public function dump($tree)
{
switch ($tree["CLASS"]) {
case "SIMPLE":
@@ -345,7 +345,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function priority_opk(&$tree, $depth = 0)
+ public function priority_opk(&$tree, $depth = 0)
{
if ( ! $tree) {
return;
@@ -365,7 +365,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function distrib_opk(&$tree, $depth = 0)
+ public function distrib_opk(&$tree, $depth = 0)
{
if ( ! $tree) {
return;
@@ -392,7 +392,7 @@ class searchEngine_adapter_phrasea_queryParser
$this->distrib_opk($tree["RB"], $depth + 1);
}
- function thesaurus2_apply(&$tree, $bid)
+ public function thesaurus2_apply(&$tree, $bid)
{
if ( ! $tree) {
return;
@@ -406,14 +406,11 @@ class searchEngine_adapter_phrasea_queryParser
}
if (count($tids) >= 1) {
/*
- if(count($tids)==1)
- {
+ if (count($tids)==1) {
// on cherche un id simple, on utilisera la syntaxe sql 'like' (l'extension repérera elle méme la syntaxe car la value finit par '%')
$val = str_replace(".", "d", $tids[0]) . "d%";
$tree["VALUE"] = array($val);
- }
- else
- {
+ } else {
// on cherche plusieurs id's, on utilisera la syntaxe 'regexp' (l'extension repérera elle méme la syntaxe car la value finit par '$'
$val = "";
foreach($tids as $tid)
@@ -442,7 +439,7 @@ class searchEngine_adapter_phrasea_queryParser
// thesaurus only : ==> ((th:a) et (th:b))
// ft et thesaurus : ==> ((a ou (th:a)) et (b ou (th:b)))
// RETOURNE l'arbre résultat sans modifier l'arbre d'origine
- function extendThesaurusOnTerms(&$tree, $useFullText, $useThesaurus, $keepfuzzy)
+ public function extendThesaurusOnTerms(&$tree, $useFullText, $useThesaurus, $keepfuzzy)
{
$copy = $tree;
$this->_extendThesaurusOnTerms($tree, $copy, $useFullText, $useThesaurus, $keepfuzzy, 0, "");
@@ -452,7 +449,7 @@ class searchEngine_adapter_phrasea_queryParser
return($copy);
}
- function _extendThesaurusOnTerms(&$tree, &$copy, $useFullText, $useThesaurus, $keepfuzzy, $depth, $path)
+ public function _extendThesaurusOnTerms(&$tree, &$copy, $useFullText, $useThesaurus, $keepfuzzy, $depth, $path)
{
if ($depth == 0)
$ret = $tree;
@@ -465,8 +462,7 @@ class searchEngine_adapter_phrasea_queryParser
$copy = $this->_extendToThesaurus_Simple($tree, false, $keepfuzzy, $path);
else
$copy = $this->_extendToThesaurus_Simple($tree, $useFullText, $keepfuzzy, $path);
- }
- else {
+ } else {
if ($tree["CLASS"] == "OPK" && $tree["NODETYPE"] == PHRASEA_OP_COLON) {
// on a 'field:value' , on traite 'value'
$tree["RB"]["PATH"] = $copy["RB"]["PATH"] = $path . "R";
@@ -477,8 +473,7 @@ class searchEngine_adapter_phrasea_queryParser
$copy["CONTEXT"] = $tree["CONTEXT"] = "*";
$copy["RB"]["SREF"] = &$tree["RB"];
- }
- else {
+ } else {
$recursL = $recursR = false;
if ($tree["CLASS"] == "OPS" && ($tree["NODETYPE"] == PHRASEA_OP_AND || $tree["NODETYPE"] == PHRASEA_OP_OR || $tree["NODETYPE"] == PHRASEA_OP_EXCEPT)) {
// on a une branche à gauche de 'ET', 'OU', 'SAUF'
@@ -499,7 +494,7 @@ class searchEngine_adapter_phrasea_queryParser
// étend (ou remplace) un terme cherché en 'full-text' à une recherche thesaurus (champ non spécifié, tout le thésaurus = '*')
// le contexte éventuel est rapporté à l'opérateur ':'
// ex : a[k] ==> (a ou (TH :[k] a))
- function _extendToThesaurus_Simple(&$simple, $keepFullText, $keepfuzzy, $path)
+ public function _extendToThesaurus_Simple(&$simple, $keepFullText, $keepfuzzy, $path)
{
$simple["PATH"] = $path;
$context = null;
@@ -543,8 +538,7 @@ class searchEngine_adapter_phrasea_queryParser
// note une référence vers le terme d'origine
$tmp["RB"]["RB"]["SREF"] = &$simple;
$tmp["RB"]["RB"]["PATH"] = $path;
- }
- else {
+ } else {
// on remplace le ft par du th
$tmp = array("CLASS" => "OPK",
"NODETYPE" => PHRASEA_OP_COLON,
@@ -575,7 +569,7 @@ class searchEngine_adapter_phrasea_queryParser
return($tmp);
}
- function thesaurus2(&$tree, $bid, $name, &$domthe, $searchsynonyms = true, $depth = 0)
+ public function thesaurus2(&$tree, $bid, $name, &$domthe, $searchsynonyms = true, $depth = 0)
{
if ($this->debug)
print("thesaurus2:\n\$tree=" . var_export($tree, true) . "\n");
@@ -599,7 +593,7 @@ class searchEngine_adapter_phrasea_queryParser
return($ambigus);
}
- function propAsHTML(&$node, &$html, $path, $depth = 0)
+ public function propAsHTML(&$node, &$html, $path, $depth = 0)
{
global $parm;
if ($depth > 0) {
@@ -675,7 +669,7 @@ class searchEngine_adapter_phrasea_queryParser
$html .= $tab . "\n";
}
- function _queryAsHTML($tree, $depth = 0)
+ public function _queryAsHTML($tree, $depth = 0)
{
if ($depth == 0) {
$ambiguites = array("n" => 0, "refs" => array());
@@ -689,8 +683,7 @@ class searchEngine_adapter_phrasea_queryParser
if (isset($tree["CONTEXT"]))
$w .= ' [' . $tree["CONTEXT"] . ']';
$txt = '"' . $w . '"';
- }
- else {
+ } else {
if (isset($tree["CONTEXT"]))
$w .= '[' . $tree["CONTEXT"] . ']';
if ($tree["CLASS"] == "QSIMPLE")
@@ -722,7 +715,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function setTids(&$tree, $bid, &$domthe, $searchsynonyms)
+ public function setTids(&$tree, $bid, &$domthe, $searchsynonyms)
{
if ($this->debug)
print("============================ setTids:\n\$tree=" . var_export($tree, true) . "\n");
@@ -776,8 +769,7 @@ class searchEngine_adapter_phrasea_queryParser
$prophtml = "";
$this->propAsHTML($domthe->documentElement, $prophtml, $path);
$this->proposals["BASES"]["b$bid"]["TERMS"][$path]["HTML"] = $prophtml;
- }
- else {
+ } else {
// le mot n'est pas dans le thesaurus
}
@@ -793,27 +785,18 @@ class searchEngine_adapter_phrasea_queryParser
if(is_array($w = $simple["VALUE"]))
$t = $w = implode(" ", $w);
- if(isset($tree["CONTEXT"]))
- {
- if(!$tree["CONTEXT"])
- {
+ if (isset($tree["CONTEXT"])) {
+ if (!$tree["CONTEXT"]) {
$x0 = "@w=\"" . $w ."\" and not(@k)";
- }
- else
- {
- if($tree["CONTEXT"]=="*")
- {
+ } else {
+ if ($tree["CONTEXT"]=="*") {
$x0 = "@w=\"" . $w ."\"";
- }
- else
- {
+ } else {
$x0 = "@w=\"" . $w ."\" and @k=\"" . $tree["CONTEXT"] . "\"";
$t .= " (" . $tree["CONTEXT"] . ")";
}
}
- }
- else
- {
+ } else {
$x0 = "@w=\"" . $w ."\"";
}
@@ -827,20 +810,15 @@ class searchEngine_adapter_phrasea_queryParser
if(!isset($tree["RB"]["SREF"]["TIDS"]))
$tree["RB"]["SREF"]["TIDS"] = array();
- if($nodes->length >= 1)
- {
- if($nodes->length == 1)
- {
+ if ($nodes->length >= 1) {
+ if ($nodes->length == 1) {
// on cherche un id simple, on utilisera la syntaxe sql 'like' (l'extension repérera elle méme la syntaxe car la value finira par '%')
$this->addtoTIDS($tree["RB"], $bid, $nodes->item(0));
// $this->thesaurusDOMNodes[] = $nodes->item(0);
- }
- else
- {
+ } else {
// on cherche plusieurs id's, on utilisera la syntaxe 'regexp' (l'extension repérera elle meme la syntaxe car la value finira par '$')
$val = "";
- foreach($nodes as $node)
- {
+ foreach ($nodes as $node) {
if(!isset($tree["CONTEXT"]))
$ambigus++;
$this->addtoTIDS($tree["RB"], $bid, $node);
@@ -850,9 +828,7 @@ class searchEngine_adapter_phrasea_queryParser
$prophtml = "";
$this->propAsHTML($domthe->documentElement, $prophtml, $path);
$this->proposals["TERMS"][$path]["HTML"] = $prophtml;
- }
- else
- {
+ } else {
// le mot n'est pas dans le thesaurus
}
@@ -860,7 +836,7 @@ class searchEngine_adapter_phrasea_queryParser
}
*/
- function containsColonOperator(&$tree)
+ public function containsColonOperator(&$tree)
{
if ( ! $tree) {
return(false);
@@ -877,7 +853,7 @@ class searchEngine_adapter_phrasea_queryParser
return($ret);
}
- function addtoTIDS(&$extendednode, $bid, $DOMnode) // ajoute un tid en évitant les doublons
+ public function addtoTIDS(&$extendednode, $bid, $DOMnode) // ajoute un tid en évitant les doublons
{
$id = $DOMnode->getAttribute("id");
$pid = $DOMnode->parentNode->getAttribute("id");
@@ -940,7 +916,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function astext_ambigu($tree, &$ambiguites, $mouseCallback = "void", $depth = 0)
+ public function astext_ambigu($tree, &$ambiguites, $mouseCallback = "void", $depth = 0)
{
if ($depth == 0) {
$ambiguites = array("n" => 0, "refs" => array());
@@ -990,7 +966,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function get_ambigu(&$tree, $mouseCallback = "void", $depth = 0)
+ public function get_ambigu(&$tree, $mouseCallback = "void", $depth = 0)
{
if ( ! $tree) {
return("");
@@ -1012,7 +988,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function set_default(&$tree, &$emptyw, $depth = 0)
+ public function set_default(&$tree, &$emptyw, $depth = 0)
{
if ( ! $tree) {
return(true);
@@ -1061,8 +1037,7 @@ class searchEngine_adapter_phrasea_queryParser
else
if ( ! isset($tree["LB"]))
$tree = $tree["RB"];
- }
- else {
+ } else {
if (($tree["CLASS"] == "SIMPLE" || $tree["CLASS"] == "QSIMPLE")) {
if (is_array($tree["VALUE"])) {
$treetmp = null;
@@ -1108,13 +1083,13 @@ class searchEngine_adapter_phrasea_queryParser
return(true);
}
- function factor_or(&$tree)
+ public function factor_or(&$tree)
{
do
$n = $this->factor_or2($tree); while ($n > 0);
}
- function factor_or2(&$tree, $depth = 0)
+ public function factor_or2(&$tree, $depth = 0)
{
$nmodif = 0;
if ($tree["CLASS"] == "OPS" || $tree["CLASS"] == "OPK") {
@@ -1125,15 +1100,13 @@ class searchEngine_adapter_phrasea_queryParser
if (is_array($tree["RB"]["VALUE"])) {
foreach ($tree["RB"]["VALUE"] as $v)
$tree["VALUE"][] = $v;
- }
- else
+ } else
$tree["VALUE"][] = $tree["RB"]["VALUE"];
unset($tree["LB"]);
unset($tree["RB"]);
unset($tree["PNUM"]);
$nmodif ++;
- }
- else {
+ } else {
$nmodif += $this->factor_or2($tree["LB"], $depth + 1);
$nmodif += $this->factor_or2($tree["RB"], $depth + 1);
}
@@ -1142,7 +1115,7 @@ class searchEngine_adapter_phrasea_queryParser
return($nmodif);
}
- function setNumValue(&$tree, SimpleXMLElement $sxml_struct, $depth = 0)
+ public function setNumValue(&$tree, SimpleXMLElement $sxml_struct, $depth = 0)
{
if ($tree["CLASS"] == "OPK") {
if (isset($tree["RB"]) && ($tree["RB"]["CLASS"] == "SIMPLE" || $tree["RB"]["CLASS"] == "QSIMPLE") && ($tree["LB"]["CLASS"] == "SIMPLE" || $tree["LB"]["CLASS"] == "QSIMPLE")) {
@@ -1174,14 +1147,14 @@ class searchEngine_adapter_phrasea_queryParser
$this->setNumValue($tree["RB"], $sxml_struct, $depth + 1);
}
- function changeNodeEquals(&$branch, $type)
+ public function changeNodeEquals(&$branch, $type)
{
if (strtoupper($type) == strtoupper("Date")) {
$branch = $this->changeNodeEquals2($branch);
}
}
- function changeNodeEquals2($oneBranch)
+ public function changeNodeEquals2($oneBranch)
{
## creation branche gauche avec ">="
// print("changeNodeEquals2\n");
@@ -1226,7 +1199,7 @@ class searchEngine_adapter_phrasea_queryParser
return $tree;
}
- function setNumValue2(&$branch, $type)
+ public function setNumValue2(&$branch, $type)
{
if (strtoupper($type) == strtoupper("Date")) {
$dateEnIso = $this->isoDate($branch["VALUE"]);
@@ -1234,7 +1207,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function isoDate($onedate, $max = false)
+ public function isoDate($onedate, $max = false)
{
$v_y = "1900";
$v_m = "01";
@@ -1285,8 +1258,7 @@ class searchEngine_adapter_phrasea_queryParser
$v_d = "99";
else
$v_d = "00";
- }
- elseif (strlen($tmp[1]) == 4) {
+ } elseif (strlen($tmp[1]) == 4) {
// on a l'année en premier, on suppose alors que c'est de la forme DD MM YYYY
$v_y = $tmp[1];
$v_m = $tmp[0];
@@ -1294,8 +1266,7 @@ class searchEngine_adapter_phrasea_queryParser
$v_d = "99";
else
$v_d = "00";
- }
- else {
+ } else {
// on a l'anné sur 2 chiffres
if ($tmp[1] < 20)
$v_y = "20" . $tmp[1];
@@ -1378,7 +1349,7 @@ class searchEngine_adapter_phrasea_queryParser
return("" . $v_y . $v_m . $v_d . $v_h . $v_minutes . $v_s);
}
- function distrib_in(&$tree, $depth = 0)
+ public function distrib_in(&$tree, $depth = 0)
{
$opdistrib = array(PHRASEA_OP_AND, PHRASEA_OP_OR, PHRASEA_OP_EXCEPT, PHRASEA_OP_NEAR, PHRASEA_OP_BEFORE, PHRASEA_OP_AFTER); // ces opérateurs sont 'distribuables' autour d'un 'IN'
@@ -1452,7 +1423,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function makequery($tree)
+ public function makequery($tree)
{
$a = array($tree["NODETYPE"]);
switch ($tree["CLASS"]) {
@@ -1491,7 +1462,7 @@ class searchEngine_adapter_phrasea_queryParser
return($a);
}
- function maketree($depth, $inquote = false)
+ public function maketree($depth, $inquote = false)
{
// printf("\n\n");
$tree = null;
@@ -1533,8 +1504,7 @@ class searchEngine_adapter_phrasea_queryParser
$tree["RB"] = $this->maketree($depth + 1);
if ( ! $tree["RB"])
$tree = null;
- }
- else {
+ } else {
// ici on applique l'opérateur par défaut
$tree = array("CLASS" => "OPS",
"VALUE" => $this->defaultop["VALUE"],
@@ -1581,8 +1551,7 @@ class searchEngine_adapter_phrasea_queryParser
$tree["RB"] = $this->maketree($depth + 1, true);
if ( ! $tree["RB"])
$tree = null;
- }
- else {
+ } else {
// ici on applique l'opérateur par défaut
$tree = array("CLASS" => "OPS",
"VALUE" => $this->defaultop["VALUE"],
@@ -1621,7 +1590,7 @@ class searchEngine_adapter_phrasea_queryParser
return($tree);
}
- function addtotree($tree, $t, $depth, $inquote)
+ public function addtotree($tree, $t, $depth, $inquote)
{
if ($this->debug) {
printf("addtotree({tree}, \$t[CLASS]='%s', \$t[VALUE]='%s', \$depth=%d, inquote=%s)\n", $t["CLASS"], $t["VALUE"], $depth, $inquote ? "true" : "false");
@@ -1659,8 +1628,7 @@ class searchEngine_adapter_phrasea_queryParser
return(null);
}
}
- }
- else {
+ } else {
if ($this->errmsg != "")
$this->errmsg .= "\\n";
$this->errmsg .= sprintf("le contexte [%s] ne peut suivre qu'un terme ou un opérateur
", $t["VALUE"]);
@@ -1723,8 +1691,7 @@ class searchEngine_adapter_phrasea_queryParser
}
return(array("CLASS" => "OPS", "VALUE" => $t["VALUE"], "NODETYPE" => $this->ops[$t["VALUE"]]["NODETYPE"], "PNUM" => $pnum, "DEPTH" => $depth, "LB" => $tree, "RB" => null));
- }
- else {
+ } else {
// ce mot n'est pas un opérateur
$pnum = null;
$nodetype = PHRASEA_KEYLIST;
@@ -1741,8 +1708,7 @@ class searchEngine_adapter_phrasea_queryParser
$this->ungettoken($tn["VALUE"]);
}
}
- }
- else {
+ } else {
//printf("sdfsdfsdfsd
");
$type = $inquote ? "QSIMPLE" : "SIMPLE";
}
@@ -1753,7 +1719,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function addsimple($t, $type, $nodetype, $pnum, $tree, $depth)
+ public function addsimple($t, $type, $nodetype, $pnum, $tree, $depth)
{
$nok = 0;
$registry = registry::get_instance();
@@ -1770,8 +1736,7 @@ class searchEngine_adapter_phrasea_queryParser
return(null);
}
// $nok = 0;
- }
- else
+ } else
$nok ++;
}
}
@@ -1851,12 +1816,12 @@ class searchEngine_adapter_phrasea_queryParser
}
}
- function ungettoken($s)
+ public function ungettoken($s)
{
$this->phq = $s . " " . $this->phq;
}
- function nexttoken($inquote = false)
+ public function nexttoken($inquote = false)
{
if ($this->phq == "") {
return(null);
@@ -1965,8 +1930,7 @@ class searchEngine_adapter_phrasea_queryParser
// $c = mb_strtolower($c);
// $t .= isset($this->noaccent[$c]) ? $this->noaccent[$c] : $c;
$t .= $this->unicode->remove_diacritics(mb_strtolower($c_utf8));
- }
- else
+ } else
break;
}
// if ($c_utf8 == "(" || $c_utf8 == ")" || $c_utf8 == "[" || $c_utf8 == "]" || $c_utf8 == "=" || $c_utf8 == ":" || $c_utf8 == "<" || $c_utf8 == ">" || $c_utf8 == "\"")
diff --git a/lib/classes/searchEngine/adapter/sphinx/engine.class.php b/lib/classes/searchEngine/adapter/sphinx/engine.class.php
index 4cafc65fff..8f4ede9d9a 100644
--- a/lib/classes/searchEngine/adapter/sphinx/engine.class.php
+++ b/lib/classes/searchEngine/adapter/sphinx/engine.class.php
@@ -67,7 +67,7 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i
/**
*
- * @param searchEngine_options $options
+ * @param searchEngine_options $options
* @return searchEngine_adapter_sphinx_engine
*/
public function set_options(searchEngine_options $options)
@@ -254,9 +254,9 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i
/**
*
- * @param string $query
- * @param int $offset
- * @param int $perPage
+ * @param string $query
+ * @param int $offset
+ * @param int $perPage
* @return searchEngine_results
*/
public function results($query, $offset, $perPage)
@@ -307,8 +307,7 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i
if ( ! $found)
$index .= 'documents' . implode(', documents', $index_keys);
$index .= ', docs_realtime' . implode(', docs_realtime', $index_keys);
- }
- else {
+ } else {
$index = '';
$found = false;
if ($this->query !== '' && $this->options->get_use_stemming() && $session->get_I18n() == 'fr') {
@@ -372,10 +371,10 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i
/**
*
- * @param string $keyword
+ * @param string $keyword
* @return string
*/
- function BuildTrigrams($keyword)
+ public function BuildTrigrams($keyword)
{
$t = "__" . $keyword . "__";
@@ -480,7 +479,7 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i
/**
*
- * @param Session_Handler $session
+ * @param Session_Handler $session
* @return array
*/
public function get_suggestions(Session_Handler $session, $only_last_word = false)
@@ -645,9 +644,9 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i
/**
*
- * @param string $query
- * @param array $fields
- * @param int $selected_sbas_id
+ * @param string $query
+ * @param array $fields
+ * @param int $selected_sbas_id
* @return array
*/
public function build_excerpt($query, array $fields, record_adapter $record)
@@ -682,8 +681,7 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i
}
if ( ! $found)
$index .= 'documents' . implode(', documents', $index_keys);
- }
- else {
+ } else {
$index = '';
$found = false;
if ($this->options->get_use_stemming() && $session->get_I18n() == 'fr') {
diff --git a/lib/classes/searchEngine/options.class.php b/lib/classes/searchEngine/options.class.php
index 54195555b7..681beb9fd2 100644
--- a/lib/classes/searchEngine/options.class.php
+++ b/lib/classes/searchEngine/options.class.php
@@ -134,8 +134,8 @@ class searchEngine_options implements Serializable
/**
*
- * @param const $sort_by
- * @param const $sort_ord
+ * @param const $sort_by
+ * @param const $sort_ord
* @return searchEngine_options
*/
public function set_sort($sort_by, $sort_ord = self::SORT_MODE_DESC)
@@ -178,7 +178,7 @@ class searchEngine_options implements Serializable
/**
*
- * @param boolean $boolean
+ * @param boolean $boolean
* @return searchEngine_options
*/
public function set_use_stemming($boolean)
@@ -199,7 +199,7 @@ class searchEngine_options implements Serializable
/**
*
- * @param int $search_type
+ * @param int $search_type
* @return searchEngine_options
*/
public function set_search_type($search_type)
@@ -228,8 +228,8 @@ class searchEngine_options implements Serializable
/**
*
- * @param array $base_ids
- * @param ACL $ACL
+ * @param array $base_ids
+ * @param ACL $ACL
* @return searchEngine_options
*/
public function set_bases(Array $base_ids, ACL $ACL)
@@ -253,7 +253,7 @@ class searchEngine_options implements Serializable
/**
*
- * @param array $fields
+ * @param array $fields
* @return searchEngine_options
*/
public function set_fields(Array $fields)
@@ -274,7 +274,7 @@ class searchEngine_options implements Serializable
/**
*
- * @param array $status
+ * @param array $status
* @return searchEngine_options
*/
public function set_status(Array $status)
@@ -309,7 +309,7 @@ class searchEngine_options implements Serializable
/**
*
- * @param string $record_type
+ * @param string $record_type
* @return searchEngine_options
*/
public function set_record_type($record_type)
@@ -350,7 +350,7 @@ class searchEngine_options implements Serializable
/**
*
- * @param string $min_date
+ * @param string $min_date
* @return searchEngine_options
*/
public function set_min_date($min_date)
@@ -373,7 +373,7 @@ class searchEngine_options implements Serializable
/**
*
- * @param string $max_date
+ * @param string $max_date
* @return searchEngine_options
*/
public function set_max_date($max_date)
@@ -396,7 +396,7 @@ class searchEngine_options implements Serializable
/**
*
- * @param array $fields
+ * @param array $fields
* @return searchEngine_options
*/
public function set_date_fields(Array $fields)
@@ -434,7 +434,7 @@ class searchEngine_options implements Serializable
/**
*
- * @param string $serialized
+ * @param string $serialized
* @return searchEngine_options
*/
public function unserialize($serialized)
diff --git a/lib/classes/searchEngine/results.class.php b/lib/classes/searchEngine/results.class.php
index 515da7cf5b..040bb98dd7 100644
--- a/lib/classes/searchEngine/results.class.php
+++ b/lib/classes/searchEngine/results.class.php
@@ -31,8 +31,8 @@ class searchEngine_results
/**
*
- * @param set $result
- * @param searchEngine_adapter_interface $engine
+ * @param set $result
+ * @param searchEngine_adapter_interface $engine
* @return searchEngine_results
*/
public function __construct(set_abstract $result, searchEngine_adapter_interface $engine)
diff --git a/lib/classes/set/abstract.class.php b/lib/classes/set/abstract.class.php
index 4fba2f5283..0b1b3ee9e7 100644
--- a/lib/classes/set/abstract.class.php
+++ b/lib/classes/set/abstract.class.php
@@ -45,8 +45,8 @@ abstract class set_abstract implements IteratorAggregate
/**
*
- * @param string $offset
- * @param string $value
+ * @param string $offset
+ * @param string $value
* @return Void
*/
public function offsetSet($offset, $value)
@@ -60,7 +60,7 @@ abstract class set_abstract implements IteratorAggregate
/**
*
- * @param string $offset
+ * @param string $offset
* @return boolean
*/
public function offsetExists($offset)
@@ -70,7 +70,7 @@ abstract class set_abstract implements IteratorAggregate
/**
*
- * @param string $offset
+ * @param string $offset
* @return Void
*/
public function offsetUnset($offset)
@@ -80,7 +80,7 @@ abstract class set_abstract implements IteratorAggregate
/**
*
- * @param string $offset
+ * @param string $offset
* @return record_adapter
*/
public function offsetGet($offset)
@@ -145,7 +145,7 @@ abstract class set_abstract implements IteratorAggregate
/**
*
- * @param record_Interface $record
+ * @param record_Interface $record
* @return set
*/
public function add_element(record_Interface &$record)
@@ -157,7 +157,7 @@ abstract class set_abstract implements IteratorAggregate
/**
*
- * @param record_Interface $record
+ * @param record_Interface $record
* @return set
*/
public function remove_element(record_Interface &$record)
diff --git a/lib/classes/set/export.class.php b/lib/classes/set/export.class.php
index 9a1f8f391b..1859c237dd 100644
--- a/lib/classes/set/export.class.php
+++ b/lib/classes/set/export.class.php
@@ -30,8 +30,8 @@ class set_export extends set_abstract
/**
*
- * @param string $lst
- * @param int $sstid
+ * @param string $lst
+ * @param int $sstid
* @return set_export
*/
public function __construct($lst, $sstid, $storyWZid = null)
@@ -381,8 +381,8 @@ class set_export extends set_abstract
/**
*
- * @param Array $subdefs
- * @param boolean $rename_title
+ * @param Array $subdefs
+ * @param boolean $rename_title
* @return Array
*/
public function prepare_export(Array $subdefs, $rename_title, $includeBusinessFields)
@@ -694,9 +694,9 @@ class set_export extends set_abstract
/**
*
- * @param String $token
- * @param Array $list
- * @param string $zipFile
+ * @param String $token
+ * @param Array $list
+ * @param string $zipFile
* @return string
*/
public static function build_zip($token, Array $list, $zipFile)
@@ -768,10 +768,10 @@ class set_export extends set_abstract
/**
*
- * @param string $file
- * @param string $exportname
- * @param string $mime
- * @param string $disposition
+ * @param string $file
+ * @param string $exportname
+ * @param string $mime
+ * @param string $disposition
* @return \Symfony\Component\HttpFoundation\Response
*/
public static function stream_file(
@@ -843,10 +843,10 @@ class set_export extends set_abstract
/**
*
- * @param String $data
- * @param String $exportname
- * @param String $mime
- * @param String $disposition
+ * @param String $data
+ * @param String $exportname
+ * @param String $mime
+ * @param String $disposition
* @return Void
*/
public static function stream_data($data, $exportname, $mime, $disposition = 'attachment')
@@ -871,9 +871,9 @@ class set_export extends set_abstract
/**
* @todo a revoir le cas anonymous
*
- * @param Array $list
- * @param String> $type
- * @param boolean $anonymous
+ * @param Array $list
+ * @param String> $type
+ * @param boolean $anonymous
* @return Void
*/
public static function log_download(Array $list, $type, $anonymous = false, $comment = '')
diff --git a/lib/classes/set/exportftp.class.php b/lib/classes/set/exportftp.class.php
index a03f633554..9f43d5ad86 100644
--- a/lib/classes/set/exportftp.class.php
+++ b/lib/classes/set/exportftp.class.php
@@ -20,15 +20,15 @@ class set_exportftp extends set_export
/**
*
- * @param Int $usr_to
- * @param String $host
- * @param String $login
- * @param String $password
- * @param Int $ssl
- * @param Int $retry
- * @param Int $passif
- * @param String $destfolder
- * @param String $makedirectory
+ * @param Int $usr_to
+ * @param String $host
+ * @param String $login
+ * @param String $password
+ * @param Int $ssl
+ * @param Int $retry
+ * @param Int $passif
+ * @param String $destfolder
+ * @param String $makedirectory
* @return boolean
*/
public function export_ftp($usr_to, $host, $login, $password, $ssl, $retry, $passif, $destfolder, $makedirectory, $logfile)
diff --git a/lib/classes/set/exportorder.class.php b/lib/classes/set/exportorder.class.php
index b3fd81b6af..9a6abab9d6 100644
--- a/lib/classes/set/exportorder.class.php
+++ b/lib/classes/set/exportorder.class.php
@@ -20,9 +20,9 @@ class set_exportorder extends set_export
/**
*
- * @param Int $from_usr_id
- * @param String $usage
- * @param String $deadline
+ * @param Int $from_usr_id
+ * @param String $usage
+ * @param String $deadline
* @return boolean
* @return $order_id
*/
@@ -120,8 +120,8 @@ class set_exportorder extends set_export
/**
*
- * @param Int $admins
- * @param Int $base_id
+ * @param Int $admins
+ * @param Int $base_id
* @return Void
*/
public static function set_order_admins($admins, $base_id)
diff --git a/lib/classes/set/order.class.php b/lib/classes/set/order.class.php
index 261d37e51e..f96c953b5c 100644
--- a/lib/classes/set/order.class.php
+++ b/lib/classes/set/order.class.php
@@ -67,7 +67,7 @@ class set_order extends set_abstract
/**
*
- * @param int $id
+ * @param int $id
* @return set_order
*/
public function __construct($id)
@@ -201,8 +201,8 @@ class set_order extends set_abstract
/**
*
- * @param Array $elements_ids
- * @param boolean $force
+ * @param Array $elements_ids
+ * @param boolean $force
* @return set_order
*/
public function send_elements(Array $elements_ids, $force)
@@ -319,7 +319,7 @@ class set_order extends set_abstract
/**
*
- * @param Array $elements_ids
+ * @param Array $elements_ids
* @return set_order
*/
public function deny_elements(Array $elements_ids)
diff --git a/lib/classes/set/ordermanager.class.php b/lib/classes/set/ordermanager.class.php
index 9c66159f7b..ab18f80641 100644
--- a/lib/classes/set/ordermanager.class.php
+++ b/lib/classes/set/ordermanager.class.php
@@ -128,8 +128,8 @@ class set_ordermanager extends set_abstract
/**
*
- * @param string $a
- * @param string $b
+ * @param string $a
+ * @param string $b
* @return int
*/
protected static function usage_orders_sort($a, $b)
@@ -145,8 +145,8 @@ class set_ordermanager extends set_abstract
/**
*
- * @param string $a
- * @param string $b
+ * @param string $a
+ * @param string $b
* @return int
*/
protected static function user_orders_sort($a, $b)
@@ -162,8 +162,8 @@ class set_ordermanager extends set_abstract
/**
*
- * @param DateTime $a
- * @param DateTime $b
+ * @param DateTime $a
+ * @param DateTime $b
* @return int
*/
protected static function date_orders_sort(DateTime $a, DateTime $b)
diff --git a/lib/classes/set/selection.class.php b/lib/classes/set/selection.class.php
index 021a7a3139..96152c15c0 100644
--- a/lib/classes/set/selection.class.php
+++ b/lib/classes/set/selection.class.php
@@ -31,7 +31,7 @@ class set_selection extends set_abstract
/**
*
- * @param \Entities\Basket $basket
+ * @param \Entities\Basket $basket
* @return set_selection
*/
public function load_basket(\Entities\Basket $Basket)
@@ -45,7 +45,7 @@ class set_selection extends set_abstract
/**
*
- * @param array $rights
+ * @param array $rights
* @return set_selection
*/
public function grep_authorized(Array $rights = array(), Array $sbas_rights = array())
@@ -118,7 +118,7 @@ class set_selection extends set_abstract
/**
*
- * @param array $lst
+ * @param array $lst
* @return set_selection
*/
public function load_list(Array $lst, $flatten_groupings = false)
diff --git a/lib/classes/setup.class.php b/lib/classes/setup.class.php
index 161d7398b8..892f8f8e70 100644
--- a/lib/classes/setup.class.php
+++ b/lib/classes/setup.class.php
@@ -81,7 +81,7 @@ class setup
&& is_file(__DIR__ . "/../../config/config.inc"));
}
- function create_global_values(registryInterface &$registry, $datas = array())
+ public function create_global_values(registryInterface &$registry, $datas = array())
{
require(__DIR__ . "/../../lib/conf.d/_GV_template.inc");
@@ -106,8 +106,7 @@ class setup
$datas[$variable['name']] = '1';
else
$datas[$variable['name']] = '0';
- }
- else {
+ } else {
$datas[$variable['name']] = $variable['default'];
}
}
@@ -274,7 +273,7 @@ class setup
return exec(sprintf('which %s', $binary));
}
- function check_mod_auth_token()
+ public function check_mod_auth_token()
{
$registry = registry::get_instance();
@@ -300,7 +299,7 @@ class setup
@@ -356,8 +355,7 @@ class setup
function check_apache_mod(el,mod)
{
var url = '/admin/test-';
- switch(mod)
- {
+ switch (mod) {
case 'rewrite':
url += 'rewrite';
break;
@@ -531,8 +529,7 @@ class setup
foreach ($availables_caches as $ext) {
if (extension_loaded($ext) === true) {
$constraints[] = new Setup_Constraint(sprintf('Extension %s', $ext), true, sprintf('%s loaded', $ext), false);
- }
- else
+ } else
$constraints[] = new Setup_Constraint(sprintf('Extension %s', $ext), false, sprintf('%s not loaded', $ext), false);
}
diff --git a/lib/classes/sphinxrt.class.php b/lib/classes/sphinxrt.class.php
index ac745400ae..2948ca5e52 100644
--- a/lib/classes/sphinxrt.class.php
+++ b/lib/classes/sphinxrt.class.php
@@ -35,7 +35,7 @@ class sphinxrt
/**
*
- * @param registry $registry
+ * @param registry $registry
* @return sphinxrt
*/
public static function get_instance(registry $registry, $retry_on_failure = false)
@@ -53,9 +53,9 @@ class sphinxrt
/**
* Delete an index
*
- * @param array $index_ids
- * @param $rt_id
- * @param $meta_id
+ * @param array $index_ids
+ * @param $rt_id
+ * @param $meta_id
* @return sphinxrt
*/
public function delete(Array $index_ids, $rt_id, $id)
diff --git a/lib/classes/system/server.class.php b/lib/classes/system/server.class.php
index 99541404a4..0d0e561f6f 100644
--- a/lib/classes/system/server.class.php
+++ b/lib/classes/system/server.class.php
@@ -27,7 +27,7 @@ class system_server
*
* @return system_server
*/
- function __construct()
+ public function __construct()
{
$this->_server_software = isset($_SERVER['SERVER_SOFTWARE']) ?
strtolower($_SERVER['SERVER_SOFTWARE']) : "";
diff --git a/lib/classes/system/url.class.php b/lib/classes/system/url.class.php
index a66d0ca787..82c477b3b2 100644
--- a/lib/classes/system/url.class.php
+++ b/lib/classes/system/url.class.php
@@ -19,12 +19,12 @@ class system_url
{
protected $url;
- function __construct($url)
+ public function __construct($url)
{
$this->url = $url;
}
- function get_url()
+ public function get_url()
{
return $this->url;
}
diff --git a/lib/classes/task/abstract.class.php b/lib/classes/task/abstract.class.php
index 053cd17632..85a0cb3706 100755
--- a/lib/classes/task/abstract.class.php
+++ b/lib/classes/task/abstract.class.php
@@ -150,7 +150,7 @@ abstract class task_abstract
/**
* set the state of the task (task_abstract::STATE_*)
*
- * @param String $status
+ * @param String $status
* @throws Exception_InvalidArgument
*/
public function setState($status)
@@ -276,7 +276,7 @@ abstract class task_abstract
abstract public function help();
- function __construct($taskid)
+ public function __construct($taskid)
{
$this->taskid = $taskid;
@@ -656,7 +656,7 @@ abstract class task_abstract
}
}
- function traceRam($msg = '')
+ public function traceRam($msg = '')
{
static $lastt = null;
$t = explode(' ', ($ut = microtime()));
@@ -701,9 +701,9 @@ abstract class task_abstract
/**
*
- * @param appbox $appbox
- * @param type $class_name
- * @param type $settings
+ * @param appbox $appbox
+ * @param type $class_name
+ * @param type $settings
* @return task_abstract
*/
public static function create(appbox $appbox, $class_name, $settings = null)
@@ -757,7 +757,7 @@ abstract class task_abstract
return $this->taskid;
}
- function setProgress($done, $todo)
+ public function setProgress($done, $todo)
{
$p = ($todo > 0) ? ((100 * $done) / $todo) : -1;
diff --git a/lib/classes/task/appboxAbstract.class.php b/lib/classes/task/appboxAbstract.class.php
index 8d0268c319..23109d0eb9 100755
--- a/lib/classes/task/appboxAbstract.class.php
+++ b/lib/classes/task/appboxAbstract.class.php
@@ -127,6 +127,7 @@ abstract class task_appboxAbstract extends task_abstract
} catch (Exception $e) {
$this->log('Error : ' . $e->getMessage());
}
+
return $ret;
/*
diff --git a/lib/classes/task/databoxAbstract.class.php b/lib/classes/task/databoxAbstract.class.php
index e21154dd57..3346902a17 100755
--- a/lib/classes/task/databoxAbstract.class.php
+++ b/lib/classes/task/databoxAbstract.class.php
@@ -75,6 +75,7 @@ abstract class task_databoxAbstract extends task_abstract
} catch (Exception $e) {
// failed sql, simply return
$this->running = FALSE;
+
return;
}
diff --git a/lib/classes/task/manager.class.php b/lib/classes/task/manager.class.php
index 2fe14a3d5b..c248e7e627 100755
--- a/lib/classes/task/manager.class.php
+++ b/lib/classes/task/manager.class.php
@@ -83,7 +83,7 @@ class task_manager
/**
*
- * @param int $task_id
+ * @param int $task_id
* @return task_abstract
*/
public function getTask($task_id)
diff --git a/lib/classes/task/period/apibridge.class.php b/lib/classes/task/period/apibridge.class.php
index 54f6ef63f2..2c5eda860f 100755
--- a/lib/classes/task/period/apibridge.class.php
+++ b/lib/classes/task/period/apibridge.class.php
@@ -37,7 +37,7 @@ class task_period_apibridge extends task_appboxAbstract
/**
*
- * @param appbox $appbox
+ * @param appbox $appbox
* @return Array
*/
protected function retrieveContent(appbox $appbox)
@@ -65,8 +65,8 @@ class task_period_apibridge extends task_appboxAbstract
/**
*
- * @param appbox $appbox
- * @param array $row
+ * @param appbox $appbox
+ * @param array $row
* @return task_period_apibridge
*/
protected function processOneContent(appbox $appbox, Array $row)
@@ -100,8 +100,8 @@ class task_period_apibridge extends task_appboxAbstract
/**
*
- * @param appbox $appbox
- * @param array $row
+ * @param appbox $appbox
+ * @param array $row
* @return task_period_apibridge
*/
protected function postProcessOneContent(appbox $appbox, Array $row)
@@ -111,7 +111,7 @@ class task_period_apibridge extends task_appboxAbstract
/**
*
- * @param Bridge_Element $element
+ * @param Bridge_Element $element
* @return task_period_apibridge
*/
private function upload_element(Bridge_Element $element)
@@ -133,7 +133,7 @@ class task_period_apibridge extends task_appboxAbstract
/**
*
- * @param Bridge_Element $element
+ * @param Bridge_Element $element
* @return task_period_apibridge
*/
protected function update_element(Bridge_Element &$element)
diff --git a/lib/classes/task/period/archive.class.php b/lib/classes/task/period/archive.class.php
index 8546edc0c5..cfbae48277 100755
--- a/lib/classes/task/period/archive.class.php
+++ b/lib/classes/task/period/archive.class.php
@@ -86,7 +86,7 @@ class task_period_archive extends task_abstract
/**
*
- * @param string $oldxml
+ * @param string $oldxml
* @return string
*/
public function graphic2xml($oldxml)
@@ -141,8 +141,8 @@ class task_period_archive extends task_abstract
/**
* xml2graphic : must fill the graphic form (using js) from xml
*
- * @param string $xml
- * @param string $form
+ * @param string $xml
+ * @param string $form
* @return Void
*/
public function xml2graphic($xml, $form)
@@ -164,8 +164,7 @@ class task_period_archive extends task_abstract
var i;
var opts = .base_id.options;
var basefound = 0;
- for(i=1; basefound==0 && ibase_id, "form") ?>")
basefound = i;
}
@@ -179,6 +178,7 @@ class task_period_archive extends task_abstract
.copy_spe.checked = copy_spe) ? "true" : "false" ?>;
log(sprintf(_('task::archive:Can\'t create or go to folder \'%s\''), $pathhd));
$this->running = false;
+
return;
}
}
@@ -520,10 +522,10 @@ class task_period_archive extends task_abstract
/**
*
- * @param $server_coll_id
+ * @param $server_coll_id
* @return
*/
- function archiveHotFolder($server_coll_id)
+ public function archiveHotFolder($server_coll_id)
{
clearstatcache();
@@ -571,6 +573,7 @@ class task_period_archive extends task_abstract
$this->log("=========== listFilesPhase1 ========== (returned " . $nnew . ")\n" . $dom->saveXML());
if ($nnew === 'TOSTOP') { // special case : status has changed to TOSTOP while listing files
+
return('TOSTOP');
}
@@ -640,10 +643,10 @@ class task_period_archive extends task_abstract
/**
*
- * @param $f
+ * @param $f
* @return
*/
- function isIgnoredFile($f)
+ public function isIgnoredFile($f)
{
$f = strtolower($f);
@@ -653,11 +656,11 @@ class task_period_archive extends task_abstract
/**
* check if the file matches any mask, and flag the 'caption' file if found
*
- * @param $dom
- * @param $node
+ * @param $dom
+ * @param $node
* @return
*/
- function checkMatch($dom, $node)
+ public function checkMatch($dom, $node)
{
$file = $node->getAttribute('name');
@@ -695,13 +698,13 @@ class task_period_archive extends task_abstract
* list every file, all 'hot'
* read .phrasea.xml files
*
- * @param $dom
- * @param $node
- * @param $path
- * @param $server_coll_id
+ * @param $dom
+ * @param $node
+ * @param $path
+ * @param $server_coll_id
* @return
*/
- function listFilesPhase1($dom, $node, $path, $server_coll_id)
+ public function listFilesPhase1($dom, $node, $path, $server_coll_id)
{
// $this->traceRam();
$nnew = 0;
@@ -789,13 +792,13 @@ class task_period_archive extends task_abstract
* list again and flag dead files as 'cold'
*
* @staticvar int $iloop
- * @param $dom
- * @param $node
- * @param $path
- * @param $depth
+ * @param $dom
+ * @param $node
+ * @param $path
+ * @param $depth
* @return
*/
- function listFilesPhase2($dom, $node, $path, $depth = 0)
+ public function listFilesPhase2($dom, $node, $path, $depth = 0)
{
static $iloop = 0;
if ($depth == 0) {
@@ -889,16 +892,16 @@ class task_period_archive extends task_abstract
* declare uncomplete grp as error
*
* @staticvar int $iloop
- * @param $dom
- * @param $node
- * @param $path
- * @param $path_archived
- * @param $path_error
- * @param $inGrp
- * @param $depth
+ * @param $dom
+ * @param $node
+ * @param $path
+ * @param $path_archived
+ * @param $path_error
+ * @param $inGrp
+ * @param $depth
* @return
*/
- function makePairs($dom, $node, $path, $path_archived, $path_error, $inGrp = false, $depth = 0)
+ public function makePairs($dom, $node, $path, $path_archived, $path_error, $inGrp = false, $depth = 0)
{
static $iloop = 0;
if ($depth == 0) {
@@ -992,8 +995,7 @@ class task_period_archive extends task_abstract
}
}
}
- }
- else {
+ } else {
// not a grp folder, recurse
$this->makePairs($dom, $n, $path . '/' . $name
, $path_archived . '/' . $name
@@ -1030,15 +1032,15 @@ class task_period_archive extends task_abstract
* move files to archived or error dir
*
* @staticvar int $iloop
- * @param $dom
- * @param $node
- * @param $path
- * @param $path_archived
- * @param $path_error
- * @param $depth
+ * @param $dom
+ * @param $node
+ * @param $path
+ * @param $path_archived
+ * @param $path_error
+ * @param $depth
* @return
*/
- function removeBadGroups($dom, $node, $path, $path_archived, $path_error, $depth = 0)
+ public function removeBadGroups($dom, $node, $path, $path_archived, $path_error, $depth = 0)
{
static $iloop = 0;
if ($depth == 0) {
@@ -1048,6 +1050,7 @@ class task_period_archive extends task_abstract
$ret = false;
if ($depth == 0 && $node->getAttribute('temperature') == 'hot') // if root of hotfolder if hot, die...
+
return($ret);
$nodesToDel = array();
@@ -1105,15 +1108,15 @@ class task_period_archive extends task_abstract
* do special work on grp folders
*
* @staticvar int $iloop
- * @param $dom
- * @param $node
- * @param $path
- * @param $path_archived
- * @param $path_error
- * @param $depth
+ * @param $dom
+ * @param $node
+ * @param $path
+ * @param $path_archived
+ * @param $path_error
+ * @param $depth
* @return
*/
- function archive($dom, $node, $path, $path_archived, $path_error, $depth = 0)
+ public function archive($dom, $node, $path, $path_archived, $path_error, $depth = 0)
{
static $iloop = 0;
if ($depth == 0) {
@@ -1179,13 +1182,13 @@ class task_period_archive extends task_abstract
* to help creation of result folders and cleaning of the hotfolder
*
* @staticvar int $iloop
- * @param $dom
- * @param $node
- * @param $path
- * @param $depth
+ * @param $dom
+ * @param $node
+ * @param $path
+ * @param $depth
* @return
*/
- function bubbleResults($dom, $node, $path, $depth = 0)
+ public function bubbleResults($dom, $node, $path, $depth = 0)
{
static $iloop = 0;
if ($depth == 0) {
@@ -1247,15 +1250,15 @@ class task_period_archive extends task_abstract
* move files to archived or error dir
*
* @staticvar int $iloop
- * @param $dom
- * @param $node
- * @param $path
- * @param $path_archived
- * @param $path_error
- * @param $depth
+ * @param $dom
+ * @param $node
+ * @param $path
+ * @param $path_archived
+ * @param $path_error
+ * @param $depth
* @return
*/
- function moveFiles($dom, $node, $path, $path_archived, $path_error, $depth = 0)
+ public function moveFiles($dom, $node, $path, $path_archived, $path_error, $depth = 0)
{
static $iloop = 0;
if ($depth == 0) {
@@ -1265,6 +1268,7 @@ class task_period_archive extends task_abstract
$ret = false;
if ($depth == 0 && $node->getAttribute('temperature') == 'hot') { // if root of hotfolder if hot, die...
+
return($ret);
}
@@ -1341,11 +1345,11 @@ class task_period_archive extends task_abstract
/**
*
- * @param $dom
- * @param $node
+ * @param $dom
+ * @param $node
* @return
*/
- function setBranchHot($dom, $node)
+ public function setBranchHot($dom, $node)
{
for ($n = $node; $n; $n = $n->parentNode) {
if ($n->nodeType == XML_ELEMENT_NODE) {
@@ -1365,15 +1369,15 @@ class task_period_archive extends task_abstract
* create the grp if needed
* archive files
*
- * @param $dom
- * @param $node
- * @param $path
- * @param $path_archived
- * @param $path_error
- * @param $nodesToDel
+ * @param $dom
+ * @param $node
+ * @param $path
+ * @param $path_archived
+ * @param $path_error
+ * @param $nodesToDel
* @return
*/
- function archiveGrp($dom, $node, $path, $path_archived, $path_error, &$nodesToDel)
+ public function archiveGrp($dom, $node, $path, $path_archived, $path_error, &$nodesToDel)
{
$xpath = new DOMXPath($dom); // useful
@@ -1511,9 +1515,9 @@ class task_period_archive extends task_abstract
*
* @todo pathfile should be optionnal
*
- * @param \collection $collection The destination collection
- * @param sring $pathfile The base file
- * @param string $captionFile The optionnal Phrasea XML caption file
+ * @param \collection $collection The destination collection
+ * @param sring $pathfile The base file
+ * @param string $captionFile The optionnal Phrasea XML caption file
* @return \record_adapter
*/
public function createStory(\collection $collection, $pathfile, $captionFile = null)
@@ -1572,11 +1576,11 @@ class task_period_archive extends task_abstract
/**
* Creates a fecord
*
- * @param \collection $collection The destination collection
- * @param string $pathfile The file to archive
- * @param string $captionFile The Phrasea XML caption file
- * @param integer $grp_rid Add the record to a story
- * @param integer $force Force lazaret or record ; use \Alchemy\Phrasea\Border\Manager::FORCE_* constants
+ * @param \collection $collection The destination collection
+ * @param string $pathfile The file to archive
+ * @param string $captionFile The Phrasea XML caption file
+ * @param integer $grp_rid Add the record to a story
+ * @param integer $force Force lazaret or record ; use \Alchemy\Phrasea\Border\Manager::FORCE_* constants
* @return null
*/
public function createRecord(\collection $collection, $pathfile, $captionFile, $grp_rid, $force = null)
@@ -1652,15 +1656,15 @@ class task_period_archive extends task_abstract
/**
*
- * @param $dom
- * @param $node
- * @param $path
- * @param $path_archived
- * @param $path_error
- * @param $grp_rid
+ * @param $dom
+ * @param $node
+ * @param $path
+ * @param $path_archived
+ * @param $path_error
+ * @param $grp_rid
* @return
*/
- function archiveFilesToGrp($dom, $node, $path, $path_archived, $path_error, $grp_rid)
+ public function archiveFilesToGrp($dom, $node, $path, $path_archived, $path_error, $grp_rid)
{
//usleep(1000);
$nodesToDel = array();
@@ -1687,16 +1691,16 @@ class task_period_archive extends task_abstract
/**
* Archive File
*
- * @param $dom
- * @param $node
- * @param $path
- * @param $path_archived
- * @param $path_error
- * @param $nodesToDel
- * @param $grp_rid
+ * @param $dom
+ * @param $node
+ * @param $path
+ * @param $path_archived
+ * @param $path_error
+ * @param $nodesToDel
+ * @param $grp_rid
* @return
*/
- function archiveFile($dom, $node, $path, $path_archived, $path_error, &$nodesToDel, $grp_rid = 0)
+ public function archiveFile($dom, $node, $path, $path_archived, $path_error, &$nodesToDel, $grp_rid = 0)
{
$match = $node->getAttribute('match');
@@ -1744,17 +1748,17 @@ class task_period_archive extends task_abstract
/**
*
- * @param $dom
- * @param $node
- * @param $captionFileNode
- * @param $path
- * @param $path_archived
- * @param $path_error
- * @param $grp_rid
- * @param $nodesToDel
+ * @param