Skip to content

Commit

Permalink
Dev: Correct link in warning (title change in manual)
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Nov 11, 2019
1 parent 3648e3c commit 22ae7ae
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions application/helpers/expressions/em_core_helper.php
Expand Up @@ -359,10 +359,10 @@ public function RDP_EvaluateBinary(array $token)
case '==':
case 'eq':
if($bMismatchType) {
$this->RDP_AddWarning(self::gT("This expression uses invalid comparaison. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_number_and_string_and_force_comparisons_as_string");
$this->RDP_AddWarning(self::gT("This expression uses invalid comparaison. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_between_number_and_string_and_alphabetic_comparison");
}
if($isForcedString) {
$this->RDP_AddWarning(self::gT("This expression uses alphabetical compare. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_number_and_string_and_force_comparisons_as_string");
$this->RDP_AddWarning(self::gT("This expression uses alphabetical compare. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_between_number_and_string_and_alphabetic_comparison");
}
$result = array(($arg1[0] == $arg2[0]), $token[1], 'NUMBER');
break;
Expand All @@ -373,11 +373,11 @@ public function RDP_EvaluateBinary(array $token)
case '<':
case 'lt':
if ($bMismatchType) {
$this->RDP_AddWarning(self::gT("This expression uses invalid comparaison. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_number_and_string_and_force_comparisons_as_string");
$this->RDP_AddWarning(self::gT("This expression uses invalid comparaison. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_between_number_and_string_and_alphabetic_comparison");
$result = array(false, $token[1], 'NUMBER');
} elseif(!$bBothNumeric && $bBothString) {
if($isForcedString) {
$this->RDP_AddWarning(self::gT("This expression uses alphabetical compare. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_number_and_string_and_force_comparisons_as_string");
$this->RDP_AddWarning(self::gT("This expression uses alphabetical compare. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_between_number_and_string_and_alphabetic_comparison");
}
$result = array(strcmp($arg1[0],$arg2[0]) < 0, $token[1], 'NUMBER');
} else {
Expand All @@ -387,15 +387,15 @@ public function RDP_EvaluateBinary(array $token)
case '<=';
case 'le':
if ($bMismatchType) {
$this->RDP_AddWarning(self::gT("This expression uses invalid comparaison. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_number_and_string_and_force_comparisons_as_string");
$this->RDP_AddWarning(self::gT("This expression uses invalid comparaison. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_between_number_and_string_and_alphabetic_comparison");
$result = array(false, $token[1], 'NUMBER');
} else {
// Need this explicit comparison in order to be in agreement with JavaScript
if (($arg1[0] == '0' && $arg2[0] == '') || ($arg1[0] == '' && $arg2[0] == '0')) {
$result = array(true, $token[1], 'NUMBER');
} elseif(!$bBothNumeric && $bBothString) {
if($isForcedString) {
$this->RDP_AddWarning(self::gT("This expression uses alphabetical compare. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_number_and_string_and_force_comparisons_as_string");
$this->RDP_AddWarning(self::gT("This expression uses alphabetical compare. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_between_number_and_string_and_alphabetic_comparison");
}
$result = array(strcmp($arg1[0],$arg2[0]) <= 0, $token[1], 'NUMBER');
} else {
Expand All @@ -406,15 +406,15 @@ public function RDP_EvaluateBinary(array $token)
case '>':
case 'gt':
if ($bMismatchType) {
$this->RDP_AddWarning(self::gT("This expression uses invalid comparaison. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_number_and_string_and_force_comparisons_as_string");
$this->RDP_AddWarning(self::gT("This expression uses invalid comparaison. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_between_number_and_string_and_alphabetic_comparison");
$result = array(false, $token[1], 'NUMBER');
} else {
// Need this explicit comparison in order to be in agreement with JavaScript : still needed since we use ==='' ?
if (($arg1[0] == '0' && $arg2[0] == '') || ($arg1[0] == '' && $arg2[0] == '0')) {
$result = array(false, $token[1], 'NUMBER');
} elseif(!$bBothNumeric && $bBothString) {
if($isForcedString) {
$this->RDP_AddWarning(self::gT("This expression uses alphabetical compare. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_number_and_string_and_force_comparisons_as_string");
$this->RDP_AddWarning(self::gT("This expression uses alphabetical compare. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_between_number_and_string_and_alphabetic_comparison");
}
$result = array(strcmp($arg1[0],$arg2[0]) > 0, $token[1], 'NUMBER');
} else {
Expand All @@ -425,11 +425,11 @@ public function RDP_EvaluateBinary(array $token)
case '>=';
case 'ge':
if ($bMismatchType) {
$this->RDP_AddWarning(self::gT("This expression uses invalid comparaison. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_number_and_string_and_force_comparisons_as_string");
$this->RDP_AddWarning(self::gT("This expression uses invalid comparaison. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_between_number_and_string_and_alphabetic_comparison");
$result = array(false, $token[1], 'NUMBER');
} elseif(!$bBothNumeric && $bBothString) {
if($isForcedString) {
$this->RDP_AddWarning(self::gT("This expression uses alphabetical compare. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_number_and_string_and_force_comparisons_as_string");
$this->RDP_AddWarning(self::gT("This expression uses alphabetical compare. Are you sure you didn't mean numerical compare? See manual for more information.",'unescaped'), $token, "https://manual.limesurvey.org/Expression_Manager#Warning_with_mismatch_between_number_and_string_and_alphabetic_comparison");
}
$result = array(strcmp($arg1[0],$arg2[0]) >= 0, $token[1], 'NUMBER');
} else {
Expand Down

2 comments on commit 22ae7ae

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spoke with cdorin about create some Redirect in manual. Then we can update manual part only on manual.
*
Something like CodeHelpLink_EMMismatchType for example.

@olleharstedt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, yeah.

Please sign in to comment.