Rework log and message helpers to be parallel, but separate.

1) they now have their own matching severity constants
2) they both have convenience functions success(), info(), warning() and error()
3) they both have severity_class()
This commit is contained in:
Bharat Mediratta
2008-12-25 23:43:44 +00:00
parent 847d42682d
commit 2c91a7e9ce
12 changed files with 160 additions and 42 deletions
+2 -2
View File
@@ -21,8 +21,8 @@ class Logout_Controller extends Controller {
public function index() {
$user = user::active();
user::logout();
log::add("user", "User $user->name logged out",
log::INFO, html::anchor("user/$user->id", $user->name));
log::info("user", sprintf(_("User %s logged out"), $user->name),
html::anchor("user/$user->id", $user->name));
if ($this->input->get("continue")) {
url::redirect($this->input->get("continue"));
}