summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6a37d26)
raw | patch | inline | side by side (parent: 6a37d26)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 6 Dec 2006 05:18:39 +0000 (05:18 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 6 Dec 2006 05:18:39 +0000 (05:18 +0000) |
Added some infos to snapshot template
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5306 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5306 594d385d-05f5-0310-b6e9-bd551577e9d8
index 7732258a341edba307588301aa6bd3b734523609..1fc7cff7883d9feccb0c70a55563f7ce5a91b531 100755 (executable)
<br>
{t}This procedure will restore a snapshot of the selected object. It will replace the existing object after pressing the restore button.{/t}
<br>
+<br>
+{t}Remember that DNS configuration and database entries could not be restored. For some objects it is only nescessary to open and save them again (goFon), but some entries must be recreated manually (glpi).{/t}
+<br>
+<br>
+{t}Don't forget to check references to other objects, for example does the selected printer still exists ?{/t}
+<br>
<p class="seperator"> </p>
<br>
<table summary="" style="width:100%">
{t}This procedure will create a snapshot of the selected object. It will be stored inside a special branch of your directory system and can be restored later on.{/t}
<br>
<br>
-{t}Remember that the DNS configurations for this entry and possibly created zones in server extensions will not be stored in the snapshot.{/t}
+{t}Remember that database entries, DNS configurations and possibly created zones in server extensions will not be stored in the snapshot.{/t}
<br>
<p class="seperator"> </p>
<br>
diff --git a/plugins/gofon/conference/class_divListConferences.inc b/plugins/gofon/conference/class_divListConferences.inc
index 339d561aed4d4f6fd36f4cf4fdd5f1670e7da021..3251d6eab2c401cb4ec35f18a0ba29bd88d81f94 100755 (executable)
function divListConference ($config,$parent)
{
- MultiSelectWindow::MultiSelectWindow($config,"Conferences", "gofon");
+ MultiSelectWindow::MultiSelectWindow($config,"Conferences", "gofonconference");
$this->parent = $parent;
$this->ui = get_userinfo();
$this->AddRegex ("Regex", _("Regular expression for matching conference names"),"*" , true);
}
+
function GenHeader()
{
/* Prepare departments,
array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH);
/* Load possible departments */
- $ui= get_userinfo();
- $tdeps= $ui->get_module_departments("gofon");
- $ids = $this->config->idepartments;
+ $ui = get_userinfo();
+ $tdeps = $ui->get_module_departments("gofonconference");
+ $ids = $this->config->idepartments;
foreach($deps as $dep){
if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){
}
}
- $acls = $ui->get_permissions($this->selectedBase,"gofon/conference");
+ /* Get acls */
+ $acls = $ui->get_permissions($this->selectedBase,"gofonconference/conference");
+ $acl_all = $ui->has_complete_category_acls($this->selectedBase,"gofonconference") ;
/* NEW LIST MANAGMENT */
$listhead = "<div style='background:#F0F0F9;padding:5px;'>".
}
/* Only display snapshot settings if we are able to write && create new entries */
- if(preg_match("/[cw]/",$acls)){
+ if(preg_match("/(c.*w|w.*c)/",$acl_all)){
$listhead .= $this->get_snapshot_header($this->selectedBase);
}
/* Insert conferneces*/
foreach($list as $conferencekey => $conference ){
- $acl = $this->ui -> get_permissions($conference['dn'],"gofon/conference");
+ $acl = $this->ui->get_permissions($conference['dn'],"gofonconference/conference");
+ $acl_all = $this->ui->has_complete_category_acls($conference['dn'],"gofonconference");
/* You will need at least read access for the
current conference informations to display it */
alt='"._("edit")."' name='conf_edit_%KEY%' title='"._("Edit this entry")."'>";
/* Add snapshot icon - This is allowed when we have create and write access for the current entry */
- if(preg_match("/[cw]/",$acl)){
+ if(preg_match("/(c.*w|w.*c)/",$acl_all)){
$actions.= $this->GetSnapShotActions($conference['dn']);
}
/* Display PIN icon, only if we are the owner of the given conference */
$owner = $this->parent->ui->dn==$conference['goFonConferenceOwner'][0];
- $p_acl = $this->ui->get_permissions($conference['dn'],"gofon/conference","goFonPIN");
+ $p_acl = $this->ui->get_permissions($conference['dn'],"gofonconference/conference","goFonPIN");
if((isset($conference['goFonPIN'][0])) && $owner && preg_match("/r/",$p_acl)){
$pin = "<img class='center' src='images/list_password.png' title='PIN : ".$conference['goFonPIN'][0]."' alt='PIN'>";
}else{
}
/* Display numer of the conference if we are allowed to view it */
- $n_acl = $this->ui->get_permissions($conference['dn'],"gofon/conference","telephoneNumber");
+ $n_acl = $this->ui->get_permissions($conference['dn'],"gofonconference/conference","telephoneNumber");
if(isset($conference['telephoneNumber'][0]) && preg_match("/r/",$n_acl)){
$number = " - ".$conference['telephoneNumber'][0];
}else{
diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc
index ef9f91ca14a980d0cd17fc75594c6b45c9f966f6..7c8d6c1ff9c2d912246d1edd54e6956c51112151 100644 (file)
/* Save data to object */
function save_object()
{
- if(isset($_POST['cn'])){
+ if(isset($_POST['phoneConferenceGeneric'])){
plugin::save_object();
"plDepends" => array(),
"plPriority" => 0,
"plSection" => array("addons" => _("Addons")),
- "plCategory" => array("gofon" => array("description" => _("GOfon"),
+ "plCategory" => array("gofonconference" => array("description" => _("GOfon conference"),
"objectClass" => "gofonConference")),
"plProvidedAcls" => array(
diff --git a/plugins/gofon/conference/class_phoneConferenceManagment.inc b/plugins/gofon/conference/class_phoneConferenceManagment.inc
index 58ee81d325736e4ec41aac9d2da98c76b6572ae2..4084ebb9fc5a97a88b4e14b70be6109314682464 100644 (file)
*/
if ($s_action =="del"){
- $acl = $this->ui->get_permissions($this->conferences[$s_entry]['dn'],"gofon/conference");
+ $acl = $this->ui->get_permissions($this->conferences[$s_entry]['dn'],"gofonconference/conference");
if(preg_match("/d/",$acl)){
$this->dn= $this->conferences[$s_entry]['dn'];
* Finally delete department
*/
if (isset($_POST['delete_department_confirm'])){
- $acl = $this->ui->get_permissions($this->dn,"gofon/conference");
+ $acl = $this->ui->get_permissions($this->dn,"gofonconference/conference");
if(preg_match("/d/",$acl)){
$this->remove_from_parent();
gosa_log ("Department object'".$this->dn."' has been removed");
add_lock ($this->dn, $this->ui->dn);
/* Register conftab to trigger edit dialog */
- $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn,"gofon");
+ $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn,"gofonconference");
$this->conftab->set_acl_base($this->dn);
$_SESSION['objectinfo']= $this->dn;
}
if($s_action == "new" ){
$dummy_dn = "cn=dummy,ou=conferences,ou=asterisk,ou=configs,ou=systems,".$this->DivListConference->selectedBase;
- $acl = $this->ui->get_permissions($dummy_dn,"gofon/conference");
+ $acl = $this->ui->get_permissions($dummy_dn,"gofonconference/conference");
if(preg_match("/c/",$acl)){
/* Set up the users ACL's for this 'dn' */
$this->dn= "new";
- $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn,"gofon");
+ $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn,"gofonconference");
$this->conftab->set_acl_base($dummy_dn);
unset($_SESSION['objectinfo']);
}
$Flags |= GL_SUBSEARCH;
}
- $this->conferences= get_list($Filter, "gofon", $Base, $Attrs, $Flags);
+ $this->conferences= get_list($Filter, "gofonconference", $Base, $Attrs, $Flags);
}
function remove_from_parent()
/* Ehm what are we doinf here ? */
$cfg = new conference($this->config, $this->dn);
- $cfg->set_acl_category("gofon");
+ $cfg->set_acl_category("gofonconference");
$cfg->set_acl_base($this->dn);
$cfg->remove_from_parent();
index 75548aca23d2e799d6893302724b7f1535b02b4b..5ba587b0a013fff9ee8ef11af4426e518134c5f2 100644 (file)
</tr>
</table>
+<input type='hidden' name='phoneConferenceGeneric' value='1'>
+
<!-- Place cursor -->
<script language="JavaScript" type="text/javascript">
<!-- // First input field on page
diff --git a/plugins/gofon/macro/class_divListMacros.inc b/plugins/gofon/macro/class_divListMacros.inc
index 68dce0468493810ac032ebac74f0ba2a529290c3..bf85a22b75557cf04a51704c6e0bbb171ea89fd3 100755 (executable)
function divListMacro ($config,$parent)
{
- MultiSelectWindow::MultiSelectWindow($config,"Macros", "gofon");
+ MultiSelectWindow::MultiSelectWindow($config,"Macros", "gofonmacro");
$this->parent = $parent;
$this->ui = get_userinfo();
/* Load possible departments */
$ui= get_userinfo();
- $tdeps= $ui->get_module_departments("groups");
+ $tdeps= $ui->get_module_departments("gofonmacro");
$ids = $this->config->idepartments;
}
}
- $acls = $ui->get_permissions($this->selectedBase,"gofon/macro");
+ $acls = $ui->get_permissions($this->selectedBase,"gofonmacro/macro");
/* NEW LIST MANAGMENT */
$listhead = "<div style='background:#F0F0F9;padding:5px;'>".
foreach($list as $key => $val){
- $sacl = $ui->get_permissions($val['dn'],"gofon/macro");
+ $sacl = $ui->get_permissions($val['dn'],"gofonmacro/macro");
$action = "";
if(!preg_match("/r/",$sacl)){
name='user_del_%KEY%' title='"._("Delete macro")."'>";
}
- $display= $val["displayName"][0];
+ $display= $val["displayName"][0]." (".$val["cn"][0].")";
if(isset($val['goFonMacroVisible']['0'])&&($val['goFonMacroVisible']['0'] == "1")){
$pic1 = $visible;
}else{
index cbed42605bfe58080330c70fc902ae8796e05a4b..981b526c2519b8ff882df253482a2d3df774b1d4 100755 (executable)
*/
function save_object()
{
- if (isset($_POST['displayName'])){
+ if (isset($_POST['gofonMacroGenericPosted'])){
$old_cn= $this->cn;
$old_visible = $this->goFonMacroVisible;
return (array(
"plShortName" => _("Generic"),
"plDescription" => _("Asterisk macro management"),
- "plSelfModify" => TRUE,
+ "plSelfModify" => FALSE,
"plDepends" => array(),
"plPriority" => 0,
"plSection" => array("administration"),
- "plCategory" => array("gofon"),
+ "plCategory" => array("gofonmacro" => array("description" => _("GOfon macro"),
+ "objectClass" => "gofonMacro")),
"plProvidedAcls" => array(
"cn" => _("Macro name"),
"base" => _("Base"),
"description" => _("Description"),
"displayName" => _("Display name"),
- "goFonMacroContent" => _("Macro content"),
+ "goFonMacroContent" => _("Macro content and parameter"),
"goFonMacroVisible" => _("Visibility flag"))
));
}
diff --git a/plugins/gofon/macro/class_gofonMacroManagement.inc b/plugins/gofon/macro/class_gofonMacroManagement.inc
index 5fea98f343f6e63c2494c17ed81088f13e724727..a21074b109d17a957746e7aad469306cdaf249ba 100755 (executable)
$this->dn= "new";
/* Create new usertab object */
- $this->macrotabs= new macrotabs($this->config,$this->config->data['TABS']['MACROTABS'], $this->dn,"gofon");
+ $this->macrotabs= new macrotabs($this->config,$this->config->data['TABS']['MACROTABS'], $this->dn,"gofonmacro");
+ $this->macrotabs->set_acl_base($this->DivListMacro->selectedBase);
}
if (($s_action=="edit") && (!isset($this->macrotabs->config))){
$dn = $this->macros[$s_entry]['dn'];
- $acl = $this->ui->get_permissions($dn,"gofon/macro");
+ $acl = $this->ui->get_permissions($dn,"gofonmacro/macro");
if(preg_match("/r/",$acl)){
$this->dn = $dn;
add_lock ($this->dn, $this->ui->dn);
/* Register macrotabs to trigger edit dialog */
$this->macrotabs= new macrotabs($this->config,
- $this->config->data['TABS']['MACROTABS'], $this->dn,"gofon");
+ $this->config->data['TABS']['MACROTABS'], $this->dn,"gofonmacro");
$_SESSION['objectinfo']= $this->dn;
}
}
/* Get 'dn' from posted 'uid' */
$dn = $this->macros[$s_entry]['dn'];
- $acl = $this->ui->get_permissions($dn,"gofon/macro");
+ $acl = $this->ui->get_permissions($dn,"gofonmacro/macro");
if(preg_match("/d/",$acl)){
/* Confirmation for deletion has been passed. Macro should be deleted. */
if (isset($_POST['delete_macro_confirm'])){
- $acl = $this->ui->get_permissions($this->dn,"gofon/macro");
+ $acl = $this->ui->get_permissions($this->dn,"gofonmacro/macro");
if(preg_match("/r/",$acl)){
/* Delete request is permitted, perform LDAP action */
- $this->macrotabs= new macrotabs($this->config,$this->config->data['TABS']['MACROTABS'], $this->dn,"gofon");
+ $this->macrotabs= new macrotabs($this->config,$this->config->data['TABS']['MACROTABS'], $this->dn,"gofonmacro");
$this->macrotabs->delete ();
gosa_log ("macro object'".$this->dn."' has been removed");
unset ($this->macrotabs);
}
/* Generate macro list */
- $res= get_list($Filter, "gofon", $base, $Attrs, $Flags);
+ $res= get_list($Filter, "gofonmacro", $base, $Attrs, $Flags);
$tmp=array();
foreach($res as $tkey => $val ){
diff --git a/plugins/gofon/macro/class_gofonMacroParameters.inc b/plugins/gofon/macro/class_gofonMacroParameters.inc
index 5a1aacfc0bb62e2186f1249cdf9270c128cb779a..b1ca0a8afe3dab8dad79b05a168777a58ec03629 100755 (executable)
/* Get acls for this tab,
there is only one attribute to write,
so we use the acls from gofon/marco */
- $ACLs = $this->ui->get_permissions($this->dn,"gofon/macro","goFonMarcoContent");
+ $ACLs = $this->ui->get_permissions($this->dn,"gofonmacro/macro","goFonMarcoContent");
/* get current content */
$content = $_SESSION['macroManagment']->macrotabs->by_object['macro']->goFonMacroContent;
index 9c5d37c30f014211d3136a783a5930533104029f..75b613fbbaab48091a9bb8338e086423582bbf5d 100755 (executable)
<textarea name="goFonMacroContent" style="width:99%;height:300px;font-size:14px;font-family:Arial;">{$goFonMacroContent}</textarea>
{/render}
+<input type='hidden' name='gofonMacroGenericPosted' value='1'>
+
<!-- Place cursor -->
<script language="JavaScript" type="text/javascript">
<!-- // First input field on page
diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc
index 4c4749c6e410f07ae7351bc4aeb7812eceb6a581..c1932f5590b33b456369554733e0269fabc22ce6 100644 (file)
"plDepends" => array("user"),
"plPriority" => 7, // Position in tabs
"plSection" => "personal", // This belongs to personal
- "plCategory" => array("users"),
+ "plCategory" => array("gofonreport" => array("description" => _("GOfon reports"),
+ "objectClass" => "")),
+
"plOptions" => array(),
"plProvidedAcls" => array(