diff options
| -rw-r--r-- | admin/admin_calendar_inc.php | 26 | ||||
| -rw-r--r-- | admin/schema_inc.php | 34 |
2 files changed, 30 insertions, 30 deletions
diff --git a/admin/admin_calendar_inc.php b/admin/admin_calendar_inc.php index efb7548..1144f9a 100644 --- a/admin/admin_calendar_inc.php +++ b/admin/admin_calendar_inc.php @@ -1,11 +1,13 @@ <?php -$hourValues = array( 1, 2, 3, 4, 6, 12 ); -$hourOutput = array( 60, 30, 20, 15, 10, 5 ); +use Bitweaver\KernelTools; + +$hourValues = [ 1, 2, 3, 4, 6, 12 ]; +$hourOutput = [ 60, 30, 20, 15, 10, 5 ]; $gBitSmarty->assign( 'hourValues', $hourValues ); $gBitSmarty->assign( 'hourOutput', $hourOutput ); -$firstDayValues = array( 7, 6, 5, 4, 3, 2, 1 ); -$firstDayOutput = array( tra( "Monday" ), tra( "Tuesday" ), tra( "Wednesday" ), tra( "Thursday" ), tra( "Friday" ), tra( "Saturday" ), tra( "Sunday" ) ); +$firstDayValues = [ 7, 6, 5, 4, 3, 2, 1 ]; +$firstDayOutput = [ KernelTools::tra( "Monday" ), KernelTools::tra( "Tuesday" ), KernelTools::tra( "Wednesday" ), KernelTools::tra( "Thursday" ), KernelTools::tra( "Friday" ), KernelTools::tra( "Saturday" ), KernelTools::tra( "Sunday" ) ]; $gBitSmarty->assign( 'firstDayValues', $firstDayValues ); $gBitSmarty->assign( 'firstDayOutput', $firstDayOutput ); @@ -14,21 +16,21 @@ $gBitSmarty->assign( 'dayStart', $dayStart ); $dayEnd = range( 24, 13 ); $gBitSmarty->assign( 'dayEnd', $dayEnd ); -$calendarValues = array( +$calendarValues = [ 'calendar_week_offset', 'calendar_hour_fraction', 'calendar_day_start', 'calendar_day_end', -); -$calendarChecks = array( +]; +$calendarChecks = [ 'calendar_user_prefs', 'calendar_ajax_popups', -); +]; // This has to come after the set since we are loading what is selected. -$contentDefaults = array(); -$calendarTypeDefaults = array(); -$calendarTypesSelected = array(); +$contentDefaults = []; +$calendarTypeDefaults = []; +$calendarTypesSelected = []; global $gLibertySystem; foreach( $gLibertySystem->mContentTypes as $cType ) { $option = 'calendar_default_'.$cType['content_type_guid']; @@ -59,5 +61,3 @@ foreach( $calendarTypeDefaults as $key => $val) { } } $gBitSmarty->assign('calendarTypesSelected', $calendarTypesSelected); - -?> diff --git a/admin/schema_inc.php b/admin/schema_inc.php index 51311de..a66d4d0 100644 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -1,30 +1,30 @@ <?php global $gBitInstaller; -$gBitInstaller->registerPackageInfo( CALENDAR_PKG_NAME, array( +$gBitInstaller->registerPackageInfo( CALENDAR_PKG_NAME, [ 'description' => "Calendar package to display bitweaver entries by date, and set events", - 'license' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>', -) ); + 'license' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>', +] ); // ### Default Preferences -$gBitInstaller->registerPreferences( KERNEL_PKG_NAME, array( - array(CALENDAR_PKG_NAME,'calendar_week_offset','7'), - array(CALENDAR_PKG_NAME,'calendar_hour_fraction','1'), - array(CALENDAR_PKG_NAME,'calendar_user_prefs','y'), - array(CALENDAR_PKG_NAME,'calendar_day_start','0'), - array(CALENDAR_PKG_NAME,'calendar_day_end','24'), -) ); +$gBitInstaller->registerPreferences( KERNEL_PKG_NAME, [ + [ CALENDAR_PKG_NAME, 'calendar_week_offset', '7' ], + [ CALENDAR_PKG_NAME, 'calendar_hour_fraction', '1' ], + [ CALENDAR_PKG_NAME, 'calendar_user_prefs', 'y' ], + [ CALENDAR_PKG_NAME, 'calendar_day_start', '0' ], + [ CALENDAR_PKG_NAME, 'calendar_day_end', '24' ], +] ); // ### Default User Permissions -$gBitInstaller->registerUserPermissions( CALENDAR_PKG_NAME, array( - array('p_calendar_view', 'Can browse the calendar', 'basic', CALENDAR_PKG_NAME), - array('p_calendar_view_changes', 'Can browse content changes in the calendar', 'editors', CALENDAR_PKG_NAME), -) ); +$gBitInstaller->registerUserPermissions( CALENDAR_PKG_NAME, [ + [ 'p_calendar_view', 'Can browse the calendar', 'basic', CALENDAR_PKG_NAME ], + [ 'p_calendar_view_changes', 'Can browse content changes in the calendar', 'editors', CALENDAR_PKG_NAME ], +] ); // this empty table registration is needed for the installer to pick it up to install the preferences $gBitInstaller->registerSchemaTable( CALENDAR_PKG_NAME, '', '' ); // Requirements -$gBitInstaller->registerRequirements( CALENDAR_PKG_NAME, array( - 'liberty' => array( 'min' => '2.1.4' ), -)); +$gBitInstaller->registerRequirements( CALENDAR_PKG_NAME, [ + 'liberty' => [ 'min' => '5.0.0' ], +]); |
