summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e1358ae)
raw | patch | inline | side by side (parent: e1358ae)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 9 Apr 2008 07:53:05 +0000 (07:53 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 9 Apr 2008 07:53:05 +0000 (07:53 +0000) |
-PHP5 OO
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10291 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10291 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc b/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc
index 05a00306e5ffabda1611dbb583956ba8016e41d2..3a33cec20b854ee6195e54f70c2309869055eb4c 100644 (file)
{
/* Current base */
- var $selectedBase = "";
- var $departments = array();
+ private $departments = array();
/* Regex */
- var $Regex = "*";
- var $UserRegex = "*";
+ public $Regex = "*";
+ public $UserRegex = "*";
/* Subsearch checkbox */
- var $SubSearch = FALSE;
- var $parent ;
- var $ui ;
+ public $SubSearch = FALSE;
+ protected $parent ;
+ public $ui ;
/*! \brief Initialize this class
diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc b/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc
index 1b044fa1840bf129425750237aa7de9e84cf6ae1..ba8c9e97c0296351bb4bd83e923a919f68c75391 100644 (file)
*/
class sudo extends plugin
{
- /* Group attributes */
- var $cn= "";
- var $description= "";
- var $sudoUser = array("ALL");
- var $sudoCommand= array();
- var $sudoHost = array("ALL");
- var $sudoRunAs = array("ALL");
+ protected $cn= "";
+ protected $description= "";
- var $accessTo = array();
- var $trustModel = "";
- var $show_ws_dialog = FALSE;
- var $was_trust_account= FALSE;
+ protected $sudoUser = array("ALL");
+ protected $sudoCommand= array();
+ protected $sudoHost = array("ALL");
+ protected $sudoRunAs = array("ALL");
+ protected $accessTo = array();
+ protected $trustModel = "";
- var $objectclasses = array("top","sudoRole");
- var $attributes = array("cn","description","sudoUser","sudoCommand","sudoHost","sudoRunAs","accessTo","trustModel");
+ private $is_default = FALSE;
+ private $show_ws_dialog = FALSE;
+ private $was_trust_account= FALSE;
- var $is_account = TRUE;
- var $is_default = FALSE;
- var $dialog;
+ public $objectclasses = array("top","sudoRole");
+ public $attributes = array("cn","description","sudoUser","sudoCommand","sudoHost","sudoRunAs","accessTo","trustModel");
+
+ public $ignore_account = TRUE;
/*! \brief Returns to the base department for sudo roles.
This department is then used to store new roles.
}
/* Is this account a trustAccount? */
- if ($this->is_account && isset($this->attrs['trustModel'])){
+ if (isset($this->attrs['trustModel'])){
$this->trustModel= $this->attrs['trustModel'][0];
$this->was_trust_account= TRUE;
} else {
}
$this->accessTo = array();
- if ($this->is_account && isset($this->attrs['accessTo'])){
+ if (isset($this->attrs['accessTo'])){
for ($i= 0; $i<$this->attrs['accessTo']['count']; $i++){
$tmp= $this->attrs['accessTo'][$i];
$this->accessTo[$tmp]= $tmp;
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
+
if($this->is_new){
$ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
$ldap->cd($this->dn);
}
+ public function get_cn()
+ {
+ return($this->cn);
+ }
+
+
/*! \brief Used for copy & paste.
Some entries must be renamed to avaoid duplicate entries.
*/
diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoOption.inc b/gosa-plugins/sudo/admin/sudo/class_sudoOption.inc
index bbd9c1880d7d57bd5817297bbf2d0c4f84e73f74..5be32494acde9b653307c32b8f0ab9355e906068 100644 (file)
class sudoOption extends plugin
{
/* Group attributes */
- var $sudoOption = array();
- var $attributes = array("sudoOption");
- var $is_account = TRUE;
- var $options = array();
+ protected $sudoOption = array();
+ public $attributes = array("sudoOption");
+ private $options = array();
+ public $ignore_account = TRUE;
/*! \brief Initializes this class
@param Object $config The GOsa configuration object.
diff --git a/gosa-plugins/sudo/admin/sudo/class_target_list_systems.inc b/gosa-plugins/sudo/admin/sudo/class_target_list_systems.inc
index e46b946f889bd330725b9dde84d783a47811c913..247c501650734b186173fef53b3c7f27e4f75a55 100644 (file)
class target_list_systems extends MultiSelectWindow
{
- var $config;
- var $list =array();
- var $Targets_used =array();
+ public $config;
+ protected $list =array();
+ private $Targets_used =array();
/* Current base */
- var $selectedBase = "";
- var $departments = array();
+ private $departments = array();
/* Regex */
- var $Regex = "*";
+ protected $Regex = "*";
/* CheckBoxes, to change default values modify $this->AddCheckBox */
- var $servers ;
- var $workstations ;
- var $terminals ;
+ protected $servers ;
+ protected $workstations ;
+ protected $terminals ;
/* Subsearch checkbox */
- var $SubSearch ;
- var $parent ;
- var $ui ;
+ protected $SubSearch ;
+ protected $parent ;
+ public $ui ;
function target_list_systems(&$config,$Targets_used)
diff --git a/gosa-plugins/sudo/admin/sudo/class_target_list_users.inc b/gosa-plugins/sudo/admin/sudo/class_target_list_users.inc
index 34cc1e810d745e3b649841446a0dfc92fbd7e452..a3ced3292eaa81b49631284f5df02aee3eade537 100644 (file)
class target_list_users extends MultiSelectWindow
{
- var $config;
- var $list =array();
- var $Targets_used =array();
+ public $config;
+ private $list =array();
+ private $Targets_used =array();
/* Current base */
- var $selectedBase = "";
- var $departments = array();
+ private $departments = array();
/* Regex */
- var $Regex = "*";
+ protected $Regex = "*";
/* CheckBoxes, to change default values modify $this->AddCheckBox */
- var $user ;
- var $group ;
+ protected $user ;
+ protected $group ;
/* Subsearch checkbox */
- var $SubSearch ;
- var $parent ;
- var $ui ;
+ protected $SubSearch ;
+ protected $parent ;
+ protected $ui ;
function target_list_users(&$config,$Targets_used)
{
array("cn","uid","objectClass","description"), GL_SIZELIMIT | GL_SUBSEARCH));
}
}else{
- $res= get_list($filter, array("users"), get_people_ou().$base,
- array("cn","uid","objectClass","description"), GL_SIZELIMIT );
$res = array();
if($this->user){
$filter = "(&(objectClass=person)(objectClass=gosaAccount))";
diff --git a/gosa-plugins/sudo/admin/sudo/tabs_sudo.inc b/gosa-plugins/sudo/admin/sudo/tabs_sudo.inc
index 666fb4c71f06f24ab0fccb1057a22c0890b70764..34aa4cafc1c41b33afbc2b3139f146c8ba00614e 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
- $new_dn= 'cn='.$baseobject->cn.','.sudo::get_sudoers_ou($baseobject->config);
+ $new_dn= 'cn='.$baseobject->get_cn().','.sudo::get_sudoers_ou($baseobject->config);
/* Move group? */
if ($this->dn != $new_dn){