summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b58cfa5)
raw | patch | inline | side by side (parent: b58cfa5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Mar 2010 16:04:40 +0000 (16:04 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Mar 2010 16:04:40 +0000 (16:04 +0000) |
-Is now able to read fixedFilters
-Whats missing, make userFilterEditor able to set fixedFilters as parent
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16385 594d385d-05f5-0310-b6e9-bd551577e9d8
-Whats missing, make userFilterEditor able to set fixedFilters as parent
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16385 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_listing.inc | patch | blob | history | |
gosa-core/include/class_management.inc | patch | blob | history | |
gosa-core/include/class_userFilter.inc | patch | blob | history |
index 38842dfb2ba762d670e1a7140e7b7e14a487a3d9..6175a42323ceff92b0542460d0097feeedf2cbdc 100644 (file)
}
+ function getFilter()
+ {
+ return($this->filter);
+ }
+
+
function setFilter($filter)
{
$this->filter= &$filter;
index 6bdd603ca37cd0519a890868d897bbb648e12251..b15a124623ef4f417141566efd8d290a03d62a5b 100644 (file)
function editFilter()
{
- $headpage = $this->getHeadpage();
- $this->dialogObject = new userFilter($this->config,$headpage->categories);
+ $this->dialogObject = new userFilter($this->config,$this->getHeadpage());
}
function renderList()
index 8a0ba62084765271fc0748d70e3f769b77439c2d..46e1aec4482625845e980e0059c85dd04440ed99 100644 (file)
class userFilter extends plugin
{
- protected $fitlers = array();
+ protected $filters = array();
protected $availableCategories = array();
public $objectclasses = array('gosaProperties');
public $attributes = array('gosaUserDefinedFilter');
public $gosaUserDefinedFilter = array();
+ private $listing = NULL;
+ private $fixedFilter = NULL;
/*! \brief Returns true if we are able to read and write userFilters
* (schema has to be present, gosaProperties)
/*! \brief Initiates the filter editing dialog.
*/
- function __construct($config, $categories)
+ function __construct($config, $listing)
{
// Initialize this plugin with the users dn to gather user defined filters.
$ui = get_userinfo();
plugin::plugin($config, $ui->dn);
+ $this->listing = &$listing;
+ $filter= $this->listing->getFilter();
+ $this->fixedFilter = $filter->getFixedFilters();
// Keep list of currently managed categories.
- $this->availableCategories = array_unique($categories);
+ $this->availableCategories = array_unique($this->listing->categories);
// Load list of filters
if(isset($this->attrs['gosaUserDefinedFilter'])){
if($action['action'] == 'edit' && count($action['targets']) == 1){
$key= $this->filterWidget->getKey($action['targets'][0]);
if(isset($this->filters[$key])){
- $this->dialog=new userFilterEditor($this->filters[$key], $this->availableCategories);
+ $this->dialog=new userFilterEditor($this->filters[$key], $this->availableCategories, $this->fixedFilter);
}
}
// Act on new requests
if(isset($_POST['addFilter'])){
- $this->dialog=new userFilterEditor(array(), $this->availableCategories);
+ $this->dialog=new userFilterEditor(array(), $this->availableCategories, $this->fixedFilter);
}
// Act on remove requests