mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
moved declaration of categories var to bo class
This commit is contained in:
parent
ca9f3fe1eb
commit
a7c2b81b85
@ -157,6 +157,12 @@ class calendar_bo
|
|||||||
* @var egw_datetime
|
* @var egw_datetime
|
||||||
*/
|
*/
|
||||||
var $datetime;
|
var $datetime;
|
||||||
|
/**
|
||||||
|
* Instance of the categories class
|
||||||
|
*
|
||||||
|
* @var $categories
|
||||||
|
*/
|
||||||
|
var $categories;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does a user require an extra invite grant, to be able to invite an other user, default no
|
* Does a user require an extra invite grant, to be able to invite an other user, default no
|
||||||
@ -1307,9 +1313,9 @@ class calendar_bo
|
|||||||
static $id2cat = array();
|
static $id2cat = array();
|
||||||
$cats = array();
|
$cats = array();
|
||||||
$color = 0;
|
$color = 0;
|
||||||
if (!is_object($this->cats))
|
if (!is_object($this->categories))
|
||||||
{
|
{
|
||||||
$this->cats = CreateObject('phpgwapi.categories','','calendar');
|
$this->categories = new categories($this->user,'calendar');
|
||||||
}
|
}
|
||||||
foreach(explode(',',$category) as $cat_id)
|
foreach(explode(',',$category) as $cat_id)
|
||||||
{
|
{
|
||||||
@ -1317,7 +1323,7 @@ class calendar_bo
|
|||||||
|
|
||||||
if (!isset($id2cat[$cat_id]))
|
if (!isset($id2cat[$cat_id]))
|
||||||
{
|
{
|
||||||
list($id2cat[$cat_id]) = $this->cats->return_single($cat_id);
|
list($id2cat[$cat_id]) = $this->categories->return_single($cat_id);
|
||||||
$id2cat[$cat_id]['data'] = unserialize($id2cat[$cat_id]['data']);
|
$id2cat[$cat_id]['data'] = unserialize($id2cat[$cat_id]['data']);
|
||||||
}
|
}
|
||||||
$cat = $id2cat[$cat_id];
|
$cat = $id2cat[$cat_id];
|
||||||
|
@ -1123,8 +1123,6 @@ class calendar_boupdate extends calendar_bo
|
|||||||
return $this->so->delete_alarm($id, $this->now_su);
|
return $this->so->delete_alarm($id, $this->now_su);
|
||||||
}
|
}
|
||||||
|
|
||||||
var $categories;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find existing categories in database by name or add categories that do not exist yet
|
* Find existing categories in database by name or add categories that do not exist yet
|
||||||
* currently used for ical/sif import
|
* currently used for ical/sif import
|
||||||
|
Loading…
Reference in New Issue
Block a user