[eGroupWare-svn] r55985 - /trunk/calendar/inc/
[email protected] Mon, 02 May 2016 20:22:47 -0000
| Newsgroups | gmane.comp.web.egroupware.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ralfbecker
Date: Mon May 2 22:22:47 2016
New Revision: 55985
URL: http://svn.stylite.de/viewvc/egroupware?rev=55985&view=rev
Log:
remove old phpgwapi datetime class from calendar, as it is no longer in api
Modified:
trunk/calendar/inc/class.calendar_bo.inc.php
trunk/calendar/inc/class.calendar_ui.inc.php
trunk/calendar/inc/class.calendar_uilist.inc.php
trunk/calendar/inc/class.calendar_uiviews.inc.php
Modified: trunk/calendar/inc/class.calendar_bo.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/calendar/inc/class.calendar_bo.inc.php?rev=55985&r1=55984&r2=55985&view=diff
==============================================================================
--- trunk/calendar/inc/class.calendar_bo.inc.php (original)
+++ trunk/calendar/inc/class.calendar_bo.inc.php Mon May 2 22:22:47 2016
@@ -195,12 +195,6 @@
*/
var $so;
/**
- * Instance of the datetime class
- *
- * @var egw_datetime
- */
- var $datetime;
- /**
* Instance of the categories class
*
* @var Api\Categories
@@ -229,7 +223,6 @@
if ($this->debug > 0) $this->debug_message('calendar_bo::bocal() started',True);
$this->so = new calendar_so();
- $this->datetime = $GLOBALS['egw']->datetime;
$this->common_prefs =& $GLOBALS['egw_info']['user']['preferences']['common'];
$this->cal_prefs =& $GLOBALS['egw_info']['user']['preferences']['calendar'];
@@ -1835,7 +1828,7 @@
* @param type $event
* @return array array of selected calendar fields
*/
- function get_link_options ($event = array())
+ public static function get_link_options ($event = array())
{
unset($event); // not used, but required by function signature
$options = array (
Modified: trunk/calendar/inc/class.calendar_ui.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/calendar/inc/class.calendar_ui.inc.php?rev=55985&r1=55984&r2=55985&view=diff
==============================================================================
--- trunk/calendar/inc/class.calendar_ui.inc.php (original)
+++ trunk/calendar/inc/class.calendar_ui.inc.php Mon May 2 22:22:47 2016
@@ -47,12 +47,6 @@
*/
var $jscal;
/**
- * Reference to global datetime class
- *
- * @var egw_datetime
- */
- var $datetime;
- /**
* Instance of Api\Categories class
*
* @var Api\Categories
@@ -151,7 +145,6 @@
{
$this->bo = new calendar_bo();
}
- $this->datetime = $GLOBALS['egw']->datetime;
$this->categories = new Api\Categories($this->user,'calendar');
Modified: trunk/calendar/inc/class.calendar_uilist.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/calendar/inc/class.calendar_uilist.inc.php?rev=55985&r1=55984&r2=55985&view=diff
==============================================================================
--- trunk/calendar/inc/class.calendar_uilist.inc.php (original)
+++ trunk/calendar/inc/class.calendar_uilist.inc.php Mon May 2 22:22:47 2016
@@ -324,8 +324,9 @@
$this->last = $search_params['end'] = $today->format('ts');
break;
case 'week':
- $start = $this->bo->date2array($params['date'] ? $params['date'] : $this->date);
- $this->first = $this->datetime->get_weekday_start($start['year'],$start['month'],$start['day']);
+ $start = new Api\DateTime($params['date'] ? $params['date'] : $this->date);
+ $start->setWeekstart();
+ $this->first = $start->format('ts');
$this->last = $this->bo->date2array($this->first);
$this->last['day'] += ($params['weekend'] == 'true' ? 7 : 5) - 1;
$this->last['hour'] = 23; $this->last['minute'] = $this->last['sec'] = 59;
Modified: trunk/calendar/inc/class.calendar_uiviews.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/calendar/inc/class.calendar_uiviews.inc.php?rev=55985&r1=55984&r2=55985&view=diff
==============================================================================
--- trunk/calendar/inc/class.calendar_uiviews.inc.php (original)
+++ trunk/calendar/inc/class.calendar_uiviews.inc.php Mon May 2 22:22:47 2016
@@ -438,7 +438,9 @@
}
elseif ($this->planner_view == 'week' || $this->planner_view == 'weekN') // weeekview
{
- $this->first = $this->datetime->get_weekday_start($this->year,$this->month,$this->day);
+ $start = new Api\DateTime($this->date);
+ $start->setWeekstart();
+ $this->first = $start->format('ts');
$this->last = $this->bo->date2array($this->first);
$this->last['day'] += ($this->planner_view == 'week' ? 7 : 7 * $this->cal_prefs['multiple_weeks'])-1;
$this->last['hour'] = 23; $this->last['minute'] = $this->last['sec'] = 59;
@@ -527,7 +529,9 @@
if ($weeks)
{
- $this->first = $this->datetime->get_weekday_start($this->year,$this->month,$this->day);
+ $start = new Api\DateTime($this->date);
+ $start->setWeekstart();
+ $this->first = $start->format('ts');
$this->last = strtotime("+$weeks weeks",$this->first) - 1;
$weekNavH = "$weeks weeks";
$navHeader = lang('Week').' '.$this->week_number($this->first).' - '.$this->week_number($this->last).': '.
@@ -579,19 +583,16 @@
*/
function _week_align_month(&$first,&$last,$day=1)
{
- $first = $this->datetime->get_weekday_start($this->year,$this->month,$this->day=$day);
- if ($day == 1)
- {
- $last = $this->datetime->get_weekday_start($this->year,$this->month,
- $this->datetime->days_in_month($this->month,$this->year));
- }
- else
- {
- $last = $this->datetime->get_weekday_start($this->year,$this->month+1,$day);
- }
+ $start = new Api\DateTime($this->date);
+ $start->setDate($this->year,$this->month,$this->day=$day);
+ $start->setWeekstart();
+ $first = $start->format('ts');
+ $start->setDate($this->year,$this->month+1,$day);
+ if ($day == 1) $start->add('-1day');
+ $start->setWeekstart();
// now we need to calculate the end of the last day of that week
// as simple $last += WEEK_s - 1; does NOT work, if daylight saving changes in that week!!!
- $arr = $this->bo->date2array($last);
+ $arr = $start->format('array');
$arr['day'] += 6;
$arr['hour'] = 23;
$arr['min'] = $arr['sec'] = 59;
@@ -628,7 +629,9 @@
}
else
{
- $wd_start = $this->first = $this->datetime->get_weekday_start($this->year,$this->month,$this->day);
+ $start = new Api\DateTime($this->date);
+ $start->setWeekstart();
+ $wd_start = $this->first = $start->format('ts');
if ($days <= 5) // no weekend-days
{
switch($this->cal_prefs['weekdaystarts'])
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z