summaryrefslogtreecommitdiff
path: root/includes/bit_setup_inc.php
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2025-08-29 09:50:44 +0100
committerlsces <lester@lsces.co.uk>2025-08-29 09:50:44 +0100
commit24ac90ba2d2e8911b8b51d251541565f202dd9ce (patch)
tree998a5e4a84dc2008d7fe68123a8fc164e7ce5204 /includes/bit_setup_inc.php
parentef37929a5577234fc2a350b6207260c52d5835cd (diff)
downloadquota-24ac90ba2d2e8911b8b51d251541565f202dd9ce.tar.gz
quota-24ac90ba2d2e8911b8b51d251541565f202dd9ce.tar.bz2
quota-24ac90ba2d2e8911b8b51d251541565f202dd9ce.zip
Refactor for PHP8.4, namespace and Smarty5
Diffstat (limited to 'includes/bit_setup_inc.php')
-rw-r--r--includes/bit_setup_inc.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/includes/bit_setup_inc.php b/includes/bit_setup_inc.php
index 1ec36f8..5cf8fbb 100644
--- a/includes/bit_setup_inc.php
+++ b/includes/bit_setup_inc.php
@@ -1,10 +1,18 @@
<?php
global $gBitSystem, $gBitSmarty;
-$registerHash = array(
+$pRegisterHash = [
'package_name' => 'quota',
- 'package_path' => dirname( dirname( __FILE__ ) ).'/',
- 'homeable' => TRUE,
-);
-$gBitSystem->registerPackage( $registerHash );
-?>
+ 'package_path' => dirname( dirname( __FILE__ ) ) . '/',
+ 'homeable' => true,
+];
+
+// fix to quieten down VS Code which can't see the dynamic creation of these ...
+define( 'QUOTA_PKG_NAME', $pRegisterHash['package_name'] );
+define( 'QUOTA_PKG_URL', BIT_ROOT_URL . basename( $pRegisterHash['package_path'] ) . '/' );
+define( 'QUOTA_PKG_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/' );
+define( 'QUOTA_PKG_INCLUDE_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/');
+define( 'QUOTA_PKG_CLASS_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/classes/');
+define( 'QUOTA_PKG_ADMIN_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/admin/');
+
+$gBitSystem->registerPackage( $pRegisterHash );