summaryrefslogtreecommitdiff
path: root/includes/bit_setup_inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/bit_setup_inc.php')
-rw-r--r--includes/bit_setup_inc.php20
1 files changed, 12 insertions, 8 deletions
diff --git a/includes/bit_setup_inc.php b/includes/bit_setup_inc.php
index a41e339..06e2421 100644
--- a/includes/bit_setup_inc.php
+++ b/includes/bit_setup_inc.php
@@ -1,18 +1,22 @@
<?php
global $gBitSystem, $gBitSmarty;
-$registerHash = array(
+$pRegisterHash = [
'package_name' => 'rss',
- 'package_path' => dirname( dirname( __FILE__ ) ).'/',
-);
-$gBitSystem->registerPackage( $registerHash );
+ 'package_path' => dirname( dirname( __FILE__ ) ) . '/',
+];
+
+// fix to quieten down VS Code which can't see the dynamic creation of these ...
+define( 'RSS_PKG_NAME', $pRegisterHash['package_name'] );
+define( 'RSS_PKG_URL', BIT_ROOT_URL . basename( $pRegisterHash['package_path'] ) . '/' );
+
+$gBitSystem->registerPackage( $pRegisterHash );
if( $gBitSystem->isPackageActive( 'rss' ) ) {
- $menuHash = array(
+ $menuHash = [
'package_name' => RSS_PKG_NAME,
- 'index_url' => RSS_PKG_URL.'index.php',
+ 'index_url' => RSS_PKG_URL . 'index.php',
'menu_template' => 'bitpackage:rss/menu_rss.tpl',
- );
+ ];
$gBitSystem->registerAppMenu( $menuHash );
}
-?>