Bug Fix - loading of one item twice when user in more than one group targeted. Feature Added - load only first found item or all items found.
This commit is contained in:
parent
d34279eecb
commit
f8dd0a1dcf
@ -14,9 +14,10 @@ MOD_PERGROUP_VALIDATION_TYPE="Validation Type"
|
||||
MOD_PERGROUP_IN_GROUP="In Group"
|
||||
MOD_PERGROUP_NOT_IN_GROUP="Not In Group"
|
||||
|
||||
MOD_PERGROUP_EXECUTION_DIRECTION="Execution Direction"
|
||||
MOD_PERGROUP_UP="Up"
|
||||
MOD_PERGROUP_DOWN="Down"
|
||||
MOD_PERGROUP_EXECUTION_DIRECTION="Load Direction"
|
||||
MOD_PERGROUP_FIRST_FOUND_CONTENT="Load Only First Found"
|
||||
MOD_PERGROUP_UP="Normal"
|
||||
MOD_PERGROUP_DOWN="Change"
|
||||
MOD_PERGROUP_NONE="None"
|
||||
MOD_PERGROUP_BREAK="New Line"
|
||||
MOD_PERGROUP_CLASS="Class [<div class="separator">]"
|
||||
|
@ -295,6 +295,16 @@
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="first_found_content"
|
||||
type="radio"
|
||||
class="btn-group btn-group-yesno"
|
||||
label="MOD_PERGROUP_FIRST_FOUND_CONTENT"
|
||||
description=""
|
||||
default="1">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="execution_direction"
|
||||
type="radio"
|
||||
|
@ -20,6 +20,7 @@ class perGroup
|
||||
protected $document;
|
||||
protected $jQuery_set;
|
||||
protected $params;
|
||||
protected $found = false;
|
||||
|
||||
protected $range_low = 0;
|
||||
protected $range_high = 8;
|
||||
@ -77,6 +78,10 @@ class perGroup
|
||||
$app->redirect($this->results[$field_id]);
|
||||
return true;
|
||||
}
|
||||
// if set so that not all content should be loaded, then break when firt data is found
|
||||
if($this->found && $this->params->get('first_found_content')){
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -107,6 +112,8 @@ class perGroup
|
||||
}
|
||||
// set result only if not a redirect
|
||||
$text[] = $result;
|
||||
$this->found = true;
|
||||
break;
|
||||
} else {
|
||||
// when user is not in active group
|
||||
$text[] = false;
|
||||
@ -120,6 +127,8 @@ class perGroup
|
||||
}
|
||||
// set result only if not a redirect
|
||||
$text[] = $result;
|
||||
$this->found = true;
|
||||
break;
|
||||
} else {
|
||||
// when user is not in active group
|
||||
$text[] = false;
|
||||
|
Loading…
Reference in New Issue
Block a user