From: cajus Date: Tue, 15 Jan 2008 17:20:49 +0000 (+0000) Subject: Removed cli functions X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=57f2e76e3be133a19c214de209b74e76ad63ec63;p=gosa.git Removed cli functions git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8373 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/html/getldif.php b/gosa-core/html/getldif.php index ca95ba561..70cffd68c 100644 --- a/gosa-core/html/getldif.php +++ b/gosa-core/html/getldif.php @@ -76,8 +76,8 @@ $config= session::get('config'); $dn = base64_decode($_GET['dn']); $acl = $ui->get_permissions($dn,"ldapmanager/ldifexport"); if(!preg_match("/r/",$acl)){ - echo "insufficient permissions"; - exit(); + echo _("Permission denied!"); + exit(); } @@ -101,7 +101,7 @@ switch ($_GET['ivbb']){ break; default: - echo "Error in ivbb parameter. Request aborted."; + echo _("Error in ivbb parameter!"); } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> diff --git a/gosa-core/include/functions_cli.inc b/gosa-core/include/functions_cli.inc deleted file mode 100644 index 06b76211d..000000000 --- a/gosa-core/include/functions_cli.inc +++ /dev/null @@ -1,105 +0,0 @@ -\n"; - echo "Commands:\n"; - echo "\tcreate\t\tCreates an object under 'entry dn', the content\n"; - echo "\t\t\tand type is set by the -plugin option\n"; - echo "\tdelete\t\tRemoves the either the entry given by 'entry dn',\n"; - echo "\t\t\tor removes a property set by the -plugin option\n"; - echo "\tlist\t\tLists either all objects, object types given by\n"; - echo "\t\t\tthe -plugin option or a single object given by\n"; - echo "\t\t\tthe 'entry dn'. Use -list to specify the list type\n"; - echo "\tmodify\t\tModifies the entry given by 'entry dn' using\n"; - echo "\t\t\tthe object type given by the -plugin option\n"; - echo "Options:\n"; - echo "\t--location=name\tChoose the LDAP profile to work on\n"; - echo "\t--entry-dn=\tDN to perform actions on\n"; - echo "\t--entry-id=\tID to perform actions on. This option is more fuzzy\n"; - echo "\t\t\tthan the -entry-dn one. It depends on the selected plugin\n"; - echo "\t\t\tand can be i.e. an uid in case of the user plugin or a cn\n"; - echo "\t\t\tin case of a group or department\n"; - echo "\t--list=\tSpecifys the detail of the list command. Possible\n"; - echo "\t\t\tvalues are 'summary' and 'ldif'. The list command defaults\n"; - echo "\t\t\tto 'summary'\n"; - echo "\t--modifyer=\tSet the name of the person who's performing changes\n"; - echo "\t--plugin=\tSelect plugin to work with, use 'list'\n"; - echo "\t\t\tto get a list of available plugins. Every plguin\n"; - echo "\t\t\trequires one or more attributes to be set. You can\n"; - echo "\t\t\tget the list of attributes by using '-help'\n"; -} - - -function get_plugin_list($config) -{ - $plugins= array(); - foreach($config->data['MENU'] as $plugin){ - foreach ($plugin as $value){ - if (isset($value['CLASS'])){ - if (class_exists($value['CLASS'])){ - $obj= new $value['CLASS']($config, 'new'); - if (isset($obj->cli_summary)){ - $plugins[$value['CLASS']]= $obj->cli_summary; - } else { - $plugins[$value['CLASS']]= "- no description -"; - } - } - } - } - } - foreach($config->data['TABS'] as $plugin){ - foreach ($plugin as $value){ - if (isset($value['CLASS'])){ - if (class_exists($value['CLASS'])){ - $obj= new $value['CLASS']($config, 'new'); - if (isset($obj->cli_summary)){ - $plugins[$value['CLASS']]= $obj->cli_summary; - } else { - $plugins[$value['CLASS']]= "- no description -"; - } - } - } - } - } - #ksort ($plugins); - - return ($plugins); -} - - -function show_plugin_list($config) -{ - printf ("\t%-25s%s\n", "Plugin", "Description"); - $plugins= get_plugin_list($config); - foreach ($plugins as $plugin => $description){ - printf ("\t %-25s%s\n", $plugin, $description); - } -} - - -function show_plugin_help($plugin) -{ - global $config; - - $plugins= get_plugin_list($config); - if (!class_exists($plugin)){ - echo "Plugin '$plugin' does not exist\n"; - } else { - $obj= new $plugin($config, 'new'); - if (isset($obj->cli_summary)){ - echo $obj->cli_summary."\n\n"; - } - if (isset($obj->cli_description)){ - echo $obj->cli_description."\n\n"; - } - if (isset($obj->cli_parameters)){ - print_r ($obj->cli_parameters); - } else { - echo "There's no parameter description for this plugin, sorry.\n"; - } - } - -} - -?>