summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e0199e4)
raw | patch | inline | side by side (parent: e0199e4)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 22 Jul 2010 09:59:18 +0000 (09:59 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 22 Jul 2010 09:59:18 +0000 (09:59 +0000) |
-configRegistry wasn't loaded and thus we couldn't read properties from ldap.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19045 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19045 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/html/password.php | patch | blob | history |
index 20b9c29c95a110030753144fa28967018466b0cd..da42f14558a33264bb9f97b35303d1bc68a5cd54 100644 (file)
$smarty->assign ("logo", image(get_template_path("images/logo.png")));
$smarty->assign ("date", date("l, dS F Y H:i:s O"));
- $smarty->assign ("lang", preg_replace('/_.*$/', '', $lang));
$smarty->display(get_template_path('password.tpl'));
exit();
}
/* Parse configuration file */
$config= new config(CONFIG_DIR."/".CONFIG_FILE, $BASE_DIR);
+
+/* Generate server list */
+$servers= array();
+foreach ($config->data['LOCATIONS'] as $key => $ignored) {
+ $servers[$key]= $key;
+}
+
+if (isset($_POST['server'])) {
+ $directory= get_post('server');
+}elseif (isset($_GET['directory'])) {
+ $directory= $_GET['directory'];
+} else {
+ $directory= $config->data['MAIN']['DEFAULT'];
+ if (!isset($servers[$directory])) {
+ $directory = key($servers);
+ }
+
+}
+
+// Set location and reload the configRegistry - we've now access to the ldap.
+if(isset($servers[$directory])){
+ $config->set_current($directory);
+ $config->check_and_reload();
+ $config->configRegistry->reload(TRUE);
+}
+
session::global_set('debugLevel', $config->get_cfg_value("core","debugLevel"));
if ($_SERVER["REQUEST_METHOD"] != "POST") {
@DEBUG(
bindtextdomain($domain, LOCALE_DIR);
textdomain($domain);
-/* Generate server list */
-$servers= array();
-foreach ($config->data['LOCATIONS'] as $key => $ignored) {
- $servers[$key]= $key;
-}
-if (isset($_POST['server'])) {
- $directory= validate($_POST['server']);
-} else {
- $directory= $config->data['MAIN']['DEFAULT'];
-
- if (!isset($servers[$directory])) {
- $directory = key($servers);
- }
-}
$smarty->assign ("title","GOsa");
if (isset($_GET['directory']) && isset($servers[$_GET['directory']])) {
$smarty->assign("show_directory_chooser", false);
$method= $config->get_cfg_value("core","passwordDefaultHash");
if (isset($_GET['method'])) {
$method= validate($_GET['method']);
- $tmp = new passwordMethod($config);
+ $tmp = new passwordMethod($config, "dummy");
$available = $tmp->get_available_methods();
if (!isset($available[$method])) {
msg_dialog::display(