summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2025-08-29 16:11:15 +0100
committerlsces <lester@lsces.co.uk>2025-08-29 16:11:15 +0100
commit37a4cf72a230da98ae32ce691221ef87d9f58f0c (patch)
tree279945ee00e9e7b52ec1e6d5e28b21bab436706c
parentad3564f717342f15867e721a27581757b27018b2 (diff)
downloadcalendar-37a4cf72a230da98ae32ce691221ef87d9f58f0c.tar.gz
calendar-37a4cf72a230da98ae32ce691221ef87d9f58f0c.tar.bz2
calendar-37a4cf72a230da98ae32ce691221ef87d9f58f0c.zip
Add namespace and tidy PHP8.4 style rules
-rw-r--r--box.php2
-rw-r--r--index.php11
-rw-r--r--user_preferences_inc.php3
3 files changed, 7 insertions, 9 deletions
diff --git a/box.php b/box.php
index bce40af..6d90d34 100644
--- a/box.php
+++ b/box.php
@@ -12,7 +12,7 @@
/**
* Setup
*/
-require_once( '../kernel/includes/setup_inc.php' );
+require_once '../kernel/includes/setup_inc.php';
global $gContent, $gBitSystem;
include_once( LIBERTY_PKG_INCLUDE_PATH.'lookup_content_inc.php' );
diff --git a/index.php b/index.php
index 39c3460..f338ea9 100644
--- a/index.php
+++ b/index.php
@@ -1,5 +1,8 @@
<?php
+use Bitweaver\Calendar\Calendar;
+use Bitweaver\KernelTools;
+
// $Header$
// Copyright( c ) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
@@ -7,9 +10,7 @@
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
require_once( '../kernel/includes/setup_inc.php' );
-include_once( CALENDAR_PKG_PATH.'Calendar.php' );
-
-$gBitSystem->isPackageActive( 'calendar', TRUE );
+$gBitSystem->isPackageActive( 'calendar', true );
$gBitSystem->verifyPermission( 'p_calendar_view' );
@@ -32,6 +33,4 @@ if( $gBitUser->hasPermission("p_calendar_view_changes") && $_SESSION['calendar']
// Build the calendar
$gCalendar->buildCalendar($listHash, $_SESSION['calendar']);
// And display it with a nice title.
-$gCalendar->display(tra('Calendar'));
-
-?>
+$gCalendar->display(KernelTools::tra('Calendar'));
diff --git a/user_preferences_inc.php b/user_preferences_inc.php
index 3c6b43b..773924c 100644
--- a/user_preferences_inc.php
+++ b/user_preferences_inc.php
@@ -13,7 +13,7 @@
* Setup
*/
if( $gBitSystem->isFeatureActive('calendar_user_prefs') ) {
- include_once( CALENDAR_PKG_INCLUDE_PATH.'admin/admin_calendar_inc.php' );
+ include_once CALENDAR_PKG_INCLUDE_PATH . 'admin/admin_calendar_inc.php';
if( !empty( $_REQUEST['calendar_submit'] ) ) {
foreach( $calendarValues as $item ) {
if( !empty( $_REQUEST[$item] ) ) {
@@ -22,4 +22,3 @@ if( $gBitSystem->isFeatureActive('calendar_user_prefs') ) {
}
}
}
-?>