[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: www/areas/l10n/teams/fr
From: Frédéric Sheedy <sheedf () gmail ! com>
Date: 2011-07-22 19:54:40
Message-ID: 20110722195440.37DD2AC867 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1242774 by sheedy:
Patch a PHP Notice for LEFT & RIGHT MARKER, Notice of falsePositive when is not set \
and make highlightRules var as int (not as object) for mb_substr
M +9 -4 pology-errors.php
--- trunk/www/areas/l10n/teams/fr/pology-errors.php #1242773:1242774
@@ -5,11 +5,17 @@
ini_set("memory_limit","128M");
include_once("functions.inc.php");
+ define('LEFT_MARKER', "#{");
+ define('RIGHT_MARKER', "}#");
+ if (isset($_POST['falsePositive'])) {
$falsePositive = $_POST["falsePositive"];
if ($falsePositive==true) {
$falsePositiveResult = reportFalsePositive();
}
+ } else {
+ $falsePositive = false;
+ }
//Little function to test that the user is not a bot
@@ -258,15 +264,14 @@
}
function highlightRulesError($message, $highlights) {
- define(LEFT_MARKER, "#{");
- define(RIGHT_MARKER, "}#");
+
// Important : The reading must be from last to begin, because adding marker will \
modify error indexes. // So each error has to be added from the last error to the \
first, to NEVER modify indexes. // Another problem is that crossing errors could \
not work with this system. for ($i = count($highlights) - 1 ; $i>=0 ; $i--) {
- $start = $highlights[$i][0];
- $end = $highlights[$i][1];
+ $start = (int)$highlights[$i][0];
+ $end = (int)$highlights[$i][1];
$left = mb_substr($message, 0, $start, 'UTF-8');
//echo "Left=$start : [" . $left . "] " . mb_strlen($left). " \n";
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic