summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5b1032e)
raw | patch | inline | side by side (parent: 5b1032e)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 16 Jan 2008 16:12:10 +0000 (16:12 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 16 Jan 2008 16:12:10 +0000 (16:12 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8403 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_pluglist.inc | patch | blob | history | |
gosa-core/include/functions.inc | patch | blob | history |
index 1bce72412cde395a2f2e62debd017436dc7636dd..87dcd769368812892d2e5496fbea44c3817a496a 100644 (file)
if(count($this->headlines) == 0){
foreach($this->config->data['MENU'] as $headline => $plugins){
foreach( $plugins as $id => $plug){
- $attrs = (get_class_vars($plug['CLASS']));
- $ret[$id]['HEADLINE'] = $headline;
- $ret[$id]['NAME'] = $attrs['plHeadline'];
+ if (plugin_available($plug['CLASS'])){
+ $attrs = (get_class_vars($plug['CLASS']));
+ $ret[$id]['HEADLINE'] = $headline;
+ $ret[$id]['NAME'] = $attrs['plHeadline'];
+ }
}
}
$this->headlines = $ret;
msg_dialog::display(_("Configuration error"), _("The configuration format has changed. Please re-run setup!"), ERROR_DIALOG);
display_error_page();
}
+ if (!plugin_available($info['CLASS'])){
+ continue;
+ }
$vars= get_class_vars($info['CLASS']);
$plHeadline= $vars['plHeadline'];
$plDescription= $vars['plDescription'];
foreach ($plug as $info){
+ if (!plugin_available($info['CLASS'])){
+ continue;
+ }
+
/* Read information from class variable */
$vars= get_class_vars($info['CLASS']);
$plHeadline= $vars['plHeadline'];
index 3ab7a405346f19d3c70c4ecef361737817333310..b1123007da4c49a16803f2ff4fc2a7910b41ea16 100644 (file)
if (isset($class_mapping[$class_name])){
require_once($BASE_DIR."/".$class_mapping[$class_name]);
} else {
- echo _("Fatal: cannot load class \"$class_name\" - execution aborted");
+ echo sprintf(_("Fatal error: cannot load class '%s' - execution aborted"), $class_name);
+ print_a(debug_backtrace());
+ exit;
}
}
+/* Check if plugin is avaliable */
+function plugin_available($plugin)
+{
+ global $class_mapping, $BASE_DIR;
+
+ if (!isset($class_mapping[$plugin])){
+ return false;
+ } else {
+ return file_exists($BASE_DIR."/".$class_mapping[$plugin]);
+ }
+}
+
+
/* Create seed with microseconds */
function make_seed() {
list($usec, $sec) = explode(' ', microtime());