summaryrefslogtreecommitdiffstats
path: root/etc/inc/voucher.inc
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-10-01 10:17:13 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-10-01 10:17:13 -0300
commitaddc0439931fb28c626c7024b1e9857adfe29f29 (patch)
treef6774da34d43b238c3a14a3a43a5b71da0a2f249 /etc/inc/voucher.inc
parent788c1288bae791ac0b3f2a19eb8c6aac8d7a7c22 (diff)
downloadpfsense-addc0439931fb28c626c7024b1e9857adfe29f29.zip
pfsense-addc0439931fb28c626c7024b1e9857adfe29f29.tar.gz
Fix quotes to use %N$X on gettext calls
Diffstat (limited to 'etc/inc/voucher.inc')
-rw-r--r--etc/inc/voucher.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc
index 58c6dc5..27e6763 100644
--- a/etc/inc/voucher.inc
+++ b/etc/inc/voucher.inc
@@ -153,7 +153,7 @@ function voucher_auth($voucher_received, $test = 0) {
list($timestamp,$minutes) = explode(",", $line);
// we have an already active voucher here.
$remaining = intval((($timestamp + 60*$minutes) - time())/60);
- $test_result[] = sprintf(gettext("%1$s (%2$s/%3$s) active and good for %4$d Minutes"), $voucher, $roll, $nr, $remaining);
+ $test_result[] = sprintf(gettext('%1$s (%2$s/%3$s) active and good for %4$d Minutes'), $voucher, $roll, $nr, $remaining);
$total_minutes += $remaining;
} else {
// voucher not used. Check if ticket Id is on the roll (not too high)
@@ -164,18 +164,18 @@ function voucher_auth($voucher_received, $test = 0) {
$pos = $nr >> 3; // divide by 8 -> octet
$mask = 1 << ($nr % 8);
if (ord($bitstring[$roll][$pos]) & $mask) {
- $test_result[] = sprintf(gettext("%1$s (%2$s/%3$s) already used and expired"), $voucher, $roll, $nr);
+ $test_result[] = sprintf(gettext('%1$s (%2$s/%3$s) already used and expired'), $voucher, $roll, $nr);
$total_minutes = -1; // voucher expired
$error++;
} else {
// mark bit for this voucher as used
$bitstring[$roll][$pos] = chr(ord($bitstring[$roll][$pos]) | $mask);
- $test_result[] = sprintf(gettext("%1$s (%2$s/%3$) good for %4$d Minutes"), $voucher, $roll, $nr, $minutes_per_roll[$roll]);
+ $test_result[] = sprintf(gettext('%1$s (%2$s/%3$) good for %4$d Minutes'), $voucher, $roll, $nr, $minutes_per_roll[$roll]);
$total_minutes += $minutes_per_roll[$roll];
}
}
} else {
- $test_result[] = sprintf(gettext("%1$s (%2$s/%3$s): not found on any registererd Roll"), $voucher, $roll, $nr);
+ $test_result[] = sprintf(gettext('%1$s (%2$s/%3$s): not found on any registererd Roll'), $voucher, $roll, $nr);
}
} else {
// hmm, thats weird ... not what I expected
@@ -339,7 +339,7 @@ function voucher_write_used_db($roll, $vdb) {
fwrite($fd, $vdb . "\n");
fclose($fd);
} else {
- voucher_log(LOG_ERR, sprintf(gettext("cant write %1$s/voucher_used_%2$s.db"), $g['vardb_path'], $roll));
+ voucher_log(LOG_ERR, sprintf(gettext('cant write %1$s/voucher_used_%2$s.db'), $g['vardb_path'], $roll));
}
}
@@ -418,7 +418,7 @@ function voucher_read_used_db($roll) {
$vdb = trim(fgets($fd));
fclose($fd);
} else {
- voucher_log(LOG_ERR, sprintf(gettext("cant read %1$s/voucher_used_%2$s.db"), $g['vardb_path'], $roll));
+ voucher_log(LOG_ERR, sprintf(gettext('cant read %1$s/voucher_used_%2$s.db'), $g['vardb_path'], $roll));
}
}
return base64_decode($vdb);
OpenPOWER on IntegriCloud