summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 53f2cc4)
raw | patch | inline | side by side (parent: 53f2cc4)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 14 Sep 2011 14:06:04 +0000 (14:06 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 14 Sep 2011 14:06:04 +0000 (14:06 +0000) |
r20963 | hickert | 2011-07-27 10:37:04 +0200 (Wed, 27 Jul 2011) | 2 lines
Fixed error message when the class.cache is missing
r20967 | cajus | 2011-08-16 11:30:16 +0200 (Tue, 16 Aug 2011) | 2 lines
Fixed license address
r20973 | hickert | 2011-08-24 09:59:42 +0200 (Wed, 24 Aug 2011) | 3 lines
Updated class password to only generate proposals when they are needed.
r20975 | hickert | 2011-09-01 08:58:28 +0200 (Thu, 01 Sep 2011) | 2 lines
Fixed samba hash generation - error handling.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.7@20980 594d385d-05f5-0310-b6e9-bd551577e9d8
Fixed error message when the class.cache is missing
r20967 | cajus | 2011-08-16 11:30:16 +0200 (Tue, 16 Aug 2011) | 2 lines
Fixed license address
r20973 | hickert | 2011-08-24 09:59:42 +0200 (Wed, 24 Aug 2011) | 3 lines
Updated class password to only generate proposals when they are needed.
r20975 | hickert | 2011-09-01 08:58:28 +0200 (Thu, 01 Sep 2011) | 2 lines
Fixed samba hash generation - error handling.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.7@20980 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/COPYING b/gosa-core/COPYING
index ba4e0c63b373b789ca095f5fe97d3097989414b4..d8cf7d463e2a4f064a157fa994bb394d3623b9cc 100644 (file)
--- a/gosa-core/COPYING
+++ b/gosa-core/COPYING
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
+the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
The precise terms and conditions for copying, distribution and
modification follow.
-
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
-
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
-
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
-
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
index 22670325a322509c57f3c9a8fed9e99d8d96f171..d14308bcb45988897ccb484c7606655a47c14ebe 100644 (file)
define('DES3_CBC_SHA1',16);
/* Include required files */
-require_once("class_location.inc");
+include_once("class_location.inc");
require_once ("functions_debug.inc");
require_once ("accept-to-gettext.inc");
@@ -2890,9 +2890,14 @@ function change_password ($dn, $password, $mode=FALSE, $hash= "", $old_password
$attrs= array();
if (!$mode && !empty($tmp)){
$attrs= generate_smb_nt_hash($password);
- $shadow = (isset($attrs["shadowLastChange"][0]))?(int)(date("U") / 86400):0;
- if ($shadow != 0){
- $attrs['shadowLastChange']= $shadow;
+ if(!count($attrs) || !is_array($attrs)){
+ msg_dialog::display(tr("Error"),tr("Cannot generate SAMBA hash!"),ERROR_DIALOG);
+ return(FALSE);
+ }else{
+ $shadow = (isset($attrs["shadowLastChange"][0]))?(int)(date("U") / 86400):0;
+ if ($shadow != 0){
+ $attrs['shadowLastChange']= $shadow;
+ }
}
}
$hash = $rpc->mksmbhash($password);
if(!$rpc->success()){
msg_dialog::display(_("Error"),msgPool::rpcError($rpc->get_error()),ERROR_DIALOG);
- return("");
+ return(array());
}
}elseif ($config->get_cfg_value("core","gosaSupportURI") != ""){
if ($hash == "") {
msg_dialog::display(_("Configuration error"), sprintf(_("Generating SAMBA hash by running %s failed: check %s!"), bold($config->get_cfg_value("core",'sambaHashHook'), bold("sambaHashHook"))), ERROR_DIALOG);
- return ("");
+ return(array());
}
}
$label= null;
// Bail out, if there's no style file
+ if(!class_exists('session')){
+ return "";
+ }
if(!session::global_is_set("img-styles")){
// Get theme
index 258c467c9065c98eeb990432e7a79eaf210feaf5..8dd1005e1c04af0183335feb96589254c94b2f1f 100644 (file)
"\n\n".
"*** PHP error information ***\n\n");
}
-
- if (session::is_set('js') && session::get('js')==FALSE){
+
+
+ if (class_exists('session') && session::is_set('js') && session::get('js')==FALSE){
$error_collector= "<div>";
} else {
+
+ $warning_image = (is_callable('image')) ?
+ image('images/toolbar-warning.png') : "<image src='images/toolbar-warning.png' border=0>";
+ $mailto_image = (is_callable('image')) ?
+ image('images/mailto.png') : "<image src='images/mailto.png' border=0>";
+
$error_collector= "
<table summary=\"\" class='error-collector'>
<tr>
- <td style='width:32px'>".image('images/toolbar-warning.png')."</td>
+ <td style='width:32px'>{$warning_image}</td>
<td><span>"._("Generating this page caused the PHP interpreter to raise some errors!")."</span></td>
<td align='right'>
<a href=\"mailto:gosa-bugs@oss.gonicus.de?subject=GOsa%20bugreport&body=%BUGBODY%\">
- ".image('images/mailto.png')." "._("Send bug report")."
+ {$mailto_image} "._("Send bug report")."
</a>
</td>
<td align='right'>
diff --git a/gosa-core/plugins/personal/password/class_password.inc b/gosa-core/plugins/personal/password/class_password.inc
index 8bdf26fd6334e52fd4c2aa3870e6290e9d3e9d07..df056069a208217c2a050b75408712b1fa1031b0 100644 (file)
var $proposal = "";
var $proposalEnabled = FALSE;
var $proposalSelected = FALSE;
+ var $proposalInitialized = FALSE;
var $forcedHash = NULL;
function password(&$config, $dn= NULL, $parent= NULL)
{
plugin::plugin($config, $dn, $parent);
-
- // Try to generate a password proposal, if this is successfull
- // then preselect the proposal usage.
- $this->refreshProposal();
- if($this->proposal != ""){
- $this->proposalSelected = TRUE;
- }
}
$smarty = get_smarty();
$ui = get_userinfo();
+
+ // Try to generate a password proposal, if this is successfull
+ // then preselect the proposal usage.
+ if(!$this->proposalInitialized){
+ $this->refreshProposal();
+ if($this->proposal != ""){
+ $this->proposalSelected = TRUE;
+ }
+ $this->proposalInitialized = TRUE;
+ }
+
/* Get acls */
$password_ACLS = $ui->get_permissions($ui->dn,"users/password");
$smarty->assign("ChangeACL" , $password_ACLS);