Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
- #695: More details about payments -FRU
- #719: More consistent subscription count -FRU
-
From 0.9.14 branch:
* Payment:
continue;
}
$lev = levenshtein($key, $k);
+
if ((!isset($val) || $lev < $val) && $lev <= (strlen($k)*2)/3) {
$val = $lev;
$best = $k;
}
if (!isset($best) && $has_end) {
return "#final#";
- } else {
+ } else if (isset($best)) {
return $best;
}
return null;
{
$hooks = array();
foreach ($this->__hooks as $hook=>$handler) {
- if (!empty($handler['perms']) && $handler['perms'] != S::v('perms')) {
+ if (!$this->check_perms($handler['perms'])) {
continue;
}
$parts = split('/', $hook);