backported r28437-9

This commit is contained in:
Ralf Becker 2009-11-20 15:10:00 +00:00
parent 30cceec6dc
commit 0b92c1f204
3 changed files with 32 additions and 4 deletions

View File

@ -31,7 +31,7 @@ else
// this is kind of a hack, as the autocreate_session_callback can not change the type of the loaded account-class
// so we need to make sure the right one is loaded by setting the domain before the header gets included.
$arg0s = explode(',',@array_shift($arguments));
@list(,$_GET['domain']) = explode('@',$arg0s[0]);
@list(,$_REQUEST['domain']) = explode('@',$arg0s[0]);
if (ini_get('session.save_handler') == 'files' && !is_writable(ini_get('session.save_path')) && is_dir('/tmp') && is_writable('/tmp'))
{

View File

@ -252,14 +252,13 @@ class admin_cmd_change_account_id extends admin_cmd
if (!$where) $where = array();
$where[] = "$column IS NOT NULL";
$where[] = "$column != ''";
$db->select($table,'DISTINCT '.$column,$where,__LINE__,__FILE__);
$change = array();
while(($row = $db->row(true)))
foreach($db->select($table,'DISTINCT '.$column,$where,__LINE__,__FILE__) as $row)
{
$ids = explode(',',$old_ids=$row[$column]);
foreach($ids as $key => $id)
{
if (isset($account_id2change[$id])) $ids[$key] = $account_id2change[$id];
if (isset($ids2change[$id])) $ids[$key] = $ids2change[$id];
}
$ids = implode(',',$ids);
if ($ids != $old_ids)

View File

@ -1,6 +1,35 @@
<!-- BEGIN form -->
{error_messages}
<script>
var email_set=0;
function check_account_email(id)
{
account = document.getElementById('account').value;
firstname = document.getElementById('firstname').value;
lastname = document.getElementById('lastname').value;
email = document.getElementById('email').value;
if (!email || email_set || id == 'account')
{
xajax_doXMLHTTP('admin.uiaccounts.ajax_check_account_email',firstname,lastname,account,{account_id},email_set ? '' : email,id);
email_set = !email || email_set;
}
}
function check_password(id)
{
password = document.getElementById('password').value;
password2 = document.getElementById('password2').value;
if (password && (password2 || id == 'password2') && password != password2)
{
alert('{lang_passwds_unequal}');
document.getElementById('password2').focus();
return false;
}
return true;
}
</script>
<form method="POST" action="{form_action}">
<div align="center">
<table border="0" width="95%">