diff --git a/addressbook/parsecard.php b/addressbook/parsecard.php index 842cfe9fbc..5815a7e1e9 100644 --- a/addressbook/parsecard.php +++ b/addressbook/parsecard.php @@ -1,22 +1,24 @@ * + * -------------------------------------------- * + * This program is free software; you can redistribute it and/or modify it * + * under the terms of the GNU General Public License as published by the * + * Free Software Foundation; either version 2 of the License, or (at your * + * option) any later version. * + \**************************************************************************/ -/**************************************************************************\ -* phpGroupWare - addressbook * -* http://www.phpgroupware.org * -* Written by Joseph Engo * -* -------------------------------------------- * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU General Public License as published by the * -* Free Software Foundation; either version 2 of the License, or (at your * -* option) any later version. * -\**************************************************************************/ + /* $Id$ */ -/* $Id$ */ - - $phpgw_info["flags"] = array("currentapp" => "addressbook", - "enable_contact_class" => True, - "noheader" => True, "nonavbar" => True); - include("../header.inc.php"); + $phpgw_info['flags'] = array( + 'currentapp' => 'addressbook', + 'enable_contact_class' => True, + 'noheader' => True, + 'nonavbar' => True + ); + include('../header.inc.php'); //if($access == "group") // $access = $n_groups; @@ -25,6 +27,6 @@ parsevcard($filename,$access); // Delete the temp file. unlink($filename); - unlink($filename . ".info"); - Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/", "cd=14")); -?> + unlink($filename . '.info'); + Header('Location: ' . $phpgw->link('/addressbook/index.php','cd=14')); +?> \ No newline at end of file diff --git a/index.php b/index.php index 0a0cfe06d8..3b35b8ccb0 100755 --- a/index.php +++ b/index.php @@ -38,7 +38,7 @@ } } } - $phpgw->redirect($phpgw->link($phpgw_info["server"]["webserver_url"] . $phpgw_forward,$extra_vars)); + $phpgw->redirect($phpgw->link($phpgw_forward,$extra_vars)); } if (($phpgw_info["user"]["preferences"]["common"]["useframes"] && $phpgw_info["server"]["useframes"] == "allowed") @@ -54,7 +54,7 @@ )); $tpl->set_var("navbar_link",$phpgw->link("index.php","navbarframe=True&cd=yes")); if ($forward) { - $tpl->set_var("body_link",$phpgw->link($phpgw_info["server"]["webserver_url"] . $forward)); + $tpl->set_var("body_link",$phpgw->link($forward)); } else { $tpl->set_var("body_link",$phpgw->link("index.php","framebody=True&cd=yes")); } @@ -77,15 +77,12 @@ } } elseif ($cd=="yes" && $phpgw_info["user"]["preferences"]["common"]["default_app"] && $phpgw_info["user"]["apps"][$phpgw_info["user"]["preferences"]["common"]["default_app"]]) { - $phpgw->redirect($phpgw->link($phpgw_info["server"]["webserver_url"] . "/" - . $phpgw_info["user"]["preferences"]["common"]["default_app"] . "/" - . "index.php")); + $phpgw->redirect($phpgw->link('/' . $phpgw_info["user"]["preferences"]["common"]["default_app"] . "/" . "index.php")); $phpgw->common->phpgw_exit(); } else { $phpgw->common->phpgw_header(); echo parse_navbar(); } - //$phpgw->hooks->proccess("location","mainscreen"); @@ -156,7 +153,7 @@ include($phpgw_info["server"]["server_root"] . "/stocks/inc/functions.inc.php"); echo '' . return_quotes($quotes) . ''; } - $phpgw->common->hook("",array("email","calendar")); + $phpgw->common->hook('',array('email','calendar','news')); if ($phpgw_info["user"]["apps"]["addressbook"] && $phpgw_info["user"]["preferences"]["addressbook"]["mainscreen_showbirthdays"]) { echo "\n"; diff --git a/preferences/changepassword.php b/preferences/changepassword.php index 0bff84af81..f9dd26230a 100755 --- a/preferences/changepassword.php +++ b/preferences/changepassword.php @@ -1,37 +1,42 @@ * - * -------------------------------------------- * - * This program is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by the * - * Free Software Foundation; either version 2 of the License, or (at your * - * option) any later version. * - \**************************************************************************/ + /**************************************************************************\ + * phpGroupWare - preferences * + * http://www.phpgroupware.org * + * Written by Joseph Engo * + * -------------------------------------------- * + * This program is free software; you can redistribute it and/or modify it * + * under the terms of the GNU General Public License as published by the * + * Free Software Foundation; either version 2 of the License, or (at your * + * option) any later version. * + \**************************************************************************/ - /* $Id$ */ + /* $Id$ */ - $phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True); + $phpgw_info['flags'] = array( + 'noheader' => True, + 'nonavbar' => True, + 'currentapp' => 'preferences' + ); - $phpgw_info["flags"]["currentapp"] = "preferences"; - include("../header.inc.php"); + include('../header.inc.php'); - if (!$phpgw->acl->check("changepassword", 1)){ - Header("Location: index.php"); - $phpgw->common->phpgw_exit(); - } + if (! $phpgw->acl->check('changepassword', 1)) + { + Header('Location: ' . $phpgw->link('/preferences/index.php/')); + $phpgw->common->phpgw_exit(); + } - if (! $submit) { - $phpgw->common->phpgw_header(); - echo parse_navbar(); + if (! $submit) + { + $phpgw->common->phpgw_header(); + echo parse_navbar(); ?> -
"> +
- + @@ -39,7 +44,7 @@
- + @@ -47,41 +52,52 @@
- "> +

" . lang("note: This feature does *not* change your email password. This will " - . "need to be done manually.") . ""; - } - $phpgw->common->phpgw_footer(); + if ($phpgw_info['server']['auth_type'] != 'ldap') + { + echo '
' . lang('note: This feature does *not* change your email password. This will '
+ 	           	   	   . 'need to be done manually.') . '
'; + } + $phpgw->common->phpgw_footer(); -} else { - if ($n_passwd != $n_passwd_2) - $error = lang("the two passwords are not the same"); + } + else + { + if ($n_passwd != $n_passwd_2) + { + $error = lang('The two passwords are not the same'); + } - if (! $n_passwd) - $error = lang("you must enter a password"); + if (! $n_passwd) + { + $error = lang('You must enter a password'); + } - if ($error) { - echo parse_navbar(); - echo "


$error

"; - $phpgw->common->phpgw_exit(); - } + if ($error) + { + echo parse_navbar(); + echo '


' . $error . '

'; + $phpgw->common->phpgw_exit(); + } - $o_passwd = $phpgw_info["user"]["passwd"]; - $passwd_changed = $phpgw->auth->change_password($o_passwd, $n_passwd); - if (!$passwd_changed){ - // This need to be changed to show a different message based on the result - Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/preferences/","cd=38")); - }else{ - $phpgw_info["user"]["passwd"] = $phpgw->auth->change_password($o_passwd, $n_passwd); - $phpgw->accounts->sync(); - Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/preferences/","cd=18")); - } -} -?> + $o_passwd = $phpgw_info['user']['passwd']; + $passwd_changed = $phpgw->auth->change_password($o_passwd, $n_passwd); + if (! $passwd_changed) + { + // This need to be changed to show a different message based on the result + Header('Location: ' . $phpgw->link('/preferences/index.php','cd=38')); + } + else + { + $phpgw_info['user']['passwd'] = $phpgw->auth->change_password($o_passwd, $n_passwd); + $phpgw->accounts->sync(); + Header('Location: ' . $phpgw->link('/preferences/index.php','cd=18')); + } + } +?> \ No newline at end of file