summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 29e28e0)
raw | patch | inline | side by side (parent: 29e28e0)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Jul 2008 12:43:38 +0000 (12:43 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Jul 2008 12:43:38 +0000 (12:43 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11496 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/personal/environment/class_environment.inc | patch | blob | history | |
gosa-plugins/goto/personal/environment/environment.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto/personal/environment/class_environment.inc b/gosa-plugins/goto/personal/environment/class_environment.inc
index f3a1d06eaa3855b8e40133fd0b00638bceba3a4e..21ecc93f1c30e79d147cb8f5ffebc383bf37ab4a 100644 (file)
$this->gotoProfileServers= $config->getShareServerList() ;
$this->gotoShareSelections= $config->getShareList(true);
$this->gotoAvailableShares= $config->getShareList(false);
+
+ /* Ensure that a currently selected server will stay selected, even if the list of profile servers
+ is empty due to insufficient permissions.
+ */
+ if(count($this->gotoProfileServers) && !empty($this->gotoProfileServer)){
+
+ /* The currently selected profile server is outdated/no longer available */
+ if(!isset($this->gotoProfileServers[$this->gotoProfileServer])){
+ }else{
+ $c = $this->gotoProfileServers[$this->gotoProfileServer];
+ if(!preg_match("/r/",$c['ACL'])){
+
+ /* We are not allowed to read to currently selected server.
+ But to ensure that the selection will be kept after saving the account, we
+ override the current ACL tag.
+ */
+ $this->gotoProfileServers[$this->gotoProfileServer]['ACL'] .= "r";
+ }
+ }
+ }
$this->update_kiosk_profiles();
}
/* Check profile server */
if($this->acl_is_writeable("gotoProfileServer",$WriteOnly)){
+
if(!empty($this->gotoProfileServer) && !isset($this->gotoProfileServers[$this->gotoProfileServer])){
+
+
if(count($this->gotoProfileServers)){
/* Get First Profile */
if(!is_array($this->gotoProfileServers)){
$this->gotoProfileServers =array();
}
- $smarty->assign("gotoProfileServerKeys",array_flip($this->gotoProfileServers));
/* Handle kiosk profiles*/
$smarty->assign("kiosk_servers" , $this->gotoKioskProfiles['SERVERS']);
diff --git a/gosa-plugins/goto/personal/environment/environment.tpl b/gosa-plugins/goto/personal/environment/environment.tpl
index afb1f64dcaf29fb803630b113796923d3330fd32..d1ed3aa35ae96c024c057c760ef9da1b16354aaf 100644 (file)
<br>
{render acl=$gotoProfileServerACL checkbox=$multiple_support checked=$use_gotoProfileServer}
{t}Profil path{/t}
- <select id="gotoProfileServer" name="gotoProfileServer">
- {html_options values=$gotoProfileServerKeys output=$gotoProfileServers selected=$gotoProfileServer}
- </select>
+ <select id="gotoProfileServer" name="gotoProfileServer">
+ {foreach from=$gotoProfileServers key=key item=item}
+ <option {if $gotoProfileServer == $key} selected {/if}value='{$key}'>{$item.DISPLAY}</option>
+ {/foreach}
+ <option disabled> </option>
+ </select>
{/render}
<br>
{render acl=$gotoProfileQuotaACL checkbox=$multiple_support checked=$use_gotoProfileQuota}
{if $gotoProfileServerWriteable}
<select id="gotoProfileServer" name="gotoProfileServer">
- {html_options values=$gotoProfileServerKeys output=$gotoProfileServers selected=$gotoProfileServer}
+ {foreach from=$gotoProfileServers key=key item=item}
+ <option {if $gotoProfileServer == $key} selected {/if}value='{$key}'>{$item.DISPLAY}</option>
+ {/foreach}
<option disabled> </option>
</select>
{else}
- <select id="gotoProfileServer" name="gotoProfileServer">
- {html_options values=$gotoProfileServer output=$gotoProfileServer selected=$gotoProfileServer}
- <option disabled> </option>
+ <select id="dummy_pS" name="dummy_pS" disabled >
+ <option >{$gotoProfileServer}</option>
</select>
{/if}
{/render}