summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3a5b113)
raw | patch | inline | side by side (parent: 3a5b113)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 15 Feb 2008 10:12:14 +0000 (10:12 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 15 Feb 2008 10:12:14 +0000 (10:12 +0000) |
-Use error message type.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8926 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8926 594d385d-05f5-0310-b6e9-bd551577e9d8
index d2c2b75ecdb22297666d6e0892594e80e5c1a775..db28c1f7e0d3fa89ff2addc3ff3ccd74e0daf9b5 100644 (file)
@require_once ("functions.inc");
error_reporting (0);
session::start();
+session::set('errorsAlreadyPosted',array());
/* Logged in? Simple security check */
if (!session::is_set('ui')){
index ff114f87e8d3c059f20aef1069a209c663fe876a..47a7577c2e646692fe350b50c8a00b29a680e880 100644 (file)
@require_once ("functions.inc");
error_reporting (0);
session::start();
+session::set('errorsAlreadyPosted',array());
/* Logged in? Simple security check */
if (!session::is_set('ui')){
index a1e5aaad3dacb06c8a1535d5488f10ea297473c7..5568ce7474f28d066046b216e17299928e75ea3e 100644 (file)
@require_once ("functions.inc");
error_reporting (E_ALL | E_STRICT);
session::start();
+session::set('errorsAlreadyPosted',array());
/* Logged in? Simple security check */
if (!session::is_set('ui')){
index ebc751143371682a4c3778756768db819e48794a..9c20287b85607e103148a671421fa1ea5e5c336f 100644 (file)
@require_once ("functions.inc");
error_reporting (0);
session::start();
+session::set('errorsAlreadyPosted',array());
/* Logged in? Simple security check */
if (!session::is_set('ui')){
/* Uid parameter set? */
if (!isset($_GET['dn']) || $_GET['dn'] == ""){
- msg_dialog::display(_("Internal error"), _("Missing parameters!"), ERROR_DIALOG);
- display_error_page();
+ msg_dialog::display(_("Internal error"), _("Missing parameters!"), FATAL_ERROR_DIALOG);
+ exit;
}
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
index 889bf74fefab06251b039d1983c44ceafedc7459..fcfff67fbb593b19b734ca9c3858cda4da5c02ee 100644 (file)
@require_once ("../include/php_setup.inc");
@require_once ("functions.inc");
session::start();
+session::set('errorsAlreadyPosted',array());
/* Logged in? Simple security check */
if (!session::is_set('ui')){
}
$acl = $ui->get_permissions($dn,"ldapmanager/xlsexport");
if(!preg_match("/r/",$acl)){
- echo "insufficient permissions";
+ msg_dialog::display(_("Permission denied!"),_("You are not allowed to perform this action."),FATAL_ERROR_DIALOG);
exit();
}
index 94a4fb3458692bdfdbaa323086d567158d44435a..e4cf86c7c9fa2a422d7e4c0e5fe1963deefd08b7 100644 (file)
--- a/gosa-core/html/index.php
+++ b/gosa-core/html/index.php
/* Set error handler to own one, initialize time calculation
and start session. */
session::start();
+session::set('errorsAlreadyPosted',array());
/* Destroy old session if exists.
Else you will get your old session back, if you not logged out correctly. */
index 3c60db50bfd9bf4b2efaa3f8c39ae8ae6444cac6..b75970eb62062ab48c6e59653b809e1fa359fe20 100644 (file)
/* try to start session, so we can remove userlocks,
if the old session is still available */
@session::start();
+session::set('errorsAlreadyPosted',array());
if(session::is_set('ui')){
/* Get config & ui informations */
index 2b7f3a4a777c4599d13de67f70856572a9c77eaa..7e4412085724afc392d3aa9a700be6fcf1f8e12e 100644 (file)
--- a/gosa-core/html/main.php
+++ b/gosa-core/html/main.php
/* Remember everything we did after the last click */
session::start();
+session::set('errorsAlreadyPosted',array());
session::set('limit_exceeded',FALSE);
if ($_SERVER["REQUEST_METHOD"] == "POST"){
textdomain($domain);
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $lang, "Setting language to");
+session::un_set('plist');
+
/* Prepare plugin list */
if (!session::is_set('plist')){
/* Initially load all classes */
$class_list= get_declared_classes();
foreach ($class_mapping as $class => $path){
if (!in_array($class, $class_list)){
- if (is_readable("$BASE_DIR/$path")){
- require_once("$BASE_DIR/$path");
- } else {
- echo sprintf(_("Fatal error: cannot locate file '%s' - please run '%s' to fix this"), "$BASE_DIR/$path", "<b>update-gosa</b>");
- exit;
- }
+ if (is_readable("$BASE_DIR/$path")){
+ require_once("$BASE_DIR/$path");
+ } else {
+ msg_dialog::display(_("Could not location file."),
+ sprintf(_("Fatal error: cannot locate file '%s' - please run '%s' to fix this"),
+ "$BASE_DIR/$path", "<b>update-gosa</b>"), FATAL_ERROR_DIALOG);
+ exit;
+ }
}
}
-
+
session::set('plist', new pluglist($config, $ui));
/* Load ocMapping into userinfo */
session::set('ui',$ui);
}
$plist= session::get('plist');
-
/* Check for register globals */
if (isset($global_check) && $config->data['MAIN']['FORCEGLOBALS'] == 'true'){
- echo _("FATAL: Register globals is on. GOsa will refuse to login unless this is fixed by an administrator.");
+ msg_dialog::display(
+ _("PHP configuration"),
+ _("FATAL: Register globals is on. GOsa will refuse to login unless this is fixed by an administrator."),
+ FATAL_ERROR_DIALOG);
+
new log("security","login","",array(),"Register globals is on. For security reasons, this should be turned off.") ;
session::destroy ();
- exit ();
+ exit;
}
/* Check Plugin variable */
if (is_file("$plugin_dir/main.inc")){
require_once ("$plugin_dir/main.inc");
} else {
- echo sprintf(_("FATAL: Can't find any plugin definitions for plugin '%s'!"), $plug);
+ msg_dialog::display(
+ _("Plugin"),
+ sprintf(_("FATAL: Can't find any plugin definitions for plugin '%s'!"), $plug),
+ FATAL_ERROR_DIALOG);
exit();
}
index 6e3d205a3cb10bfe4f1db203243f5b85f8c414f9..c7896deaa527201ef8f75d31db0f7de1fddef48d 100644 (file)
/* Check if CONFIG_FILE is accessible */
if (!is_readable(CONFIG_DIR."/".CONFIG_FILE)){
- echo sprintf(_("GOsa configuration %s/%s is not readable. Aborted."), CONFIG_DIR,CONFIG_FILE);
- exit();
+ msg_dialog::display("", sprintf(_("GOsa configuration %s/%s is not readable. Aborted."),CONFIG_DIR,CONFIG_FILE), FATAL_ERROR_DIALOG);
+ exit;
}
/* Parse configuration file */
/* Check for compile directory */
if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))){
- echo sprintf(_("Directory '%s' specified as compile directory is not accessible!"),
- $smarty->compile_dir);
- exit();
+ msg_dialog::display(_("Accessibility"), sprintf(_("Directory '%s' specified as compile directory is not accessible!"),
+ $smarty->compile_dir), FATAL_ERROR_DIALOG);
+ exit;
}
/* Check for old files in compile directory */
$tmp = new passwordMethod($config);
$available = $tmp->get_available_methods();
if (!isset($available[$method])){
- echo _("Error: Password method not available!");
+ msg_dialog::display(_("Password method"),_("Error: Password method not available!"),FATAL_ERROR_DIALOG);
exit;
}
}
index 77454483a136098816abe55d9170efefd668fc5b..d513ec88449c5bc5daec1d80cbc952056f37310b 100644 (file)
--- a/gosa-core/html/setup.php
+++ b/gosa-core/html/setup.php
/* Start session */
session::start();
session::set('DEBUGLEVEL',1);
+session::set('errorsAlreadyPosted',array());
/* Check for js */
if (!isset($_GET['js']) && !session::is_set('js')){