- a leading 0 in $_GET['owner'] allows to exactly the the following owners (without that only owner of the same type as the first owner get changed)

- if no account select, add an extra "None" to the account-selection
This commit is contained in:
Ralf Becker 2006-09-25 08:50:02 +00:00
parent 2bbebeeb50
commit 977fadb8b5

View File

@ -284,6 +284,12 @@ class uical
{
// only change the owners of the same resource-type as given in set_state[owner]
$set_owners = explode(',',$set_states['owner']);
if ((string)$set_owners[0] === '0') // set exactly the specified owners (without the 0)
{
$set_states['owner'] = substr($set_states['owner'],2);
}
else // change only the owners of the given type
{
$res_type = is_numeric($set_owners[0]) ? false : $set_owners[0]{0};
$owners = explode(',',$states['owner'] ? $states['owner'] : $default);
foreach($owners as $key => $owner)
@ -299,6 +305,7 @@ class uical
}
$set_states['owner'] = implode(',',$owners);
}
}
// for the uiforms class (eg. edit), dont store the (new) owner, as it might change the view
if (substr($_GET['menuaction'],0,16) == 'calendar.uiforms')
{
@ -666,6 +673,7 @@ class uical
{
if (is_numeric($owner)) $accounts[] = $owner;
}
if (!$accounts) $grants[''] = lang('None');
$file[] = array(
'text' => "
<script type=\"text/javascript\">