<?php
/***************************************************************************
- * Copyright (C) 2003-2009 Polytechnique.org *
+ * Copyright (C) 2003-2010 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
$sessionclass = PL_SESSION_CLASS;
$session = new $sessionclass();
if (!$session->startAvailableAuth()) {
- Platal::page()->trigError('Données d\'authentification invalide.');
+ Platal::page()->trigError("Données d'authentification invalides.");
}
$modules = func_get_args();
}
}
+ public static function assert($cond, $error, $userfriendly)
+ {
+ global $globals;
+ if ($cond === false) {
+ header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error');
+ $file = fopen($globals->spoolroot . '/spool/tmp/assert_erros', 'a');
+ fwrite($file, '<pre>' . pl_entities($error) . '</pre>\n');
+ fclose($file);
+
+ Platal::page()->kill($userfriendly);
+ }
+ }
+
+
static public function &page()
{
global $platal;