<?php
/***************************************************************************
- * Copyright (C) 2003-2007 Polytechnique.org *
+ * Copyright (C) 2003-2008 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
if (substr($cls, -3, 3) == 'req') {
@include 'validations.inc.php';
return;
+ } else if (substr($cls, 0, 6) == 'banana') {
+ require_once 'banana/banana.inc.php';
+ Banana::load(substr($cls, 6));
+ return;
}
@include "$cls.inc.php";
}
E_USER_ERROR => "User Error",
E_USER_WARNING => "User Warning",
E_USER_NOTICE => "User Notice",
- E_STRICT => "Runtime Notice"
+ E_STRICT => "Runtime Notice",
+ E_RECOVERABLE_ERROR => "Recoverable Error"
);
}
}
}
+ $type = isset($errortype[$errno]) ? $errortype[$errno] : $errno;
$errstr = utf8_encode(htmlentities($errstr));
$GLOBALS['pl_errors'][] =
"<div class='phperror'>".
- "<strong>{$errortype[$errno]}</strong> <em>$errstr</em><br />".
+ "<strong>{$type}</strong> <em>$errstr</em><br />".
"<tt>$errfile : $errline</tt>".
"</div>";
}
// la rfc2822 authorise les caractères "a-z", "0-9", "!", "#", "$", "%", "&", "'", "*", "+", "-", "/", "=", "?", "^", `", "{", "|", "}", "~" aussi bien dans la partie locale que dans le domaine.
// Pour la partie locale, on réduit cet ensemble car il n'est pas utilisé.
// Pour le domaine, le système DNS limite à [a-z0-9.-], on y ajoute le "_" car il est parfois utilisé.
- return preg_match("/^[a-z0-9_.'+-]+@[a-z0-9._-]+\.[a-z]{2,4}$/i", $email);
+ return preg_match("/^[a-z0-9_.'+-]+@[a-z0-9._-]+\.[a-z]{2,6}$/i", $email);
}
function pl_url($path, $query = null, $fragment = null)