summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b4e48f2)
raw | patch | inline | side by side (parent: b4e48f2)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 7 Nov 2006 11:21:27 +0000 (11:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 7 Nov 2006 11:21:27 +0000 (11:21 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5032 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/environment/class_environment.inc | patch | blob | history | |
plugins/personal/environment/environment.tpl | patch | blob | history |
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index 940c63a729053a4f05cf657e34aeeac780569d1d..05d04b8d69a136f92802db251374bd5951ba49ca 100644 (file)
/* Call parent execute */
plugin::execute();
+ /* Are we editing from MyAccount and not editing a user */
+ $WriteOnly = (!isset($this->parent)|| !$this->parent) && !isset($_SESSION['edit']);
+
+ /* 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 */
+ $new = key($this->gotoProfileServers);
+
+ /* Another profile server found */
+ print_red(sprintf(_("Your selected profile server '%s' is no longer available. Setting profile server to '%s'."),
+ $this->gotoProfileServer,$new));
+ }else{
+
+ /* No other profile servers found */
+ print_red(sprintf(_("Your selected profile server '%s' is no longer available. Profile server configuration is resetted."),
+ $this->gotoProfileServer));
+ $this->gotoProfileServer = "";
+ }
+ }
+ }
+
$this->detect_grouptype();
/* Fill templating stuff */
$smarty->assign("is_group",$this->is_group);
- /* Are we editing from MyAccount and not editing a user */
- $WriteOnly = (!isset($this->parent)|| !$this->parent) && !isset($_SESSION['edit']);
-
/* Prepare all variables for smarty */
foreach($this->attributes as $s_attr){
/* Set value*/
}else{
$smarty->assign("useProfileCHK"," checked ");
}
-
-
+
+ $smarty->assign("gotoProfileServerWriteable", $this->acl_is_writeable("gotoProfileServer",$WriteOnly));
$smarty->assign("gotoProfileACL", $this->getacl("gotoProfileServer",$WriteOnly).$this->getacl("gotoProfileQuota",$WriteOnly));
/* HANDLE Profile Settings here
diff --git a/plugins/personal/environment/environment.tpl b/plugins/personal/environment/environment.tpl
index 1dc24115b50d42d75e7b7e8fa758bb70c292fe2c..2763b7e4fe7479097c9fcdef1017deb6b5370c02 100644 (file)
</td>
<td>
{render acl=$gotoProfileServerACL}
+
+{if $gotoProfileServerWriteable}
<select id="gotoProfileServer" name="gotoProfileServer">
{html_options values=$gotoProfileServerKeys output=$gotoProfileServers selected=$gotoProfileServer}
<option disabled> </option>
</select>
+{else}
+ <select id="gotoProfileServer" name="gotoProfileServer">
+ {html_options values=$gotoProfileServer output=$gotoProfileServer selected=$gotoProfileServer}
+ <option disabled> </option>
+ </select>
+{/if}
{/render}
</td>
</tr>