mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
fix deprecated warnings because of constructor named as class, and dont give a PHP Fatal if old phpgwapi is missing
This commit is contained in:
parent
ab4cd83b41
commit
8e540fe144
@ -12,9 +12,9 @@
|
||||
/**
|
||||
* Calendar day selection for sitemgr
|
||||
*/
|
||||
class module_calendar extends Module
|
||||
class module_calendar extends Module
|
||||
{
|
||||
function module_calendar()
|
||||
function __construct()
|
||||
{
|
||||
$this->arguments = array(
|
||||
'redirect' => array(
|
||||
@ -32,6 +32,11 @@ class module_calendar extends Module
|
||||
$date = (int) (strtotime(get_var('date',array('POST','GET'))));
|
||||
$redirect = $arguments['redirect'] ? $arguments['redirect'] : '#';
|
||||
|
||||
if (!file_exists(EGW_SERVER_ROOT.'/phpgwapi'))
|
||||
{
|
||||
return 'Requires old phpgwapi!';
|
||||
}
|
||||
|
||||
return $GLOBALS['egw']->jscalendar->get_javascript().
|
||||
$GLOBALS['egw']->jscalendar->flat($redirect,$date);
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ class module_calendar_list extends Module
|
||||
*/
|
||||
var $ui;
|
||||
|
||||
function module_calendar_list()
|
||||
function __construct()
|
||||
{
|
||||
$this->arguments = array(
|
||||
'category' => array(
|
||||
@ -157,7 +157,7 @@ class module_calendar_list extends Module
|
||||
{
|
||||
//_debug_array($GLOBALS['Common_BO']->sites->current_site);
|
||||
// copied from bookmarks module.
|
||||
$cat = createobject('phpgwapi.categories','','calendar');
|
||||
$cat = new Api\Categories('','calendar');
|
||||
$cats = $cat->return_array('all',0,False,'','cat_name','',True);
|
||||
$cat_ids = array();
|
||||
while (list(,$category) = @each($cats))
|
||||
|
@ -48,7 +48,7 @@ class module_calendar_month extends Module
|
||||
*/
|
||||
var $default_css = '/calendar/templates/default/app.css';
|
||||
|
||||
function module_calendar_month()
|
||||
function __construct()
|
||||
{
|
||||
$this->bo = new calendar_bo();
|
||||
$this->arguments = array(
|
||||
|
Loading…
Reference in New Issue
Block a user